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:
parent
32d36fb5da
commit
60c31654d1
@ -102,6 +102,10 @@ namespace D3dDdi
|
|||||||
|
|
||||||
auto d3d9on12 = GetModuleHandle("d3d9on12");
|
auto d3d9on12 = GetModuleHandle("d3d9on12");
|
||||||
info.isD3D9On12 = d3d9on12 && d3d9on12 == Compat::getModuleHandleFromAddress(m_origVtable.pfnGetCaps);
|
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.isMsaaDepthResolveSupported =
|
||||||
!info.isD3D9On12 &&
|
!info.isD3D9On12 &&
|
||||||
info.formatOps.find(FOURCC_RESZ) != info.formatOps.end() &&
|
info.formatOps.find(FOURCC_RESZ) != info.formatOps.end() &&
|
||||||
|
@ -25,6 +25,7 @@ namespace D3dDdi
|
|||||||
DWORD supportedZBufferBitDepths;
|
DWORD supportedZBufferBitDepths;
|
||||||
bool isMsaaDepthResolveSupported;
|
bool isMsaaDepthResolveSupported;
|
||||||
bool isD3D9On12;
|
bool isD3D9On12;
|
||||||
|
bool isTrinity;
|
||||||
};
|
};
|
||||||
|
|
||||||
Adapter(const D3DDDIARG_OPENADAPTER& data);
|
Adapter(const D3DDDIARG_OPENADAPTER& data);
|
||||||
|
@ -105,6 +105,13 @@ namespace D3dDdi
|
|||||||
|
|
||||||
UINT Device::detectColorKeyMethod()
|
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 method = Config::Settings::ColorKeyMethod::NONE;
|
||||||
|
|
||||||
auto& repo = getRepo();
|
auto& repo = getRepo();
|
||||||
@ -148,7 +155,7 @@ namespace D3dDdi
|
|||||||
LOG_ONCE("Auto-detected ColorKeyMethod: " <<
|
LOG_ONCE("Auto-detected ColorKeyMethod: " <<
|
||||||
(Config::Settings::ColorKeyMethod::NATIVE == method ? "native" : "alphatest"));
|
(Config::Settings::ColorKeyMethod::NATIVE == method ? "native" : "alphatest"));
|
||||||
}
|
}
|
||||||
return method;
|
return LOG_RESULT(method);
|
||||||
}
|
}
|
||||||
|
|
||||||
Device* Device::findDeviceByResource(HANDLE resource)
|
Device* Device::findDeviceByResource(HANDLE resource)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user