From 8f2a943589a7d85238973c26811eef2cd63dd4e1 Mon Sep 17 00:00:00 2001 From: FakeMichau <49685661+FakeMichau@users.noreply.github.com> Date: Fri, 23 Oct 2026 12:02:49 +0200 Subject: [PATCH] Fix dxgi spoofing for amdxcffx64 --- OptiScaler/spoofing/Dxgi_Spoofing.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OptiScaler/spoofing/Dxgi_Spoofing.cpp b/OptiScaler/spoofing/Dxgi_Spoofing.cpp index d827f622..d3296a5f 100644 --- a/OptiScaler/spoofing/Dxgi_Spoofing.cpp +++ b/OptiScaler/spoofing/Dxgi_Spoofing.cpp @@ -160,7 +160,11 @@ HRESULT DxgiSpoofing::hkGetDesc1(IDXGIAdapter1* This, DXGI_ADAPTER_DESC1* pDesc) auto targetDeviceIdMatches = !Config::Instance()->TargetDeviceId.has_value() || Config::Instance()->TargetDeviceId.value() == pDesc->DeviceId; - if (pDesc->VendorId != VendorId::Microsoft && targetVendorIdMatches && targetDeviceIdMatches && + // amdxcffx64 needs to see AMD vendor id + auto isFfxDriver = caller.starts_with("amdxcffx64"); + auto keepRealAmd = isFfxDriver && pDesc->VendorId == VendorId::AMD; + + if (pDesc->VendorId != VendorId::Microsoft && targetVendorIdMatches && targetDeviceIdMatches && !keepRealAmd && Config::Instance()->DxgiSpoofing.value_or_default() && !SkipSpoofing()) { pDesc->VendorId = Config::Instance()->SpoofedVendorId.value_or_default(); @@ -175,7 +179,7 @@ HRESULT DxgiSpoofing::hkGetDesc1(IDXGIAdapter1* This, DXGI_ADAPTER_DESC1* pDesc) #endif } - if (caller.starts_with("amdxcffx64") || caller.starts_with("amd_fidelityfx_upscaler_dx12")) + if (isFfxDriver || caller.starts_with("amd_fidelityfx_upscaler_dx12")) { const auto primaryGpu = IdentifyGpu::getPrimaryGpu();