Skip to content

Commit

Permalink
GS/DX12: Fix incorrect resource state of ImGui font
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek authored and JordanTheToaster committed May 12, 2024
1 parent 20dbcfd commit 2294994
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pcsx2/GS/Renderers/DX12/GSDevice12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2019,9 +2019,14 @@ void GSDevice12::RenderImGui()

SetScissor(GSVector4i(clip));

// Since we don't have the GSTexture...
GSTexture12* tex = static_cast<GSTexture12*>(pcmd->GetTexID());
D3D12DescriptorHandle handle = tex ? tex->GetSRVDescriptor() : m_null_texture->GetSRVDescriptor();
D3D12DescriptorHandle handle = m_null_texture->GetSRVDescriptor();
if (tex)
{
tex->TransitionToState(D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
handle = tex->GetSRVDescriptor();
}

if (m_utility_texture_cpu != handle)
{
m_utility_texture_cpu = handle;
Expand Down

0 comments on commit 2294994

Please sign in to comment.