Skip noop dispatch in front-end
Workaround for Metal becuase system crashes on 0 dispatches. Bug: dawn:640 Change-Id: I5bd33b22242ddc31816a16acb019ce2f552808bb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39521 Commit-Queue: Hao Li <hao.x.li@intel.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
8aa7919735
commit
5ab1ed7e1e
|
@ -65,10 +65,14 @@ namespace dawn_native {
|
|||
DAWN_TRY(mCommandBufferState.ValidateCanDispatch());
|
||||
}
|
||||
|
||||
// Skip noop dispatch. It is a workaround for system crashes on 0 dispatches on some
|
||||
// platforms.
|
||||
if (x != 0 && y != 0 && z != 0) {
|
||||
DispatchCmd* dispatch = allocator->Allocate<DispatchCmd>(Command::Dispatch);
|
||||
dispatch->x = x;
|
||||
dispatch->y = y;
|
||||
dispatch->z = z;
|
||||
}
|
||||
|
||||
return {};
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue