Skip to content

Test alphaToCoverageEnabled constraints - #4706

Merged
Kangz merged 2 commits into
gpuweb:mainfrom
Kangz:alphatocov
Sep 21, 2026
Merged

Kangz merged 2 commits into
gpuweb:mainfrom
Kangz:alphatocov

Conversation

@Kangz

@Kangz Kangz commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

That a fragment stage and target 0 must exist and that its format must be blendable and have an alpha channel.

Add componentCount to color formats in format_info.ts as there was no way to know which formats have an alpha channel.

Add an isColorTextureFormatWithAlpha helper.

Fix isTextureFormatBlendable to take texture-formats-tier1 into account.

Issue: #


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

That a fragment stage and target 0 must exist and that its format must
be blendable and have an alpha channel.

Add componentCount to color formats in format_info.ts as there was no
way to know which formats have an alpha channel.

Add an isColorTextureFormatWithAlpha helper.

Fix isTextureFormatBlendable to take `texture-formats-tier1` into
account.
@Kangz
Kangz requested a review from kainino0x September 18, 2026 14:56
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Results for build job (at c41cf0a):

+webgpu:api,validation,render_pipeline,multisample_state:alpha_to_coverage,fragment_stage_required:* - 4 cases, 8 subcases (~2/case)
+webgpu:api,validation,render_pipeline,multisample_state:alpha_to_coverage,first_target_required:* - 4 cases, 8 subcases (~2/case)
+webgpu:api,validation,render_pipeline,multisample_state:alpha_to_coverage,first_format_blendable_and_has_alpha:* - 4 cases, 156 subcases (~39/case)
-TOTAL: 285540 cases, 2349827 subcases
+TOTAL: 285552 cases, 2349999 subcases

Comment thread src/webgpu/api/validation/render_pipeline/multisample_state.spec.ts Outdated
Comment thread src/webgpu/format_info.ts
Comment thread src/webgpu/format_info.ts Outdated
Comment thread src/webgpu/api/validation/render_pipeline/multisample_state.spec.ts Outdated
@Kangz
Kangz merged commit 28e3eaf into gpuweb:main Sep 21, 2026
1 check passed
@Kangz
Kangz deleted the alphatocov branch September 21, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants