From 592543c47f5ff736b13826f6aafc6721aae2de8d Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Mon, 17 Aug 2015 00:12:30 +0200 Subject: [PATCH] d3d12: Fix wrong index being used for sampler descriptor heap Fix a crash in Disgaea 3 with debug output enabled. --- rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp index efc329b92b..a29c92b331 100644 --- a/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp +++ b/rpcs3/Emu/RSX/D3D12/D3D12GSRender.cpp @@ -641,7 +641,7 @@ void D3D12GSRender::Draw() getCurrentResourceStorage().m_currentCommandList->SetDescriptorHeaps(1, getCurrentResourceStorage().m_samplerDescriptorHeap[getCurrentResourceStorage().m_samplerDescriptorHeapIndex].GetAddressOf()); getCurrentResourceStorage().m_currentCommandList->SetGraphicsRootDescriptorTable(3, getGPUDescriptorHandle(getCurrentResourceStorage().m_samplerDescriptorHeap[getCurrentResourceStorage().m_samplerDescriptorHeapIndex].Get(), - getCurrentResourceStorage().m_currentTextureIndex * g_descriptorStrideSamplers) + getCurrentResourceStorage().m_currentSamplerIndex * g_descriptorStrideSamplers) ); getCurrentResourceStorage().m_currentTextureIndex += usedTexture;