diff --git a/src/dawn_native/CommandValidation.cpp b/src/dawn_native/CommandValidation.cpp index e4613827ca..ed0f184cc4 100644 --- a/src/dawn_native/CommandValidation.cpp +++ b/src/dawn_native/CommandValidation.cpp @@ -147,12 +147,7 @@ namespace dawn_native { case Command::ExecuteBundles: { ExecuteBundlesCmd* cmd = commands->NextCommand(); commands->NextData>(cmd->count); - - if (cmd->count > 0) { - // Reset state. It is invalidated after render bundle execution. - commandBufferState = CommandBufferStateTracker{}; - } - + commandBufferState = CommandBufferStateTracker{}; break; } diff --git a/src/tests/unittests/validation/RenderBundleValidationTests.cpp b/src/tests/unittests/validation/RenderBundleValidationTests.cpp index c8449127d1..5d946a5a6d 100644 --- a/src/tests/unittests/validation/RenderBundleValidationTests.cpp +++ b/src/tests/unittests/validation/RenderBundleValidationTests.cpp @@ -501,7 +501,7 @@ TEST_F(RenderBundleValidationTest, ClearsState) { ASSERT_DEVICE_ERROR(commandEncoder.Finish()); } - // Test executing 0 bundles does not clear command buffer state. + // Test executing 0 bundles still clears command buffer state. { wgpu::CommandEncoder commandEncoder = device.CreateCommandEncoder(); wgpu::RenderPassEncoder pass = commandEncoder.BeginRenderPass(&renderPass); @@ -514,7 +514,7 @@ TEST_F(RenderBundleValidationTest, ClearsState) { pass.Draw(3); pass.EndPass(); - commandEncoder.Finish(); + ASSERT_DEVICE_ERROR(commandEncoder.Finish()); } }