1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

Set ColorKeyMethod=auto to alphatest for igd9trinity32.dll

Latest driver crashes when native texture color keying is used.
This commit is contained in:
narzoul 2024-04-14 12:35:25 +02:00
parent 32d36fb5da
commit 60c31654d1
3 changed files with 13 additions and 1 deletions

View File

@ -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() &&

View File

@ -25,6 +25,7 @@ namespace D3dDdi
DWORD supportedZBufferBitDepths;
bool isMsaaDepthResolveSupported;
bool isD3D9On12;
bool isTrinity;
};
Adapter(const D3DDDIARG_OPENADAPTER& data);

View File

@ -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)