[PATCH] wined3d: Only set GL_DEPTH_TEXTURE_MODE_ARB if ARB_depth_texture is supported.

Stefan Dösinger stefan at codeweavers.com
Thu Oct 22 10:37:50 CDT 2015


Fixes a GL error on r200.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
---
 dlls/wined3d/texture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 02cb9b9..a6d26ef 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -254,8 +254,11 @@ void wined3d_texture_bind(struct wined3d_texture *texture,
         gl_tex->sampler_desc.mip_filter = WINED3D_TEXF_NONE;
     }
 
-    if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
+    if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT] && gl_info->supported[ARB_DEPTH_TEXTURE])
+    {
         gl_info->gl_ops.gl.p_glTexParameteri(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY);
+        checkGLcall("glTexParameteri(GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)");
+    }
 }
 
 /* Context activation is done by the caller. */
-- 
2.4.10




More information about the wine-patches mailing list