[04/10] wined3d: Add WINED3DVS20 & WINED3DVS20CAPS flags and use
them
H. Verbeet
hverbeet at gmail.com
Thu Feb 15 06:31:47 CST 2007
Changelog:
- Add WINED3DVS20 & WINED3DVS20CAPS flags and use them
-------------- next part --------------
---
dlls/wined3d/directx.c | 10 +++++-----
include/wine/wined3d_caps.h | 9 +++++++++
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index d554ab4..e8043d0 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2300,16 +2300,16 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
if(*pCaps->VertexShaderVersion == WINED3DVS_VERSION(3,0)) {
/* Where possible set the caps based on OpenGL extensions and if they aren't set (in case of software rendering)
use the VS 3.0 from MSDN or else if there's OpenGL spec use a hardcoded value minimum VS3.0 value. */
- *pCaps->VS20Caps.Caps = D3DVS20CAPS_PREDICATION;
- *pCaps->VS20Caps.DynamicFlowControlDepth = D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* VS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */
+ *pCaps->VS20Caps.Caps = WINED3DVS20CAPS_PREDICATION;
+ *pCaps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH; /* VS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */
*pCaps->VS20Caps.NumTemps = max(32, This->gl_info.vs_arb_max_temps);
- *pCaps->VS20Caps.StaticFlowControlDepth = D3DVS20_MAX_STATICFLOWCONTROLDEPTH ; /* level of nesting in loops / if-statements; VS 3.0 requires MAX (4) */
+ *pCaps->VS20Caps.StaticFlowControlDepth = WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH ; /* level of nesting in loops / if-statements; VS 3.0 requires MAX (4) */
*pCaps->MaxVShaderInstructionsExecuted = 65535; /* VS 3.0 needs at least 65535, some cards even use 2^32-1 */
*pCaps->MaxVertexShader30InstructionSlots = max(512, This->gl_info.vs_arb_max_instructions);
} else if(*pCaps->VertexShaderVersion == WINED3DVS_VERSION(2,0)) {
*pCaps->VS20Caps.Caps = 0;
- *pCaps->VS20Caps.DynamicFlowControlDepth = D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH;
+ *pCaps->VS20Caps.DynamicFlowControlDepth = WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH;
*pCaps->VS20Caps.NumTemps = max(12, This->gl_info.vs_arb_max_temps);
*pCaps->VS20Caps.StaticFlowControlDepth = 1;
@@ -2345,7 +2345,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
} else if(*pCaps->PixelShaderVersion == WINED3DPS_VERSION(2,0)) {
/* Below we assume PS2.0 specs, not extended 2.0a(GeforceFX)/2.0b(Radeon R3xx) ones */
*pCaps->PS20Caps.Caps = 0;
- *pCaps->PS20Caps.DynamicFlowControlDepth = 0; /* D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */
+ *pCaps->PS20Caps.DynamicFlowControlDepth = 0; /* WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */
*pCaps->PS20Caps.NumTemps = max(12, This->gl_info.ps_arb_max_temps);
*pCaps->PS20Caps.StaticFlowControlDepth = WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minumum: 1 */
*pCaps->PS20Caps.NumInstructionSlots = WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS; /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */
diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h
index 2814457..78c2f1a 100644
--- a/include/wine/wined3d_caps.h
+++ b/include/wine/wined3d_caps.h
@@ -138,4 +138,13 @@
#define WINED3DTEXOPCAPS_MULTIPLYADD 0x01000000
#define WINED3DTEXOPCAPS_LERP 0x02000000
+#define WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
+#define WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
+#define WINED3DVS20_MAX_NUMTEMPS 32
+#define WINED3DVS20_MIN_NUMTEMPS 12
+#define WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH 4
+#define WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH 1
+
+#define WINED3DVS20CAPS_PREDICATION 0x00000001
+
#endif /* __WINE_WINED3D_CAPS_H */
More information about the wine-patches
mailing list