[4/6] WineD3D: Add GL_NV_fence defines and functions

Stefan Dösinger stefan at codeweavers.com
Wed Feb 28 18:50:43 CST 2007


-------------- next part --------------
From 095772677e5d3e2f1dfd32e23afe9edc0a73c558 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Thu, 1 Mar 2007 01:00:09 +0100
Subject: [PATCH] WineD3D: Add GL_NV_fence defines and functions

---
 dlls/wined3d/directx.c    |    2 ++
 include/wine/wined3d_gl.h |   24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 577e0db..291ac5b 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -787,6 +787,8 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
                     gl_info->vs_nv_version = VS_VERSION_10;
                 TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Vertex Shader support - version=%02x\n", gl_info->vs_nv_version);
                 gl_info->supported[NV_VERTEX_PROGRAM] = TRUE;
+            } else if (strstr(ThisExtn, "GL_NV_fence")) {
+                gl_info->supported[NV_FENCE] = TRUE;
 
             /**
              * ATI
diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h
index fcec035..3d3f22b 100644
--- a/include/wine/wined3d_gl.h
+++ b/include/wine/wined3d_gl.h
@@ -345,6 +345,7 @@ typedef void (APIENTRY * PGLFNGLWEIGHTPOINTERARB) (GLint size, GLenum type, GLsi
 #define GL_MAX_COLOR_ATTACHMENTS_EXT           0x8CDF
 #define GL_MAX_RENDERBUFFER_SIZE_EXT           0x84E8
 #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT   0x0506
+
 #endif
 typedef GLboolean (APIENTRY * PGLFNGLISRENDERBUFFEREXTPROC)(GLuint renderbuffer);
 typedef void (APIENTRY * PGLFNGLBINDRENDERBUFFEREXTPROC)(GLenum target, GLuint renderbuffer);
@@ -1132,6 +1133,20 @@ typedef void (APIENTRY * PGLFNACTIVESTENCILFACEEXTPROC) (GLenum face);
 #endif
 typedef void (APIENTRY * PGLFNSTENCILOPSEPARATEATIPROC) (GLenum, GLenum, GLenum, GLenum);
 typedef void (APIENTRY * PGLFNSTENCILFUNCSEPARATEATIPROC) (GLenum, GLenum, GLint, GLuint);
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV                 0x84F2
+#define GL_FENCE_STATUS_NV                  0x84F3
+#define GL_FENCE_CONDITION_NV               0x84F4
+#endif
+typedef void (APIENTRY * PGLFNGENFENCESNVPROC) (GLsizei, GLuint *);
+typedef void (APIENTRY * PGLFNDELETEFENCESNVPROC) (GLuint, const GLuint *);
+typedef void (APIENTRY * PGLFNSETFENCENVPROC) (GLuint, GLenum);
+typedef GLboolean (APIENTRY * PGLFNTESTFENCENVPROC) (GLuint);
+typedef void (APIENTRY * PGLFNFINISHFENCENVPROC) (GLuint);
+typedef GLboolean (APIENTRY * PGLFNISFENCENVPROC) (GLuint);
+typedef void (APIENTRY * PGLFNGETFENCEIVNVPROC) (GLuint, GLenum, GLint *);
+
 /* GL_VERSION_2_0 */
 #ifndef GL_VERSION_2_0
 #define GL_VERSION_2_0 1
@@ -1488,6 +1503,7 @@ typedef enum _GL_SupportedExt {
   NV_TEXTURE_SHADER2,
   NV_TEXTURE_SHADER3,
   NV_VERTEX_PROGRAM,
+  NV_FENCE,
   /* ATI */
   ATI_SEPARATE_STENCIL,
   ATI_TEXTURE_ENV_COMBINE3,
@@ -1684,6 +1700,14 @@ typedef enum _GL_SupportedExt {
     USE_GL_FUNC(PGLFNCOMBINERPARAMETERINVPROC,                  glCombinerParameteriNV); \
     USE_GL_FUNC(PGLFNCOMBINERPARAMETERIVNVPROC,                 glCombinerParameterivNV); \
     USE_GL_FUNC(PGLFNFINALCOMBINERINPUTNVPROC,                  glFinalCombinerInputNV); \
+    /* GL_NV_fence */ \
+    USE_GL_FUNC(PGLFNGENFENCESNVPROC,                           glGenFencesNV); \
+    USE_GL_FUNC(PGLFNDELETEFENCESNVPROC,                        glDeleteFencesNV); \
+    USE_GL_FUNC(PGLFNSETFENCENVPROC,                            glSetFenceNV); \
+    USE_GL_FUNC(PGLFNTESTFENCENVPROC,                           glTestFenceNV); \
+    USE_GL_FUNC(PGLFNFINISHFENCENVPROC,                         glFinishFenceNV); \
+    USE_GL_FUNC(PGLFNISFENCENVPROC,                             glIsFenceNV); \
+    USE_GL_FUNC(PGLFNGETFENCEIVNVPROC,                          glGetFenceivNV); \
 
 /* OpenGL 2.0 functions */
 #define GL2_FUNCS_GEN \
-- 
1.4.4.3



More information about the wine-patches mailing list