=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Only set GL_DEPTH_TEXTURE_MODE_ARB if ARB_depth_texture is supported.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 23 09:57:28 CDT 2015


Module: wine
Branch: master
Commit: d05736d2d981d87eb3c6162fbd58dbeee3b22bf9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d05736d2d981d87eb3c6162fbd58dbeee3b22bf9

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Thu Oct 22 17:37:50 2015 +0200

wined3d: Only set GL_DEPTH_TEXTURE_MODE_ARB if ARB_depth_texture is supported.

Fixes a GL error on r200.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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. */




More information about the wine-cvs mailing list