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 11:41:54 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:41:54 -0500
commit6f77e39793b267b9fee3a2adf62cb901759781fd (patch)
tree72ee1257283ec7fbad93fae8ac86123790606ff4 /runtime/shims/d3d12_com.cpp
parentc97e9613879e8acda57aa3dcc85855984f07b7b5 (diff)
parent849f4b7a9c9ccdd921ab34c8afd033b82be501df (diff)
Merge pull request #2112 from SirKingg
Diffstat (limited to 'runtime/shims/d3d12_com.cpp')
-rw-r--r--runtime/shims/d3d12_com.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp
index 663f5f3a5..a614235da 100644
--- a/runtime/shims/d3d12_com.cpp
+++ b/runtime/shims/d3d12_com.cpp
@@ -471,9 +471,19 @@ public:
471 471
472 // The format picks the member of a typeless family to resolve as; the textures' own format is used. 472 // The format picks the member of a typeless family to resolve as; the textures' own format is used.
473 void STDMETHODCALLTYPE ResolveSubresource(ID3D12Resource* dst, UINT dst_subresource, ID3D12Resource* src, 473 void STDMETHODCALLTYPE ResolveSubresource(ID3D12Resource* dst, UINT dst_subresource, ID3D12Resource* src,
474 UINT src_subresource, DXGI_FORMAT) override { 474 UINT src_subresource, DXGI_FORMAT format) override {
475 d3d12_trace::record("ID3D12GraphicsCommandList::ResolveSubresource"); 475 d3d12_trace::record("ID3D12GraphicsCommandList::ResolveSubresource");
476 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false); 476 if (type_ == D3D12_COMMAND_LIST_TYPE_BUNDLE) return check(false);
477 const auto integer_color = [](ID3D12Resource* resource) {
478 if (!resource) return false;
479 const auto desc = resource->GetDesc();
480 return !(desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) &&
481 color_resolve_format_is_integer(desc.Format);
482 };
483 if (color_resolve_format_is_integer(format) || integer_color(dst) || integer_color(src)) {
484 note_once("ResolveSubresource refused: integer colour formats cannot be resolved");
485 return check(false);
486 }
477 check(list_.resolve_subresource({resource_id(dst), dst_subresource, resource_id(src), src_subresource})); 487 check(list_.resolve_subresource({resource_id(dst), dst_subresource, resource_id(src), src_subresource}));
478 } 488 }
479 489