Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 32 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@types/w3c-image-capture": "^1.0.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@webgpu/types": "^0.1.68",
"@webgpu/types": "^0.1.71",
"ansi-colors": "4.1.3",
"babel-plugin-add-header-comment": "^1.0.3",
"babel-plugin-const-enum": "^1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ g.test('basic_execution')
encoderType,
pipeline,
encoder => {
encoder.setImmediates!(0, inputData);
encoder.setImmediates(0, inputData);
},
expected
);
Expand Down Expand Up @@ -525,17 +525,17 @@ g.test('update_data')
encodeFn: (enc, bindGroup) => {
// Step 1: Full set [1, 2, 3, 4]
enc.setBindGroup(0, bindGroup, [0]);
enc.setImmediates!(0, new Uint32Array([1, 2, 3, 4]));
enc.setImmediates(0, new Uint32Array([1, 2, 3, 4]));
dispatchOrDraw(encoderType, enc);

// Step 2: Full update [5, 6, 7, 8]
enc.setBindGroup(0, bindGroup, [256]);
enc.setImmediates!(0, new Uint32Array([5, 6, 7, 8]));
enc.setImmediates(0, new Uint32Array([5, 6, 7, 8]));
dispatchOrDraw(encoderType, enc);

// Step 3: Partial update offset 4 bytes (index 1) with [9, 10] -> [5, 9, 10, 8]
enc.setBindGroup(0, bindGroup, [512]);
enc.setImmediates!(4, new Uint32Array([9, 10]));
enc.setImmediates(4, new Uint32Array([9, 10]));
dispatchOrDraw(encoderType, enc);
},
});
Expand Down Expand Up @@ -666,11 +666,11 @@ g.test('pipeline_switch')
// Only set bind group once between bind group compatible pipelines.
setPipeline(encoderType, enc, pipelineA);
enc.setBindGroup(0, bindGroup, [0]);
enc.setImmediates!(0, new Uint32Array([1, 2, 3, 4]));
enc.setImmediates(0, new Uint32Array([1, 2, 3, 4]));

// Switch to Pipeline B without re-setting the bind group.
setPipeline(encoderType, enc, pipelineB);
enc.setImmediates!(0, immDataB, undefined, immDataSizeB);
enc.setImmediates(0, immDataB, undefined, immDataSizeB);
dispatchOrDraw(encoderType, enc);
});

Expand All @@ -686,11 +686,11 @@ g.test('pipeline_switch')
const renderTarget = encodeForPassType(t, encoderType, commandEncoder, enc => {
setPipeline(encoderType, enc, pipelineA);
enc.setBindGroup(0, bindGroup, [0]);
enc.setImmediates!(0, new Uint32Array([1, 2, 3, 4]));
enc.setImmediates(0, new Uint32Array([1, 2, 3, 4]));

// Switch to Pipeline B without re-setting the bind group.
setPipeline(encoderType, enc, pipelineB);
enc.setImmediates!(0, immDataB, undefined, immDataSizeB);
enc.setImmediates(0, immDataB, undefined, immDataSizeB);
dispatchOrDraw(encoderType, enc);
})!;

Expand Down Expand Up @@ -759,7 +759,7 @@ g.test('use_max_immediate_size')
encoderType,
pipeline,
encoder => {
encoder.setImmediates!(0, data);
encoder.setImmediates(0, data);
},
[0xdeadbeef, 0xcafebabe]
);
Expand Down Expand Up @@ -891,10 +891,10 @@ g.test('typed_array_arguments')
enc.setBindGroup(0, bindGroup, [0]);

// Initialize immediates to the baseline clear pattern.
enc.setImmediates!(0, clearData);
enc.setImmediates(0, clearData);

// Overwrite with typed array data using the parametrized offset/size.
enc.setImmediates!(0, arr, dataOffset, dataSize);
enc.setImmediates(0, arr, dataOffset, dataSize);

if (encoderType === 'compute pass') {
dispatchOrDraw(encoderType, enc);
Expand Down Expand Up @@ -929,11 +929,11 @@ g.test('multiple_updates_before_draw_or_dispatch')
pipeline,
encoder => {
// 1. Set all to [1, 2, 3, 4]
encoder.setImmediates!(0, new Uint32Array([1, 2, 3, 4]));
encoder.setImmediates(0, new Uint32Array([1, 2, 3, 4]));
// 2. Update middle two to [5, 6] -> [1, 5, 6, 4]
encoder.setImmediates!(4, new Uint32Array([5, 6]));
encoder.setImmediates(4, new Uint32Array([5, 6]));
// 3. Update last to [7] -> [1, 5, 6, 7]
encoder.setImmediates!(12, new Uint32Array([7]));
encoder.setImmediates(12, new Uint32Array([7]));
},
[1, 5, 6, 7]
);
Expand Down Expand Up @@ -969,7 +969,7 @@ g.test('render_pass_and_bundle_mix')
});
bundleEncoder.setPipeline(pipeline);
bundleEncoder.setBindGroup(0, bindGroup, [0]);
bundleEncoder.setImmediates!(0, new Uint32Array([1, 10]));
bundleEncoder.setImmediates(0, new Uint32Array([1, 10]));
bundleEncoder.draw(1);
const bundle = bundleEncoder.finish();

Expand All @@ -996,7 +996,7 @@ g.test('render_pass_and_bundle_mix')
// Pass: Set [2, 20], Draw (Index 1)
pass.setPipeline(pipeline);
pass.setBindGroup(0, bindGroup, [256]);
pass.setImmediates!(0, new Uint32Array([2, 20]));
pass.setImmediates(0, new Uint32Array([2, 20]));
pass.draw(1);

pass.end();
Expand Down Expand Up @@ -1061,7 +1061,7 @@ g.test('render_bundle_isolation')
});
bundleEncoderA.setPipeline(pipeline);
bundleEncoderA.setBindGroup(0, bindGroup, [0]);
bundleEncoderA.setImmediates!(0, new Uint32Array([1, 2]));
bundleEncoderA.setImmediates(0, new Uint32Array([1, 2]));
bundleEncoderA.draw(1);
const bundleA = bundleEncoderA.finish();

Expand All @@ -1071,7 +1071,7 @@ g.test('render_bundle_isolation')
});
bundleEncoderB.setPipeline(pipeline);
bundleEncoderB.setBindGroup(0, bindGroup, [256]);
bundleEncoderB.setImmediates!(0, new Uint32Array([3, 4]));
bundleEncoderB.setImmediates(0, new Uint32Array([3, 4]));
bundleEncoderB.draw(1);
const bundleB = bundleEncoderB.finish();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ g.test('enables_subgroups')
Test that enabling the 'subgroup-size-control' feature also enables the 'subgroups' feature.
`
)
.beforeAllSubcases(t => t.selectDeviceOrSkipTestCase('subgroup-size-control' as GPUFeatureName))
.beforeAllSubcases(t => t.selectDeviceOrSkipTestCase('subgroup-size-control'))
.fn(t => {
t.expect(() => hasFeature(t.device.features, 'subgroups'));
});
2 changes: 1 addition & 1 deletion src/webgpu/api/validation/createPipelineLayout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ g.test('immediate_data_size')
.fn(t => {
t.skipIf(!supportsImmediateData(getGPU(t.rec)), 'Immediate data not supported');

const maxImmediateSize = t.device.limits.maxImmediateSize!;
const maxImmediateSize = t.device.limits.maxImmediateSize;

const { immediateSize: sizeVariant } = t.params;
let size: number;
Expand Down
Loading
Loading