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:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:15 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:16:15 -0500
commit7cedefbe333f9a501a3d829217a8eeb7498d7898 (patch)
tree9c25acea4715570c8a91868a3f15a1e2d72525d4 /runtime/shims/d3d12_com.cpp
parent848c8ac666c047c6dd1fbc1565973665fd07ee60 (diff)
parent70e3acf45902e604dd3adc4cc277d1c8f4149628 (diff)
Merge pull request #3255 from KanameS
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 155e1e1e8..d9b1a009c 100644
--- a/runtime/shims/d3d12_com.cpp
+++ b/runtime/shims/d3d12_com.cpp
@@ -311,7 +311,10 @@ public:
311 } 311 }
312 312
313 // ClearState returns every piece of list state to its default, as Reset does (stencil references included). 313 // ClearState returns every piece of list state to its default, as Reset does (stencil references included).
314 void STDMETHODCALLTYPE ClearState(ID3D12PipelineState* state) override { reset_state(state); } 314 void STDMETHODCALLTYPE ClearState(ID3D12PipelineState* state) override {
315 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false);
316 reset_state(state);
317 }
315 318
316 // Graphics state. Draws record a copy of it (command_list.h, Draw). 319 // Graphics state. Draws record a copy of it (command_list.h, Draw).
317 void STDMETHODCALLTYPE IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY topology) override { 320 void STDMETHODCALLTYPE IASetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY topology) override {
@@ -340,6 +343,7 @@ public:
340 343
341 // A count of 0 unbinds the viewports; draws then rasterize nothing (record_draw). 344 // A count of 0 unbinds the viewports; draws then rasterize nothing (record_draw).
342 void STDMETHODCALLTYPE RSSetViewports(UINT count, const D3D12_VIEWPORT* viewports) override { 345 void STDMETHODCALLTYPE RSSetViewports(UINT count, const D3D12_VIEWPORT* viewports) override {
346 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false);
343 if (!count) { 347 if (!count) {
344 viewport_ = {}; 348 viewport_ = {};
345 return; 349 return;
@@ -351,6 +355,7 @@ public:
351 } 355 }
352 356
353 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);
354 if (!count || !rects) return; 359 if (!count || !rects) return;
355 if (count > 1) stub("ID3D12GraphicsCommandList::RSSetScissorRects (more than one rectangle; the first is used)"); 360 if (count > 1) stub("ID3D12GraphicsCommandList::RSSetScissorRects (more than one rectangle; the first is used)");
356 scissor_ = {rects[0].left, rects[0].top, rects[0].right, rects[0].bottom}; 361 scissor_ = {rects[0].left, rects[0].top, rects[0].right, rects[0].bottom};
@@ -359,6 +364,7 @@ public:
359 // D3D12 reads render-target and depth descriptors here, so their views are copied now. 364 // D3D12 reads render-target and depth descriptors here, so their views are copied now.
360 void STDMETHODCALLTYPE OMSetRenderTargets(UINT count, const D3D12_CPU_DESCRIPTOR_HANDLE* targets, BOOL single_range, 365 void STDMETHODCALLTYPE OMSetRenderTargets(UINT count, const D3D12_CPU_DESCRIPTOR_HANDLE* targets, BOOL single_range,
361 const D3D12_CPU_DESCRIPTOR_HANDLE* depth) override { 366 const D3D12_CPU_DESCRIPTOR_HANDLE* depth) override {
367 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false);
362 if (count > D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT) return check(false); 368 if (count > D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT) return check(false);
363 render_targets_.fill({}); 369 render_targets_.fill({});
364 render_target_count_ = count; 370 render_target_count_ = count;