mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-11-22 21:57:39 +00:00
Keep the real AMD vendor for FFX upscaler and FG support checks
This commit is contained in:
1 parent
b1d96e8fff
commit
eecc6f546c
1 file changed
+6
-4
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user