From 594f7fd8825756b8eda0fb60b2738f5fd3860d67 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Thu, 15 Feb 2007 13:31:41 +0100 Subject: [PATCH] wined3d: Add WINED3DPS20 & WINED3DPS20CAPS flags and use them. --- dlls/wined3d/directx.c | 20 ++++++++++---------- include/wine/wined3d_caps.h | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 97b2f9dc06..d554ab47ec 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2330,15 +2330,15 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, use the PS 3.0 from MSDN or else if there's OpenGL spec use a hardcoded value minimum PS 3.0 value. */ /* Caps is more or less undocumented on MSDN but it appears to be used for PS20Caps based on results from R9600/FX5900/Geforce6800 cards from Windows */ - *pCaps->PS20Caps.Caps = D3DPS20CAPS_ARBITRARYSWIZZLE | - D3DPS20CAPS_GRADIENTINSTRUCTIONS | - D3DPS20CAPS_PREDICATION | - D3DPS20CAPS_NODEPENDENTREADLIMIT | - D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT; - *pCaps->PS20Caps.DynamicFlowControlDepth = D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */ + *pCaps->PS20Caps.Caps = WINED3DPS20CAPS_ARBITRARYSWIZZLE | + WINED3DPS20CAPS_GRADIENTINSTRUCTIONS | + WINED3DPS20CAPS_PREDICATION | + WINED3DPS20CAPS_NODEPENDENTREADLIMIT | + WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT; + *pCaps->PS20Caps.DynamicFlowControlDepth = WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */ *pCaps->PS20Caps.NumTemps = max(32, This->gl_info.ps_arb_max_temps); - *pCaps->PS20Caps.StaticFlowControlDepth = D3DPS20_MAX_STATICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_STATICFLOWCONTROLDEPTH (4) */ - *pCaps->PS20Caps.NumInstructionSlots = D3DPS20_MAX_NUMINSTRUCTIONSLOTS; /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */ + *pCaps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH; /* PS 3.0 requires MAX_STATICFLOWCONTROLDEPTH (4) */ + *pCaps->PS20Caps.NumInstructionSlots = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS; /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */ *pCaps->MaxPShaderInstructionsExecuted = 65535; *pCaps->MaxPixelShader30InstructionSlots = max(D3DMIN30SHADERINSTRUCTIONS, This->gl_info.ps_arb_max_instructions); @@ -2347,8 +2347,8 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, *pCaps->PS20Caps.Caps = 0; *pCaps->PS20Caps.DynamicFlowControlDepth = 0; /* D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */ *pCaps->PS20Caps.NumTemps = max(12, This->gl_info.ps_arb_max_temps); - *pCaps->PS20Caps.StaticFlowControlDepth = D3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minumum: 1 */ - *pCaps->PS20Caps.NumInstructionSlots = D3DPS20_MIN_NUMINSTRUCTIONSLOTS; /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */ + *pCaps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minumum: 1 */ + *pCaps->PS20Caps.NumInstructionSlots = WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS; /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */ *pCaps->MaxPShaderInstructionsExecuted = 512; /* Minimum value, a GeforceFX uses 1024 */ *pCaps->MaxPixelShader30InstructionSlots = 0; diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 1a94b2706d..281445770f 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -79,6 +79,21 @@ #define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000 #define WINED3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000 +#define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24 +#define WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0 +#define WINED3DPS20_MAX_NUMTEMPS 32 +#define WINED3DPS20_MIN_NUMTEMPS 12 +#define WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH 4 +#define WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH 0 +#define WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS 512 +#define WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS 96 + +#define WINED3DPS20CAPS_ARBITRARYSWIZZLE 0x00000001 +#define WINED3DPS20CAPS_GRADIENTINSTRUCTIONS 0x00000002 +#define WINED3DPS20CAPS_PREDICATION 0x00000004 +#define WINED3DPS20CAPS_NODEPENDENTREADLIMIT 0x00000008 +#define WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT 0x00000010 + #define WINED3DPTADDRESSCAPS_WRAP 0x00000001 #define WINED3DPTADDRESSCAPS_MIRROR 0x00000002 #define WINED3DPTADDRESSCAPS_CLAMP 0x00000004 -- 2.32.0.93.g670b81a890