Repository navigation
webgpu: Cover immediate data in indirect commands - #4698
shaoboyan091 wants to merge 1 commit into
Conversation
|
Results for build job (at befc2ba): +webgpu:api,operation,command_buffer,programmable,immediate:indirect_execution:* - 9 cases, 72 subcases (~8/case)
-webgpu:api,operation,command_buffer,programmable,immediate:render_pass_and_bundle_mix:* - 1 cases, 1 subcases (~1/case)
-webgpu:api,operation,command_buffer,programmable,immediate:render_bundle_isolation:* - 1 cases, 1 subcases (~1/case)
+webgpu:api,operation,command_buffer,programmable,immediate:render_pass_and_bundle_mix:* - 8 cases, 8 subcases (~1/case)
+webgpu:api,operation,command_buffer,programmable,immediate:render_bundle_isolation:* - 8 cases, 8 subcases (~1/case)
-TOTAL: 290198 cases, 2381713 subcases
+TOTAL: 290221 cases, 2381799 subcases |
db4d632 to
7323702
Compare
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the expanded immediate-data test coverage.
No open issues 🎉
What changed in this PR
Extends WebGPU immediate-data operation tests to detect corruption across indirect compute and rendering commands, reusing the existing pipeline, encoding, and readback helpers.
Changes:
- Adds indirect dispatch and indexed/non-indexed draw coverage for repeated commands, mixed direct/indirect sequences, partial updates, and buffer offsets.
- Expands bundle mixing and isolation tests across draw types and vertex/fragment stages.
- Adds feature-gated multi-draw tests with distinct output pixels, optional count buffers, and draw-count limits.
| File | Description |
|---|---|
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts |
Extends shared helpers and adds indirect, multi-draw, and expanded bundle coverage for immediate-data preservation. |
Review effort: Balanced
Exercise indirect compute dispatch and indexed/non-indexed rendering with immediate values in compute, vertex, and fragment shaders. Cover repeated commands, mixed direct/indirect commands, partial updates, and bundle isolation using the existing execution helpers. Exclude Chromium-specific experimental multi-draw indirect coverage. Verified with type checking, lint and formatting checks, and 1031 framework unit tests.
7323702 to
befc2ba
Compare
You don't caught a test cases that relies on chromium only flags in previous run :) |
Summary
The added indirect execution test has 9 cases with 8 subcases each. Multi-draw has 4 cases with 10 subcases each. Each of the two existing bundle tests expands to 8 cases.
Motivation
Immediate execution tests previously used only direct draws and dispatches. They could not detect immediate-data corruption caused by an implementation inserting internal work for an indirect command.
The compute regression reproduces the reported failure: an indirect dispatch reads
{65535, 0, 1, 0}instead of the application's{25, 128, 240, 255}. With an indirect-buffer offset of 16 bytes, the second erroneous word becomes 4. The mixed sequence also verifies that the preceding direct dispatch is correct and that corruption can persist into the following direct dispatch. Assertions compare application values, not implementation-specific validation parameters.Verification
npm test: passes all builds, type checking, lint, test validation, documentation generation, and all 1,031 framework unit tests.--max-warnings=0, Prettier checking, andgit diff --check: pass.webgpu@0.6.0), D3D12, withenable-dawn-features=allow_unsafe_apisand normal validation enabled:Author Checklist
Reviewer Checklist