diff --git a/src/dawn_native/d3d12/CommandBufferD3D12.cpp b/src/dawn_native/d3d12/CommandBufferD3D12.cpp index 26ef0244a8..626ca9b424 100644 --- a/src/dawn_native/d3d12/CommandBufferD3D12.cpp +++ b/src/dawn_native/d3d12/CommandBufferD3D12.cpp @@ -995,6 +995,12 @@ namespace dawn_native { namespace d3d12 { case Command::Dispatch: { DispatchCmd* dispatch = mCommands.NextCommand(); + // Skip noop dispatches, it can cause D3D12 warning from validation layers and + // leads to device lost. + if (dispatch->x == 0 || dispatch->y == 0 || dispatch->z == 0) { + break; + } + TransitionAndClearForSyncScope(commandContext, resourceUsages.dispatchUsages[currentDispatch]); DAWN_TRY(bindingTracker->Apply(commandContext));