GS/DX12: Fix incorrect resource state of ImGui font

This commit is contained in:
Stenzek 2024-05-12 13:04:11 +10:00 committed by Connor McLaughlin
parent 20dbcfd2eb
commit 0aea297b73
1 changed files with 7 additions and 2 deletions

View File

@ -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;