Skip to content

Conversation

beaufortfrancois
Copy link
Collaborator

Issue: #4426


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 in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

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

@beaufortfrancois beaufortfrancois marked this pull request as draft July 18, 2025 09:17
@beaufortfrancois beaufortfrancois force-pushed the test-texture-for-texture-view branch 2 times, most recently from 0dd5a91 to 63932fe Compare July 18, 2025 10:07
@beaufortfrancois beaufortfrancois force-pushed the test-texture-for-texture-view branch from 63932fe to 0591d59 Compare July 18, 2025 10:07
@beaufortfrancois
Copy link
Collaborator Author

beaufortfrancois commented Jul 18, 2025

@Kangz Is this WIP PR what you had in mind?

@beaufortfrancois beaufortfrancois changed the title Test view is default if texture is used instead of view Pass texture instead of texture view in operation tests Jul 18, 2025
@Kangz
Copy link
Collaborator

Kangz commented Jul 18, 2025

Not really, do we have tests that check that the default descriptor used in texture.createView() is correctly the full descriptor (so with full mips / levels, etc)? This is what we should duplicate for end2end tests.

@beaufortfrancois
Copy link
Collaborator Author

Not really, do we have tests that check that the default descriptor used in texture.createView() is correctly the full descriptor (so with full mips / levels, etc)? This is what we should duplicate for end2end tests.

@greggman would know.

@greggman
Copy link
Contributor

I don't think we have a specific test. Rather, lots of tests count on this behavior. Checking, for example, the textureSample 2d tests and 3d tests expect this behavior. The 2d-array textureSample have to create a view of 2d-array so not the default, although I guess if depthOrArrayLayers > 1 then that is the default so could change it so it doesn't explicitly ask for { dimension: '2d-array' } when depthOrArrayLayers > 1.

@greggman
Copy link
Contributor

We could also change the textureNumLayers and textureNumLevels tests to check this. They current have parameters full and partial for views but pass in all parameters. We could make them pass in nothing (so the default) for full.

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.

3 participants