[09/10] wined3d: Add WINED3DPCMPCAPS flags and use them

H. Verbeet hverbeet at gmail.com
Wed Feb 14 16:31:11 CST 2007


Changelog:
  - Add WINED3DPCMPCAPS flags and use them
-------------- next part --------------
---

 dlls/wined3d/directx.c      |   32 ++++++++++++++++----------------
 include/wine/wined3d_caps.h |    9 +++++++++
 2 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index cc1e0f6..1f61ad8 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1923,14 +1923,14 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
 			   WINED3DPRASTERCAPS_ZBUFFERLESSHSR
 			   WINED3DPRASTERCAPS_WBUFFER */
 
-    *pCaps->ZCmpCaps = D3DPCMPCAPS_ALWAYS       |
-                       D3DPCMPCAPS_EQUAL        |
-                       D3DPCMPCAPS_GREATER      |
-                       D3DPCMPCAPS_GREATEREQUAL |
-                       D3DPCMPCAPS_LESS         |
-                       D3DPCMPCAPS_LESSEQUAL    |
-                       D3DPCMPCAPS_NEVER        |
-                       D3DPCMPCAPS_NOTEQUAL;
+    *pCaps->ZCmpCaps = WINED3DPCMPCAPS_ALWAYS       |
+                       WINED3DPCMPCAPS_EQUAL        |
+                       WINED3DPCMPCAPS_GREATER      |
+                       WINED3DPCMPCAPS_GREATEREQUAL |
+                       WINED3DPCMPCAPS_LESS         |
+                       WINED3DPCMPCAPS_LESSEQUAL    |
+                       WINED3DPCMPCAPS_NEVER        |
+                       WINED3DPCMPCAPS_NOTEQUAL;
 
     *pCaps->SrcBlendCaps  = WINED3DPBLENDCAPS_BLENDFACTOR     |
                             WINED3DPBLENDCAPS_BOTHINVSRCALPHA |
@@ -1962,14 +1962,14 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
                             WINED3DPBLENDCAPS_SRCCOLOR        |
                             WINED3DPBLENDCAPS_ZERO;
 
-    *pCaps->AlphaCmpCaps = D3DPCMPCAPS_ALWAYS       |
-                           D3DPCMPCAPS_EQUAL        |
-                           D3DPCMPCAPS_GREATER      |
-                           D3DPCMPCAPS_GREATEREQUAL |
-                           D3DPCMPCAPS_LESS         |
-                           D3DPCMPCAPS_LESSEQUAL    |
-                           D3DPCMPCAPS_NEVER        |
-                           D3DPCMPCAPS_NOTEQUAL;
+    *pCaps->AlphaCmpCaps = WINED3DPCMPCAPS_ALWAYS       |
+                           WINED3DPCMPCAPS_EQUAL        |
+                           WINED3DPCMPCAPS_GREATER      |
+                           WINED3DPCMPCAPS_GREATEREQUAL |
+                           WINED3DPCMPCAPS_LESS         |
+                           WINED3DPCMPCAPS_LESSEQUAL    |
+                           WINED3DPCMPCAPS_NEVER        |
+                           WINED3DPCMPCAPS_NOTEQUAL;
 
     *pCaps->ShadeCaps     = WINED3DPSHADECAPS_SPECULARGOURAUDRGB |
                             WINED3DPSHADECAPS_COLORGOURAUDRGB    |
diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h
index 98a655d..68f80bc 100644
--- a/include/wine/wined3d_caps.h
+++ b/include/wine/wined3d_caps.h
@@ -34,6 +34,15 @@
 #define WINED3DPBLENDCAPS_BOTHINVSRCALPHA                   0x00001000
 #define WINED3DPBLENDCAPS_BLENDFACTOR                       0x00002000
 
+#define WINED3DPCMPCAPS_NEVER                               0x00000001
+#define WINED3DPCMPCAPS_LESS                                0x00000002
+#define WINED3DPCMPCAPS_EQUAL                               0x00000004
+#define WINED3DPCMPCAPS_LESSEQUAL                           0x00000008
+#define WINED3DPCMPCAPS_GREATER                             0x00000010
+#define WINED3DPCMPCAPS_NOTEQUAL                            0x00000020
+#define WINED3DPCMPCAPS_GREATEREQUAL                        0x00000040
+#define WINED3DPCMPCAPS_ALWAYS                              0x00000080
+
 #define WINED3DPMISCCAPS_MASKZ                              0x00000002
 #define WINED3DPMISCCAPS_LINEPATTERNREP                     0x00000004
 #define WINED3DPMISCCAPS_CULLNONE                           0x00000010


More information about the wine-patches mailing list