upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/d3d12_com.cpp
diff options
context:
space:
mode:
authorpmilewsskiedu-gif <pmilewsskiedu-gif@users.noreply.github.com>2026-11-22 20:16:54 -0500
committerpmilewsskiedu-gif <pmilewsskiedu-gif@users.noreply.github.com>2026-11-22 20:16:54 -0500
commit9ec296cc40297d807339f4def7d6bd8afbe308ce (patch)
tree7cce78fada984517ad35f3ad0175460a7e63b137 /runtime/shims/d3d12_com.cpp
parent03b09a086592a197db64d91655c6e65c30764d96 (diff)
Runtime: unbind scissor rectangles on zero-count D3D12 call
Diffstat (limited to 'runtime/shims/d3d12_com.cpp')
-rw-r--r--runtime/shims/d3d12_com.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp
index d9b1a009c..a669e8889 100644
--- a/runtime/shims/d3d12_com.cpp
+++ b/runtime/shims/d3d12_com.cpp
@@ -356,7 +356,13 @@ public:
356 356
357 void STDMETHODCALLTYPE RSSetScissorRects(UINT count, const D3D12_RECT* rects) override { 357 void STDMETHODCALLTYPE RSSetScissorRects(UINT count, const D3D12_RECT* rects) override {
358 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false); 358 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false);
359 if (!count || !rects) return; 359 // A zero-count call disables all previously bound rectangles; it is not a no-op.
360 // With no scissor bound, the rasterizer clips every fragment, as on native D3D12.
361 if (!count) {
362 scissor_ = {};
363 return;
364 }
365 if (!rects) return;
360 if (count > 1) stub("ID3D12GraphicsCommandList::RSSetScissorRects (more than one rectangle; the first is used)"); 366 if (count > 1) stub("ID3D12GraphicsCommandList::RSSetScissorRects (more than one rectangle; the first is used)");
361 scissor_ = {rects[0].left, rects[0].top, rects[0].right, rects[0].bottom}; 367 scissor_ = {rects[0].left, rects[0].top, rects[0].right, rects[0].bottom};
362 } 368 }