Skip to content

Commit

Permalink
DX12: Fix graphical corruption/crashes caused by bad frames_in_flight
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 29, 2023
1 parent f39ab29 commit ad3dad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/REFramework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ bool REFramework::init_d3d12() {
auto& bb = m_d3d12.get_rt(D3D12::RTV::BACKBUFFER_0);
auto bb_desc = bb->GetDesc();

if (!ImGui_ImplDX12_Init(device, 1, bb_desc.Format, m_d3d12.srv_desc_heap.Get(),
if (!ImGui_ImplDX12_Init(device, 3, bb_desc.Format, m_d3d12.srv_desc_heap.Get(),
m_d3d12.get_cpu_srv(device, D3D12::SRV::IMGUI_FONT_BACKBUFFER), m_d3d12.get_gpu_srv(device, D3D12::SRV::IMGUI_FONT_BACKBUFFER))) {
spdlog::error("[D3D12] Failed to initialize ImGui.");
return false;
Expand All @@ -1869,7 +1869,7 @@ bool REFramework::init_d3d12() {
auto& bb_vr = m_d3d12.get_rt(D3D12::RTV::IMGUI);
auto bb_vr_desc = bb_vr->GetDesc();

if (!ImGui_ImplDX12_Init(device, 1, bb_vr_desc.Format, m_d3d12.srv_desc_heap.Get(),
if (!ImGui_ImplDX12_Init(device, 3, bb_vr_desc.Format, m_d3d12.srv_desc_heap.Get(),
m_d3d12.get_cpu_srv(device, D3D12::SRV::IMGUI_FONT_VR), m_d3d12.get_gpu_srv(device, D3D12::SRV::IMGUI_FONT_VR))) {
spdlog::error("[D3D12] Failed to initialize ImGui.");
return false;
Expand Down

0 comments on commit ad3dad5

Please sign in to comment.