diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp index 42c8e5cea7..cb2b06270d 100644 --- a/runtime/shims/d3d12_com.cpp +++ b/runtime/shims/d3d12_com.cpp @@ -439,7 +439,12 @@ class GraphicsCommandList final return; } if (!rects) return; - if (count > D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) return check(false); + // WARP still closes a list after RSSetScissorRects(17) (d3d12_close_parity), so the call is not an error: + // the rectangles past the 16 a pipeline can have are dropped. + if (count > D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) { + stub("ID3D12GraphicsCommandList::RSSetScissorRects(more than 16 rectangles; the first 16 are used)"); + count = D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE; + } scissors_.fill({}); for (UINT i = 0; i < count; ++i) { scissors_[i] = {rects[i].left, rects[i].top, rects[i].right, rects[i].bottom};