[PATCH 1/5] d3d9: Limit VS/PS reported version. (try 2)

Matteo Bruni mbruni at codeweavers.com
Tue Oct 25 09:58:43 CDT 2011


Thank you Henri, resending now, hopefully with the code in the right place...
---
 dlls/d3d9/directx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 148b9b7..4099a99 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -381,6 +381,11 @@ void filter_caps(D3DCAPS9* pCaps)
 
     pCaps->MaxVertexShaderConst = min(D3D9_MAX_VERTEX_SHADER_CONSTANTF, pCaps->MaxVertexShaderConst);
     pCaps->NumSimultaneousRTs = min(D3D9_MAX_SIMULTANEOUS_RENDERTARGETS, pCaps->NumSimultaneousRTs);
+
+    if (pCaps->PixelShaderVersion > D3DPS_VERSION(3,0))
+        pCaps->PixelShaderVersion = D3DPS_VERSION(3,0);
+    if (pCaps->VertexShaderVersion > D3DVS_VERSION(3,0))
+        pCaps->VertexShaderVersion = D3DVS_VERSION(3,0);
 }
 
 static HRESULT WINAPI IDirect3D9Impl_GetDeviceCaps(IDirect3D9Ex *iface, UINT Adapter,
-- 
1.7.3.4




More information about the wine-patches mailing list