Skip to content

Commit

Permalink
DX12: Fix graphical corruption from frames_in_flight mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 29, 2023
1 parent cf3a8fb commit 52d8d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Framework.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ bool Framework::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 @@ -1825,7 +1825,7 @@ bool Framework::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 52d8d31

Please sign in to comment.