From b72b4da8fb035756ed33a317efa15a49d843777a Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Thu, 11 Aug 2022 20:52:26 -0400 Subject: [PATCH] Fix overlay gpu memory leak in some games. --- ImGui/backends/imgui_impl_dx10.cpp | 2 +- ImGui/backends/imgui_impl_dx11.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ImGui/backends/imgui_impl_dx10.cpp b/ImGui/backends/imgui_impl_dx10.cpp index 085eb22..dd91ff1 100644 --- a/ImGui/backends/imgui_impl_dx10.cpp +++ b/ImGui/backends/imgui_impl_dx10.cpp @@ -346,7 +346,7 @@ static void ImGui_ImplDX10_CreateFontsTexture() desc.MipLODBias = 0.f; desc.ComparisonFunc = D3D10_COMPARISON_ALWAYS; desc.MinLOD = 0.f; - desc.MaxLOD = 0.f; + desc.MaxLOD = D3D10_FLOAT32_MAX; bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler); } } diff --git a/ImGui/backends/imgui_impl_dx11.cpp b/ImGui/backends/imgui_impl_dx11.cpp index b5e878d..4674b25 100644 --- a/ImGui/backends/imgui_impl_dx11.cpp +++ b/ImGui/backends/imgui_impl_dx11.cpp @@ -358,7 +358,7 @@ static void ImGui_ImplDX11_CreateFontsTexture() desc.MipLODBias = 0.f; desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS; desc.MinLOD = 0.f; - desc.MaxLOD = 0.f; + desc.MaxLOD = D3D11_FLOAT32_MAX; bd->pd3dDevice->CreateSamplerState(&desc, &bd->pFontSampler); } }