Skip to content

Commit eca60d9

Browse files
authored
Rollin Immediates (#4517)
* Rollin Immediates This PR update gpuweb/types version to include immediate related changes. And update affected cases. * Update maxImmediateSize in capability mode
1 parent 9f1f325 commit eca60d9

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@types/w3c-image-capture": "^1.0.10",
5151
"@typescript-eslint/eslint-plugin": "^6.9.1",
5252
"@typescript-eslint/parser": "^6.9.1",
53-
"@webgpu/types": "^0.1.66",
53+
"@webgpu/types": "^0.1.67",
5454
"ansi-colors": "4.1.3",
5555
"babel-plugin-add-header-comment": "^1.0.3",
5656
"babel-plugin-const-enum": "^1.2.0",

src/webgpu/api/validation/encoding/encoder_open_state.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const kRenderPassEncoderCommandInfo: {
9898
setScissorRect: {},
9999
setBlendConstant: {},
100100
setStencilReference: {},
101+
setImmediates: {},
101102
beginOcclusionQuery: {},
102103
endOcclusionQuery: {},
103104
executeBundles: {},
@@ -122,6 +123,7 @@ const kRenderBundleEncoderCommandInfo: {
122123
setBindGroup: {},
123124
setIndexBuffer: {},
124125
setVertexBuffer: {},
126+
setImmediates: {},
125127
pushDebugGroup: {},
126128
popDebugGroup: {},
127129
insertDebugMarker: {},
@@ -141,6 +143,7 @@ const kComputePassEncoderCommandInfo: {
141143
setPipeline: {},
142144
dispatchWorkgroups: {},
143145
dispatchWorkgroupsIndirect: {},
146+
setImmediates: {},
144147
pushDebugGroup: {},
145148
popDebugGroup: {},
146149
insertDebugMarker: {},
@@ -391,6 +394,12 @@ g.test('render_pass_commands')
391394
renderPass.setStencilReference(0);
392395
}
393396
break;
397+
case 'setImmediates':
398+
{
399+
const data = new Uint32Array(1);
400+
renderPass.setImmediates(0, data, 0, 1);
401+
}
402+
break;
394403
case 'beginOcclusionQuery':
395404
{
396405
renderPass.beginOcclusionQuery(0);
@@ -502,6 +511,12 @@ g.test('render_bundle_commands')
502511
bundleEncoder.setVertexBuffer(1, buffer);
503512
}
504513
break;
514+
case 'setImmediates':
515+
{
516+
const data = new Uint32Array(1);
517+
bundleEncoder.setImmediates(0, data, 0, 1);
518+
}
519+
break;
505520
case 'pushDebugGroup':
506521
{
507522
bundleEncoder.pushDebugGroup('group');
@@ -584,6 +599,12 @@ g.test('compute_pass_commands')
584599
computePass.dispatchWorkgroupsIndirect(indirectBuffer, 0);
585600
}
586601
break;
602+
case 'setImmediates':
603+
{
604+
const data = new Uint32Array(1);
605+
computePass.setImmediates(0, data, 0, 1);
606+
}
607+
break;
587608
case 'pushDebugGroup':
588609
{
589610
computePass.pushDebugGroup('group');

src/webgpu/capability_info.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ const [kLimitInfoKeys, kLimitInfoDefaults, kLimitInfoData] =
769769
'maxComputeWorkgroupSizeY': [ , 256, 128, ],
770770
'maxComputeWorkgroupSizeZ': [ , 64, 64, ],
771771
'maxComputeWorkgroupsPerDimension': [ , 65535, 65535, ],
772+
'maxImmediateSize': [ , 64, 64, ],
772773
} as const];
773774

774775
// MAINTENANCE_TODO: Remove when the compat spec is merged.

0 commit comments

Comments
 (0)