Skip to content

Test uninitialized queries in unsubmitted command buffers#4624

Merged
greggman merged 2 commits into
gpuweb:mainfrom
greggman:add-query-read-unintialized-tests
Apr 16, 2026
Merged

Test uninitialized queries in unsubmitted command buffers#4624
greggman merged 2 commits into
gpuweb:mainfrom
greggman:add-query-read-unintialized-tests

Conversation

@greggman
Copy link
Copy Markdown
Contributor

@greggman greggman commented Apr 15, 2026

Query slots that have never been used at required to resolve to zero. Some implementations might wrongly mark them as used at encoding time instead of submit time.

These pass on some implementations but it could be by luck of the just happen to be zero


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.

@greggman greggman requested a review from kainino0x April 15, 2026 20:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

Results for build job (at e00c4c5):

+webgpu:api,operation,command_buffer,queries,occlusionQuery:occlusion_query,unsubmitted_render_pass:* - 1 cases, 1 subcases (~1/case)
+webgpu:api,operation,command_buffer,queries,timestampQuery:resolve_unused_slots:* - 2 cases, 2 subcases (~1/case)
-TOTAL: 280761 cases, 2322100 subcases
+TOTAL: 280764 cases, 2322103 subcases

Comment thread src/webgpu/api/operation/command_buffer/queries/timestampQuery.spec.ts Outdated
greggman and others added 2 commits April 16, 2026 16:29
Query slots that have never been used at required to resolve
to zero. Some implementaitons might wrongly mark them as
used at encoding time instead of submit time.
….spec.ts

Co-authored-by: Kai Ninomiya <kainino1@gmail.com>
@greggman greggman force-pushed the add-query-read-unintialized-tests branch from be0f759 to e00c4c5 Compare April 16, 2026 23:29
@greggman greggman enabled auto-merge (squash) April 16, 2026 23:30
@greggman greggman merged commit 0f4e899 into gpuweb:main Apr 16, 2026
1 check passed
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