webgpu: Cover immediate data in indirect commands - #4698
Open
shaoboyan091 wants to merge 1 commit into
Open
Conversation
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, bundle isolation, and multi-draw count buffers using the existing execution helpers. Presubmit passes, including 1031 framework unit tests. D3D12 runs in core and compatibility modes pass the new rendering cases and reproduce immediate-data corruption in indirect compute dispatch.
|
Results for build job (at db4d632): +webgpu:api,operation,command_buffer,programmable,immediate:indirect_execution:* - 9 cases, 72 subcases (~8/case)
+webgpu:api,operation,command_buffer,programmable,immediate:multi_draw_indirect:* - 4 cases, 40 subcases (~10/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: 285364 cases, 2347068 subcases
+TOTAL: 285391 cases, 2347194 subcases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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