From eecc6f546c2d1422e187e61708eab3cc88ae9999 Mon Sep 17 00:00:00 2001 From: cdozdil Date: Mon, 9 Nov 2026 17:51:10 +0300 Subject: [PATCH] Keep the real AMD vendor for FFX upscaler and FG support checks --- OptiScaler/spoofing/Dxgi_Spoofing.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OptiScaler/spoofing/Dxgi_Spoofing.cpp b/OptiScaler/spoofing/Dxgi_Spoofing.cpp index b732d2fb..c89e1cd7 100644 --- a/OptiScaler/spoofing/Dxgi_Spoofing.cpp +++ b/OptiScaler/spoofing/Dxgi_Spoofing.cpp @@ -161,9 +161,12 @@ HRESULT DxgiSpoofing::hkGetDesc1(IDXGIAdapter1* This, DXGI_ADAPTER_DESC1* pDesc) auto targetDeviceIdMatches = !Config::Instance()->TargetDeviceId.has_value() || Config::Instance()->TargetDeviceId.value() == pDesc->DeviceId; - // amdxcffx64 needs to see AMD vendor id + // amdxcffx64 and FFX's FSR4 / ML FG support checks need to see AMD vendor id auto isFfxDriver = caller.starts_with("amdxcffx64"); - auto keepRealAmd = isFfxDriver && pDesc->VendorId == VendorId::AMD; + auto isFfxUpscaler = isFfxDriver || caller.starts_with("amd_fidelityfx_upscaler_dx12") || + FfxApiProxy::IsCustomUpscalerModule(Util::GetCallerModule(_ReturnAddress())); + auto isFfxFg = caller.starts_with("amd_fidelityfx_framegeneration_dx12"); + auto keepRealAmd = (isFfxUpscaler || isFfxFg) && pDesc->VendorId == VendorId::AMD; if (pDesc->VendorId != VendorId::Microsoft && targetVendorIdMatches && targetDeviceIdMatches && !keepRealAmd && Config::Instance()->DxgiSpoofing.value_or_default() && !SkipSpoofing()) @@ -180,8 +183,7 @@ HRESULT DxgiSpoofing::hkGetDesc1(IDXGIAdapter1* This, DXGI_ADAPTER_DESC1* pDesc) #endif } - if (isFfxDriver || caller.starts_with("amd_fidelityfx_upscaler_dx12") || - FfxApiProxy::IsCustomUpscalerModule(Util::GetCallerModule(_ReturnAddress()))) + if (isFfxUpscaler) { const auto primaryGpu = IdentifyGpu::getPrimaryGpu();