Unset DepthStencil flag on ARGB conversion: ARGB isn't a valid stencil format

This commit is contained in:
Luke Usher 2018-07-24 23:31:19 +01:00
parent 1e52685729
commit 5056f97b8f
1 changed files with 4 additions and 0 deletions

View File

@ -4877,6 +4877,10 @@ void CreateHostResource(XTL::X_D3DResource *pResource, DWORD D3DUsage, int iText
if (EmuXBFormatRequiresConversionToARGB(X_Format)) {
bConvertToARGB = true;
PCFormat = XTL::D3DFMT_A8R8G8B8;
// Unset D3DUSAGE_DEPTHSTENCIL: It's not possible for ARGB textures to be depth stencils
// Fixes CreateTexture error in Virtua Cop 3 (Chihiro)
D3DUsage &= ~D3DUSAGE_DEPTHSTENCIL;
}
else {
// TODO : Nuance the following, because the Direct3D 8 docs states