[PATCH 1/5] wined3d: Properly enable / disable register combiners.

Henri Verbeet hverbeet at codeweavers.com
Thu Jan 19 17:36:25 CST 2012


---
 dlls/wined3d/nvidia_texture_shader.c |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c
index dc3f8b9..1fef980 100644
--- a/dlls/wined3d/nvidia_texture_shader.c
+++ b/dlls/wined3d/nvidia_texture_shader.c
@@ -629,15 +629,31 @@ static void nvrc_texfactor(struct wined3d_context *context, const struct wined3d
 }
 
 /* Context activation is done by the caller. */
-static void nvrc_enable(BOOL enable) {}
+static void nvrc_enable(BOOL enable)
+{
+    if (enable)
+    {
+        glEnable(GL_REGISTER_COMBINERS_NV);
+        checkGLcall("glEnable(GL_REGISTER_COMBINERS_NV)");
+    }
+    else
+    {
+        glDisable(GL_REGISTER_COMBINERS_NV);
+        checkGLcall("glDisable(GL_REGISTER_COMBINERS_NV)");
+    }
+}
 
 /* Context activation and GL locking are done by the caller. */
 static void nvts_enable(BOOL enable)
 {
-    if(enable) {
+    nvrc_enable(enable);
+    if (enable)
+    {
         glEnable(GL_TEXTURE_SHADER_NV);
         checkGLcall("glEnable(GL_TEXTURE_SHADER_NV)");
-    } else {
+    }
+    else
+    {
         glDisable(GL_TEXTURE_SHADER_NV);
         checkGLcall("glDisable(GL_TEXTURE_SHADER_NV)");
     }
-- 
1.7.3.4




More information about the wine-patches mailing list