Conversation
|
Results for build job (at 1ddbf94): +webgpu:api,operation,command_buffer,programmable,immediate:basic_execution:* - 51 cases, 51 subcases (~1/case)
+webgpu:api,operation,command_buffer,programmable,immediate:update_data:* - 3 cases, 3 subcases (~1/case)
+webgpu:api,operation,command_buffer,programmable,immediate:pipeline_switch:* - 4 cases, 4 subcases (~1/case)
+webgpu:api,operation,command_buffer,programmable,immediate:use_max_immediate_size:* - 3 cases, 3 subcases (~1/case)
+webgpu:api,operation,command_buffer,programmable,immediate:typed_array_arguments:* - 36 cases, 216 subcases (~6/case)
+webgpu:api,operation,command_buffer,programmable,immediate:multiple_updates_before_draw_or_dispatch:* - 3 cases, 3 subcases (~1/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)
-TOTAL: 280650 cases, 2321809 subcases
+TOTAL: 280752 cases, 2322091 subcases |
834cd4a to
509b754
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 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/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
2c527ae to
ffe4c7c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 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/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
4c8a817 to
7e4e8d8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 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/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
7e4e8d8 to
2e3521f
Compare
Implement operation tests for setImmediates in ComputePassEncoder, RenderPassEncoder, and RenderBundleEncoder. - Add basic execution tests for scalar, vector, and struct types. - Add tests for partial updates and multiple updates (using range verification). - Add tests for pipeline switching (no inheritance). - Add tests for large data (maxImmediateSize) with range verification. - Add tests for TypedArray arguments with offsets. - Add tests for mixing render pass and bundle execution.
2e3521f to
6f16cf5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Softly ping for review. |
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
|
The operation tests seem to have good coverage. They became much simpler when the group decided to add validation that all immediates are set instead of defaulting to 0. |
Kangz
left a comment
There was a problem hiding this comment.
Wow Github's code review UI is really annoying to use.
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
| .combine('typedArray', kTypedArrayBufferViewKeys) | ||
| .combine('encoderType', kProgrammableEncoderTypes) | ||
| .beginSubcases() | ||
| .combine('dataOffset', [undefined, 0, 2]) |
There was a problem hiding this comment.
With these params, I don't think that the filter below is ever false?
Also why 2 and not other offsets/sizes? For uint8_t it will be an issue as a size of 2 is not a multiple. Instead can we make the dataSize depend on the BYTES_PER_ELEMENT to be either 1 element or 4 bytes (whichever is smaller)?
There was a problem hiding this comment.
BYTES_PER_ELEMENT is a good idea, I think I could try param generator.
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
src/webgpu/api/operation/command_buffer/programmable/immediate.spec.ts
Outdated
Show resolved
Hide resolved
| }); | ||
| t.device.queue.submit([commandEncoder.finish()]); | ||
|
|
||
| const expected = new Uint32Array(16); |
There was a problem hiding this comment.
Let's just reuse clearsData?
There was a problem hiding this comment.
It will need to be hosted out of the encodeForPassType but that's ok to avoid copying the same filler pattern code twice.
| for (let i = 0; i < 16; i++) clearData[i] = 0xaaaaaaaa + i * 0x11111111; | ||
| enc.setImmediates!(0, clearData); | ||
|
|
||
| if (dataSize === undefined) { |
There was a problem hiding this comment.
I thought that passing undefined to the argument would cause the default values to be used, is that not the case and we need to make calls with different numbers of parameters?
| for (let i = 0; i < 16; i++) expected[i] = 0xaaaaaaaa + i * 0x11111111; | ||
| const expectedView = new Uint8Array(expected.buffer); | ||
|
|
||
| for (let i = 0; i < actualDataSize; i++) { |
There was a problem hiding this comment.
Instead of replicating the conversion, can we copy from view into the correct spot in expected ?
There was a problem hiding this comment.
There is a memcpy utility somewhere in the CTS IIRC
| const actualDataSize = dataSize ?? maxElementsIn64Bytes - actualDataOffset; | ||
|
|
||
| // Create a typed array buffer. If dataSize is undefined, we shouldn't add padding | ||
| // because setImmediates uses the rest of the array, which would exceed our intended size or break the % 4 rule. |
There was a problem hiding this comment.
The padding of 0 or 4 doesn't improve the % 4 rule because both of these numbers are multiples of 4. We need to make the actualDataSize smaller when BYTES_PER_ELEMENT is no a multiple of 4, so that the dataSize == undefined case passes validation. And then we can add paddingElements on top of that.
|
I think I've resolved comments. PTAL, thanks ! |
| // Pipeline A always uses vec4<u32> (16 bytes). | ||
| const wgslDeclA = 'var<immediate> data: vec4<u32>;'; | ||
| const copyCodeA = ` | ||
| let base = outIndex * 4; |
There was a problem hiding this comment.
Did your AI start rewriting this test for some reason?
In any case, base is no longer used here.
| const arr = new Ctor(actualDataOffset + actualDataSize + paddingElements); | ||
| const view = new DataView(arr.buffer); | ||
|
|
||
| // Fill the data region with a recognizable byte pattern. |
There was a problem hiding this comment.
This could be a single loop over actualDataSize + elementSize, or better over the byte size of view
Implement operation tests for setImmediates in ComputePassEncoder, RenderPassEncoder, and RenderBundleEncoder.
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.