-
Notifications
You must be signed in to change notification settings - Fork 100
Validation: Add immediate data pipeline validation tests #4547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
a15fb20 to
90010d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
|
Results for build job (at 17e7666): +webgpu:api,validation,encoding,programmable,pipeline_immediate:required_slots_set:* - 161 cases, 161 subcases (~1/case)
+webgpu:api,validation,encoding,programmable,pipeline_immediate:unused_variable:* - 12 cases, 12 subcases (~1/case)
+webgpu:api,validation,encoding,programmable,pipeline_immediate:overprovisioned_immediate_data:* - 6 cases, 6 subcases (~1/case)
+webgpu:api,validation,encoding,programmable,pipeline_immediate:render_bundle_execution_state_invalidation:* - 1 cases, 2 subcases (~2/case)
-TOTAL: 285738 cases, 2344462 subcases
+TOTAL: 285918 cases, 2344643 subcases |
90010d1 to
adcf898
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
080f99a to
b4c612d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
b4c612d to
bed2542
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
|
Sorry, bit swamped. Should be able to review tomorrow. |
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
| } | ||
| }); | ||
|
|
||
| g.test('immediate_data_size') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have the same test for the defaulted pipeline layouts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Seperate this to another PR)
But I don't think we could have a validation test for this easily. Because setImmediates allows overprovision, all we could do for default pipeline layouts is a control case.
How about cover this in operation test or you prefer a control case for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant, can we have a test that the default pipeline layout causes an error to be produced when compiling pipeline that use too many immediates?
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
| `; | ||
| break; | ||
| case 'struct_padding': | ||
| kRequiredSize = 64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| kRequiredSize = 64; | |
| kRequiredSize = 40; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. And it indeed caught a bug in implementation! Tint calculated whole immediate block struct size as the immediate block size. And it doesn't get rid of tail padding bytes so it triggers validation report wrong fail due to it. (report used more bytes than layout required)
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/validation/encoding/programmable/pipeline_immediate.spec.ts
Outdated
Show resolved
Hide resolved
Adds `pipeline_immediate.spec.ts` to validate immediate data usage in RenderPassEncoder, ComputePassEncoder, and RenderBundleEncoder. Tests cover: - Required immediate data slots are set. - Unused variables do not require slots. - Pipeline creation fails if shader immediate size exceeds layout limit. - RenderBundle execution invalidates pipeline and immediate data state.
b6116d0 to
ae2cc60
Compare
Adds
pipeline_immediate.spec.tsto validate immediate data usage in RenderPassEncoder, ComputePassEncoder, and RenderBundleEncoder.Tests cover:
Issue: #
Requirements for PR author:
.unimplemented()./** documented */and new helper files are found inhelper_index.txt.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.