Skip to content

Fix: Allow creating view with usage=0 from transient texture#4651

Merged
kainino0x merged 2 commits into
gpuweb:mainfrom
beicause:patch-1
Jun 3, 2026
Merged

Fix: Allow creating view with usage=0 from transient texture#4651
kainino0x merged 2 commits into
gpuweb:mainfrom
beicause:patch-1

Conversation

@beicause
Copy link
Copy Markdown
Contributor

@beicause beicause commented May 30, 2026

Found in gfx-rs/wgpu#9568. webgpu:api,validation,createView:texture_view_usage_of_multiple_usages:usage1=16;usage2=32 fails when viewUsage is 0 because isValid is false, but this should be valid because viewUsage=0 means full set of usage, because the view description.usage is resolved to texture.usage (https://gpuweb.github.io/gpuweb/#abstract-opdef-resolving-gputextureviewdescriptor-defaults).


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.

@beicause beicause changed the title Allow view usage 0 for transient textures in texture_view_usage_of_multiple_usages test Change creating view from transient texture with view usage 0 to valid May 30, 2026
@beicause beicause changed the title Change creating view from transient texture with view usage 0 to valid Fix: Allow creating view with usage=0 from transient texture May 30, 2026
@kainino0x kainino0x self-requested a review June 3, 2026 01:40
Copy link
Copy Markdown
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, how did I mess this up? Thought I verified all these tests against my Dawn fix...

Anyway this fixes the test in Chromium too. LGTM, thank you!

@kainino0x kainino0x enabled auto-merge (squash) June 3, 2026 01:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Results for build job (at d9f8b02):

 Test case/subcase counts did not change.

@kainino0x kainino0x merged commit a4af861 into gpuweb:main Jun 3, 2026
1 check passed
@beicause beicause deleted the patch-1 branch June 3, 2026 02:25
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