From 5769717cdc5b8c2943a3d6afcc8674c924899770 Mon Sep 17 00:00:00 2001 From: WinterSnowfall Date: Mon, 14 Oct 2024 12:00:45 +0300 Subject: [PATCH] [d3d8] Strip all d3d9 device caps --- src/d3d8/d3d8_d3d9_util.h | 47 ++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/d3d8/d3d8_d3d9_util.h b/src/d3d8/d3d8_d3d9_util.h index 2d795b70f46..3679e436b80 100644 --- a/src/d3d8/d3d8_d3d9_util.h +++ b/src/d3d8/d3d8_d3d9_util.h @@ -29,32 +29,39 @@ namespace dxvk { // Remove D3D9-specific caps: - pCaps8->Caps2 &= ~D3DCAPS2_CANAUTOGENMIPMAP; + pCaps8->Caps2 &= ~D3DCAPS2_CANAUTOGENMIPMAP; - pCaps8->Caps3 &= ~D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION - & ~D3DCAPS3_COPY_TO_VIDMEM - & ~D3DCAPS3_COPY_TO_SYSTEMMEM; + pCaps8->Caps3 &= ~D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION + & ~D3DCAPS3_COPY_TO_VIDMEM + & ~D3DCAPS3_COPY_TO_SYSTEMMEM; - pCaps8->PrimitiveMiscCaps &= ~D3DPMISCCAPS_INDEPENDENTWRITEMASKS - & ~D3DPMISCCAPS_PERSTAGECONSTANT - & ~D3DPMISCCAPS_FOGANDSPECULARALPHA - & ~D3DPMISCCAPS_SEPARATEALPHABLEND - & ~D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS - & ~D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING - & ~D3DPMISCCAPS_FOGVERTEXCLAMPED - & ~D3DPMISCCAPS_POSTBLENDSRGBCONVERT; + pCaps8->PrimitiveMiscCaps &= ~D3DPMISCCAPS_INDEPENDENTWRITEMASKS + & ~D3DPMISCCAPS_PERSTAGECONSTANT + & ~D3DPMISCCAPS_FOGANDSPECULARALPHA + & ~D3DPMISCCAPS_SEPARATEALPHABLEND + & ~D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS + & ~D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING + & ~D3DPMISCCAPS_FOGVERTEXCLAMPED + & ~D3DPMISCCAPS_POSTBLENDSRGBCONVERT; - pCaps8->RasterCaps &= ~D3DPRASTERCAPS_SCISSORTEST - & ~D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS - & ~D3DPRASTERCAPS_DEPTHBIAS - & ~D3DPRASTERCAPS_MULTISAMPLE_TOGGLE; + pCaps8->RasterCaps &= ~D3DPRASTERCAPS_SCISSORTEST + & ~D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS + & ~D3DPRASTERCAPS_DEPTHBIAS + & ~D3DPRASTERCAPS_MULTISAMPLE_TOGGLE; - pCaps8->SrcBlendCaps &= ~D3DPBLENDCAPS_INVSRCCOLOR2 - & ~D3DPBLENDCAPS_SRCCOLOR2; + pCaps8->SrcBlendCaps &= ~D3DPBLENDCAPS_BLENDFACTOR + & ~D3DPBLENDCAPS_INVSRCCOLOR2 + & ~D3DPBLENDCAPS_SRCCOLOR2; - pCaps8->LineCaps &= ~D3DLINECAPS_ANTIALIAS; + pCaps8->DestBlendCaps &= ~D3DPBLENDCAPS_BLENDFACTOR + & ~D3DPBLENDCAPS_INVSRCCOLOR2 + & ~D3DPBLENDCAPS_SRCCOLOR2; - pCaps8->StencilCaps &= ~D3DSTENCILCAPS_TWOSIDED; + pCaps8->LineCaps &= ~D3DLINECAPS_ANTIALIAS; + + pCaps8->StencilCaps &= ~D3DSTENCILCAPS_TWOSIDED; + + pCaps8->VertexProcessingCaps &= ~D3DVTXPCAPS_TEXGEN_SPHEREMAP; } // (9<-8) D3DD3DPRESENT_PARAMETERS: Returns D3D9's params given an input for D3D8