Skip to content

Test that createBuffer/createTexture only allows exposed usages#4634

Open
kainino0x wants to merge 1 commit intogpuweb:mainfrom
kainino0x:transient1
Open

Test that createBuffer/createTexture only allows exposed usages#4634
kainino0x wants to merge 1 commit intogpuweb:mainfrom
kainino0x:transient1

Conversation

@kainino0x
Copy link
Copy Markdown
Collaborator

@kainino0x kainino0x commented Apr 27, 2026

For any buffer/texture usages known by the CTS, check that the browser only accepts it if it also exposes it.

Currently the buffer test passes in all browsers - there haven't been any new usages in a long time. But next time we add a usage, this makes sure that when they start accepting the usage, they also start exposing it.

The texture test fails in Safari because it's missing validation of unknown texture usages (this is also caught by #4636 that tests an invalid usage). Passes in Chrome/Firefox.

Unrelated cleanup: filter out redundant cases in createBuffer usage tests.

Issue: none filed


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.

@kainino0x kainino0x requested a review from mwyrzykowski April 27, 2026 08:44
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

Results for build job (at 9685122):

-webgpu:api,validation,buffer,create:usage:* - 144 cases, 288 subcases (~2/case)
+webgpu:api,validation,buffer,create:usage:* - 78 cases, 156 subcases (~2/case)
+webgpu:api,validation,buffer,create:new_usages:* - 1 cases, 10 subcases (~10/case)
+webgpu:api,validation,createTexture:new_usages:* - 6 cases, 6 subcases (~1/case)
-TOTAL: 281182 cases, 2322747 subcases
+TOTAL: 281123 cases, 2322631 subcases

For any buffer/texture usages known by the CTS, check that the browser
only accepts it if it also exposes it.

Currently the buffer test passes in all browsers - there haven't been any
new usages in a long time. But next time we add a usage, this makes sure
that when they start accepting the usage, they also start exposing it.

The texture test fails in Safari because it's missing validation of
unknown texture usages (this is also caught by another new test that
tests an invalid usage). Passes in Chrome/Firefox.

Unrelated cleanup: filter out redundant cases in createBuffer usage tests.
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.

1 participant