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@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Stefan Dösinger 2015-10-22 17:37:50 +02:00 committed by Alexandre Julliard
parent e0b1e8154d
commit d05736d2d9
1 changed files with 4 additions and 1 deletions

View File

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