Merge pull request #1348 from LukeUsher/fix-createtexture-in-vc3

Unset DepthStencil flag on ARGB conversion
This commit is contained in:
Luke Usher 2018-07-25 09:18:53 +01:00 committed by GitHub
commit f5f3375174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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