Skip to content

Refactor immediate operation test to drop dependency on StorageBuffer…#4619

Merged
shaoboyan091 merged 1 commit intogpuweb:mainfrom
shaoboyan091:refactor
Mar 31, 2026
Merged

Refactor immediate operation test to drop dependency on StorageBuffer…#4619
shaoboyan091 merged 1 commit intogpuweb:mainfrom
shaoboyan091:refactor

Conversation

@shaoboyan091
Copy link
Copy Markdown
Contributor

@shaoboyan091 shaoboyan091 commented Mar 30, 2026

…sInFragmentStage

greggman@ pointed out that the previous immediates operation tests relies on StorageBuffersInFragmentStage, which will reduce the cover rate of the devices. (#4558 (comment))

Remove usage of StorageBuffersInFragmentStage and directly rendering result out to do operation test

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.

…sInFragmentStage

greggman@ pointed out that the previous immediates operation tests relies
on StorageBuffersInFragmentStage, which will reduce the cover rate of the
devices. (gpuweb#4558 (comment))

Remove usage of StorageBuffersInFragmentStage and directly rendering result
out to do operation test
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the immediate-data operation tests to avoid relying on maxStorageBuffersInFragmentStage (especially in compatibility mode) by switching render-path verification from fragment-stage storage buffer writes to reading back an rgba32uint render target.

Changes:

  • Removed the compatibility-mode skip logic tied to StorageBuffersInFragmentStage.
  • Split pipeline creation into compute (storage-buffer output) vs render (fragment vec4u color output to rgba32uint) paths.
  • Added a unified runAndCheck helper that validates results via buffer readback (compute) or texture readback (render).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

Results for build job (at 5821c0f):

 Test case/subcase counts did not change.

@shaoboyan091 shaoboyan091 merged commit 09fdb84 into gpuweb:main Mar 31, 2026
5 checks 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.

3 participants