From da2b4286f4539ccc041431731af265329459405a Mon Sep 17 00:00:00 2001 From: FakeMichau <49685661+FakeMichau@users.noreply.github.com> Date: Sat, 15 Aug 2026 00:21:38 +0200 Subject: [PATCH] Add HDR16 check to the menu for DLSSG --- OptiScaler/menu/menu_common.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/OptiScaler/menu/menu_common.cpp b/OptiScaler/menu/menu_common.cpp index 4dd30130..f5abfe66 100644 --- a/OptiScaler/menu/menu_common.cpp +++ b/OptiScaler/menu/menu_common.cpp @@ -3800,8 +3800,8 @@ void MenuCommon::RenderFrameGenerationRuntimeSettings(RenderMenuContext& ctx) if (!ignoreChecks && state.isHdrActive) { - if (state.currentSwapchainDesc.BufferDesc.Format > 0 && - state.currentSwapchainDesc.BufferDesc.Format < 15) + if (state.currentSwapchainDesc.BufferDesc.Format >= DXGI_FORMAT_R32G32B32A32_TYPELESS && + state.currentSwapchainDesc.BufferDesc.Format <= DXGI_FORMAT_R16G16B16A16_SINT) { cantActivate = true; ImGui::TextColored(toneMapColor(ImVec4(1.0f, 0.0f, 0.0f, 1.f)), "XeFG only supports HDR10"); @@ -3961,9 +3961,17 @@ void MenuCommon::RenderFrameGenerationRuntimeSettings(RenderMenuContext& ctx) if (state.activeFgOutput == FGOutput::DLSSG && state.activeFgInput != FGInput::NoFG && state.currentFGSwapchain != nullptr && StreamlineProxy::LoadStreamline()) { - ImGui::SeparatorText("Frame Generation (DLSSG)"); + if (state.activeFgNvngx == FGNvngxReplacement::None && state.isHdrActive) + { + if (state.currentSwapchainDesc.BufferDesc.Format >= DXGI_FORMAT_R32G32B32A32_TYPELESS && + state.currentSwapchainDesc.BufferDesc.Format <= DXGI_FORMAT_R16G16B16A16_SINT) + { + ImGui::TextColored(toneMapColor(ImVec4(1.0f, 0.0f, 0.0f, 1.f)), "DLSSG only supports HDR10"); + } + } + ImGui::Text("Current DLSSG state:"); ImGui::SameLine(); if (auto count = state.dlssgDetectedInterpolationCount; count > 0)