Use the default values for Dispatch in examples and tests
Bug: dawn:22 Change-Id: I4f83b966ee73ed92dc6648e3c59fac1be89031e1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18381 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
67b1ad7a97
commit
3da19b843f
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue