diff options
Diffstat (limited to 'runtime/shims/d3d12_com.cpp')
| -rw-r--r-- | runtime/shims/d3d12_com.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp index 98c698afa..9ab8aa3cd 100644 --- a/runtime/shims/d3d12_com.cpp +++ b/runtime/shims/d3d12_com.cpp | |||
| @@ -377,7 +377,13 @@ public: | |||
| 377 | 377 | ||
| 378 | void STDMETHODCALLTYPE RSSetScissorRects(UINT count, const D3D12_RECT* rects) override { | 378 | void STDMETHODCALLTYPE RSSetScissorRects(UINT count, const D3D12_RECT* rects) override { |
| 379 | if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false); | 379 | if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false); |
| 380 | if (!count || !rects) return; | 380 | // A zero-count call disables all previously bound rectangles; it is not a no-op. |
| 381 | // With no scissor bound, the rasterizer clips every fragment, as on native D3D12. | ||
| 382 | if (!count) { | ||
| 383 | scissor_ = {}; | ||
| 384 | return; | ||
| 385 | } | ||
| 386 | if (!rects) return; | ||
| 381 | if (count > 1) stub("ID3D12GraphicsCommandList::RSSetScissorRects (more than one rectangle; the first is used)"); | 387 | if (count > 1) stub("ID3D12GraphicsCommandList::RSSetScissorRects (more than one rectangle; the first is used)"); |
| 382 | scissor_ = {rects[0].left, rects[0].top, rects[0].right, rects[0].bottom}; | 388 | scissor_ = {rects[0].left, rects[0].top, rects[0].right, rects[0].bottom}; |
| 383 | } | 389 | } |