diff --git a/DDrawCompat/D3dDdi/Adapter.cpp b/DDrawCompat/D3dDdi/Adapter.cpp index cdd820b..52aa38a 100644 --- a/DDrawCompat/D3dDdi/Adapter.cpp +++ b/DDrawCompat/D3dDdi/Adapter.cpp @@ -102,6 +102,10 @@ namespace D3dDdi auto d3d9on12 = GetModuleHandle("d3d9on12"); info.isD3D9On12 = d3d9on12 && d3d9on12 == Compat::getModuleHandleFromAddress(m_origVtable.pfnGetCaps); + + auto trinity = GetModuleHandle("igd9trinity32"); + info.isTrinity = trinity && trinity == Compat::getModuleHandleFromAddress(m_origVtable.pfnGetCaps); + info.isMsaaDepthResolveSupported = !info.isD3D9On12 && info.formatOps.find(FOURCC_RESZ) != info.formatOps.end() && diff --git a/DDrawCompat/D3dDdi/Adapter.h b/DDrawCompat/D3dDdi/Adapter.h index df88c15..10adfb1 100644 --- a/DDrawCompat/D3dDdi/Adapter.h +++ b/DDrawCompat/D3dDdi/Adapter.h @@ -25,6 +25,7 @@ namespace D3dDdi DWORD supportedZBufferBitDepths; bool isMsaaDepthResolveSupported; bool isD3D9On12; + bool isTrinity; }; Adapter(const D3DDDIARG_OPENADAPTER& data); diff --git a/DDrawCompat/D3dDdi/Device.cpp b/DDrawCompat/D3dDdi/Device.cpp index 6080b14..30f97ee 100644 --- a/DDrawCompat/D3dDdi/Device.cpp +++ b/DDrawCompat/D3dDdi/Device.cpp @@ -105,6 +105,13 @@ namespace D3dDdi UINT Device::detectColorKeyMethod() { + LOG_FUNC("Device::detectColorKeyMethod"); + if (m_adapter.getInfo().isTrinity) + { + LOG_ONCE("Auto-detected ColorKeyMethod: alphatest"); + return LOG_RESULT(Config::Settings::ColorKeyMethod::ALPHATEST); + } + auto method = Config::Settings::ColorKeyMethod::NONE; auto& repo = getRepo(); @@ -148,7 +155,7 @@ namespace D3dDdi LOG_ONCE("Auto-detected ColorKeyMethod: " << (Config::Settings::ColorKeyMethod::NATIVE == method ? "native" : "alphatest")); } - return method; + return LOG_RESULT(method); } Device* Device::findDeviceByResource(HANDLE resource)