From 359234080a8d3db3f300f44b438b269b5099021d Mon Sep 17 00:00:00 2001 From: Connor McLaughlin <stenzek@gmail.com> Date: Thu, 6 Aug 2020 23:19:18 +1000 Subject: [PATCH] D3D11: Set GS to null when restoring state Fixes the D3D11 renderer being broken on RetroArch due to it leaving a geometry shader bound. --- src/core/gpu_hw_d3d11.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/gpu_hw_d3d11.cpp b/src/core/gpu_hw_d3d11.cpp index 5882994fc..da9eeb83d 100644 --- a/src/core/gpu_hw_d3d11.cpp +++ b/src/core/gpu_hw_d3d11.cpp @@ -110,6 +110,7 @@ void GPU_HW_D3D11::RestoreGraphicsAPIState() m_context->IASetVertexBuffers(0, 1, m_vertex_stream_buffer.GetD3DBufferArray(), &stride, &offset); m_context->IASetInputLayout(m_batch_input_layout.Get()); m_context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); + m_context->GSSetShader(nullptr, nullptr, 0); m_context->PSSetShaderResources(0, 1, m_vram_read_texture.GetD3DSRVArray()); m_context->PSSetSamplers(0, 1, m_point_sampler_state.GetAddressOf()); m_context->OMSetRenderTargets(1, m_vram_texture.GetD3DRTVArray(), m_vram_depth_view.Get());