From a1fb735fde09bc5037f89090967b71dba641bb96 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 12 Dec 2022 13:11:13 +1000 Subject: [PATCH] GS/DX12: Ensure utility root signature is set before constants Fixes a validation error when using shade boost. --- pcsx2/GS/Renderers/DX12/GSDevice12.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index 8c040fd6c5..6927b88734 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -770,6 +770,7 @@ void GSDevice12::DoShadeBoost(GSTexture* sTex, GSTexture* dTex, const float para const GSVector4i dRect(0, 0, dTex->GetWidth(), dTex->GetHeight()); EndRenderPass(); OMSetRenderTargets(dTex, nullptr, dRect); + SetUtilityRootSignature(); SetUtilityTexture(sTex, m_point_sampler_cpu); BeginRenderPass(D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE, D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS); @@ -787,6 +788,7 @@ void GSDevice12::DoFXAA(GSTexture* sTex, GSTexture* dTex) const GSVector4i dRect(0, 0, dTex->GetWidth(), dTex->GetHeight()); EndRenderPass(); OMSetRenderTargets(dTex, nullptr, dRect); + SetUtilityRootSignature(); SetUtilityTexture(sTex, m_linear_sampler_cpu); BeginRenderPass(D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE, D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS);