diff --git a/examples/ComputeBoids.cpp b/examples/ComputeBoids.cpp index a4467620ad..71d7402e17 100644 --- a/examples/ComputeBoids.cpp +++ b/examples/ComputeBoids.cpp @@ -269,7 +269,7 @@ wgpu::CommandBuffer createCommandBuffer(const wgpu::TextureView backbufferView, wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(updatePipeline); pass.SetBindGroup(0, updateBGs[i]); - pass.Dispatch(kNumParticles, 1, 1); + pass.Dispatch(kNumParticles); pass.EndPass(); } diff --git a/src/tests/end2end/BindGroupTests.cpp b/src/tests/end2end/BindGroupTests.cpp index b7e147fa74..9d89cee04a 100644 --- a/src/tests/end2end/BindGroupTests.cpp +++ b/src/tests/end2end/BindGroupTests.cpp @@ -29,7 +29,7 @@ protected: wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); return encoder.Finish(); } diff --git a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp index 4d5e953d0a..569c82b2a7 100644 --- a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp +++ b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp @@ -74,7 +74,7 @@ void ComputeCopyStorageBufferTests::BasicTest(const char* shader) { wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(kInstances, 1, 1); + pass.Dispatch(kInstances); pass.EndPass(); commands = encoder.Finish(); diff --git a/src/tests/end2end/ComputeSharedMemoryTests.cpp b/src/tests/end2end/ComputeSharedMemoryTests.cpp index 446a5e9c64..980735dd5a 100644 --- a/src/tests/end2end/ComputeSharedMemoryTests.cpp +++ b/src/tests/end2end/ComputeSharedMemoryTests.cpp @@ -56,7 +56,7 @@ void ComputeSharedMemoryTests::BasicTest(const char* shader) { wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); commands = encoder.Finish(); diff --git a/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp b/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp index 22fa4a3179..5c8b2e3edf 100644 --- a/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp +++ b/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp @@ -54,7 +54,7 @@ TEST_P(ComputeStorageBufferBarrierTests, AddIncrement) { pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroup); for (uint32_t i = 0; i < kIterations; ++i) { - pass.Dispatch(kNumValues, 1, 1); + pass.Dispatch(kNumValues); } pass.EndPass(); wgpu::CommandBuffer commands = encoder.Finish(); @@ -115,9 +115,9 @@ TEST_P(ComputeStorageBufferBarrierTests, AddPingPong) { for (uint32_t i = 0; i < kIterations / 2; ++i) { pass.SetBindGroup(0, bindGroups[0]); - pass.Dispatch(kNumValues, 1, 1); + pass.Dispatch(kNumValues); pass.SetBindGroup(0, bindGroups[1]); - pass.Dispatch(kNumValues, 1, 1); + pass.Dispatch(kNumValues); } pass.EndPass(); wgpu::CommandBuffer commands = encoder.Finish(); @@ -181,7 +181,7 @@ TEST_P(ComputeStorageBufferBarrierTests, UniformToStorageAddPingPong) { wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroups[b]); - pass.Dispatch(kNumValues, 1, 1); + pass.Dispatch(kNumValues); pass.EndPass(); } diff --git a/src/tests/end2end/DynamicBufferOffsetTests.cpp b/src/tests/end2end/DynamicBufferOffsetTests.cpp index 7d8c53431a..1798242408 100644 --- a/src/tests/end2end/DynamicBufferOffsetTests.cpp +++ b/src/tests/end2end/DynamicBufferOffsetTests.cpp @@ -264,7 +264,7 @@ TEST_P(DynamicBufferOffsetTests, BasicComputePipeline) { wgpu::ComputePassEncoder computePassEncoder = commandEncoder.BeginComputePass(); computePassEncoder.SetPipeline(pipeline); computePassEncoder.SetBindGroup(0, mBindGroups[0], offsets.size(), offsets.data()); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.EndPass(); wgpu::CommandBuffer commands = commandEncoder.Finish(); queue.Submit(1, &commands); @@ -284,7 +284,7 @@ TEST_P(DynamicBufferOffsetTests, SetDynamicOffestsComputePipeline) { wgpu::ComputePassEncoder computePassEncoder = commandEncoder.BeginComputePass(); computePassEncoder.SetPipeline(pipeline); computePassEncoder.SetBindGroup(0, mBindGroups[0], offsets.size(), offsets.data()); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.EndPass(); wgpu::CommandBuffer commands = commandEncoder.Finish(); queue.Submit(1, &commands); @@ -339,10 +339,10 @@ TEST_P(DynamicBufferOffsetTests, InheritDynamicOffestsComputePipeline) { wgpu::ComputePassEncoder computePassEncoder = commandEncoder.BeginComputePass(); computePassEncoder.SetPipeline(pipeline); computePassEncoder.SetBindGroup(0, mBindGroups[0], offsets.size(), offsets.data()); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.SetPipeline(testPipeline); computePassEncoder.SetBindGroup(1, mBindGroups[1]); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.EndPass(); wgpu::CommandBuffer commands = commandEncoder.Finish(); queue.Submit(1, &commands); @@ -392,9 +392,9 @@ TEST_P(DynamicBufferOffsetTests, UpdateDynamicOffsetsMultipleTimesComputePipelin wgpu::ComputePassEncoder computePassEncoder = commandEncoder.BeginComputePass(); computePassEncoder.SetPipeline(pipeline); computePassEncoder.SetBindGroup(0, mBindGroups[0], offsets.size(), offsets.data()); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.SetBindGroup(0, mBindGroups[0], testOffsets.size(), testOffsets.data()); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.EndPass(); wgpu::CommandBuffer commands = commandEncoder.Finish(); queue.Submit(1, &commands); diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/tests/end2end/GpuMemorySynchronizationTests.cpp index a2462447e4..d396a5fade 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/tests/end2end/GpuMemorySynchronizationTests.cpp @@ -111,7 +111,7 @@ TEST_P(GpuMemorySyncTests, ComputePass) { wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(compute); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); } @@ -183,7 +183,7 @@ TEST_P(GpuMemorySyncTests, RenderPassToComputePass) { wgpu::ComputePassEncoder pass1 = encoder.BeginComputePass(); pass1.SetPipeline(compute); pass1.SetBindGroup(0, bindGroup1); - pass1.Dispatch(1, 1, 1); + pass1.Dispatch(1); pass1.EndPass(); wgpu::CommandBuffer commands = encoder.Finish(); @@ -214,7 +214,7 @@ TEST_P(GpuMemorySyncTests, ComputePassToRenderPass) { wgpu::ComputePassEncoder pass0 = encoder.BeginComputePass(); pass0.SetPipeline(compute); pass0.SetBindGroup(0, bindGroup1); - pass0.Dispatch(1, 1, 1); + pass0.Dispatch(1); pass0.EndPass(); // Read that data in render pass. @@ -318,7 +318,7 @@ TEST_P(StorageToUniformSyncTests, ReadAfterWriteWithSameCommandBuffer) { wgpu::ComputePassEncoder pass0 = encoder0.BeginComputePass(); pass0.SetPipeline(compute); pass0.SetBindGroup(0, computeBindGroup); - pass0.Dispatch(1, 1, 1); + pass0.Dispatch(1); pass0.EndPass(); // Read that data in render pass. @@ -355,7 +355,7 @@ TEST_P(StorageToUniformSyncTests, ReadAfterWriteWithDifferentCommandBuffers) { wgpu::ComputePassEncoder pass0 = encoder0.BeginComputePass(); pass0.SetPipeline(compute); pass0.SetBindGroup(0, computeBindGroup); - pass0.Dispatch(1, 1, 1); + pass0.Dispatch(1); pass0.EndPass(); cb[0] = encoder0.Finish(); @@ -394,7 +394,7 @@ TEST_P(StorageToUniformSyncTests, ReadAfterWriteWithDifferentQueueSubmits) { wgpu::ComputePassEncoder pass0 = encoder0.BeginComputePass(); pass0.SetPipeline(compute); pass0.SetBindGroup(0, computeBindGroup); - pass0.Dispatch(1, 1, 1); + pass0.Dispatch(1); pass0.EndPass(); cb[0] = encoder0.Finish(); queue.Submit(1, &cb[0]); @@ -499,7 +499,7 @@ TEST_P(MultipleWriteThenMultipleReadTests, SeparateBuffers) { wgpu::ComputePassEncoder pass0 = encoder.BeginComputePass(); pass0.SetPipeline(cp); pass0.SetBindGroup(0, bindGroup0); - pass0.Dispatch(1, 1, 1); + pass0.Dispatch(1); pass0.EndPass(); // Create pipeline, bind group, and reuse buffers in render pass. @@ -621,7 +621,7 @@ TEST_P(MultipleWriteThenMultipleReadTests, OneBuffer) { wgpu::ComputePassEncoder pass0 = encoder.BeginComputePass(); pass0.SetPipeline(cp); pass0.SetBindGroup(0, bindGroup0); - pass0.Dispatch(1, 1, 1); + pass0.Dispatch(1); pass0.EndPass(); // Create pipeline, bind group, and reuse the buffer in render pass. diff --git a/src/tests/end2end/OpArrayLengthTests.cpp b/src/tests/end2end/OpArrayLengthTests.cpp index e2bf52bbcb..fcd60efd21 100644 --- a/src/tests/end2end/OpArrayLengthTests.cpp +++ b/src/tests/end2end/OpArrayLengthTests.cpp @@ -135,7 +135,7 @@ TEST_P(OpArrayLengthTest, Compute) { pass.SetPipeline(pipeline); pass.SetBindGroup(0, mBindGroup); pass.SetBindGroup(1, resultBindGroup); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); wgpu::CommandBuffer commands = encoder.Finish(); diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp index c5b15baacf..52d7094cc8 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/tests/end2end/TextureZeroInitTests.cpp @@ -616,7 +616,7 @@ TEST_P(TextureZeroInitTest, ComputePassSampledTextureClear) { wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetPipeline(computePipeline); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); wgpu::CommandBuffer commands = encoder.Finish(); EXPECT_LAZY_CLEAR(1u, queue.Submit(1, &commands)); diff --git a/src/tests/unittests/validation/BindGroupValidationTests.cpp b/src/tests/unittests/validation/BindGroupValidationTests.cpp index b741e14127..c6d7715362 100644 --- a/src/tests/unittests/validation/BindGroupValidationTests.cpp +++ b/src/tests/unittests/validation/BindGroupValidationTests.cpp @@ -835,7 +835,7 @@ class SetBindGroupValidationTest : public ValidationTest { wgpu::ComputePassEncoder computePassEncoder = commandEncoder.BeginComputePass(); computePassEncoder.SetPipeline(computePipeline); computePassEncoder.SetBindGroup(0, bindGroup, count, offsets); - computePassEncoder.Dispatch(1, 1, 1); + computePassEncoder.Dispatch(1); computePassEncoder.EndPass(); if (!expectation) { ASSERT_DEVICE_ERROR(commandEncoder.Finish()); diff --git a/src/tests/unittests/validation/ComputePassValidationTests.cpp b/src/tests/unittests/validation/ComputePassValidationTests.cpp index b9f9e94fc0..851c51906d 100644 --- a/src/tests/unittests/validation/ComputePassValidationTests.cpp +++ b/src/tests/unittests/validation/ComputePassValidationTests.cpp @@ -56,8 +56,8 @@ TEST_F(ComputePassValidationTest, ReadWriteUsage) { pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(1, 1, 1); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); + pass.Dispatch(1); pass.EndPass(); ASSERT_DEVICE_ERROR(encoder.Finish()); @@ -95,8 +95,8 @@ TEST_F(ComputePassValidationTest, MultipleWrites) { pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroup); - pass.Dispatch(1, 1, 1); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); + pass.Dispatch(1); pass.EndPass(); encoder.Finish(); @@ -137,10 +137,10 @@ TEST_F(ComputePassValidationTest, MultipleWritesSeparateBindGroups) { pass.SetPipeline(pipeline); pass.SetBindGroup(0, bindGroupA); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.SetBindGroup(0, bindGroupB); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); encoder.Finish(); diff --git a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp b/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp index fb034c6c99..c765cc9aef 100644 --- a/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp +++ b/src/tests/unittests/validation/ResourceUsageTrackingTests.cpp @@ -260,10 +260,10 @@ namespace { wgpu::ComputePassEncoder pass = encoder.BeginComputePass(); pass.SetBindGroup(0, bg0); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.SetBindGroup(0, bg1); - pass.Dispatch(1, 1, 1); + pass.Dispatch(1); pass.EndPass(); ASSERT_DEVICE_ERROR(encoder.Finish());