[PATCH 1/5] wined3d: Only set TEXTURE_COMPARE_FUNC when ARB_depth_texture is supported.
Henri Verbeet
hverbeet at gmail.com
Mon Mar 23 13:14:42 CDT 2015
On 23 March 2015 at 18:59, Stefan Dösinger <stefan at codeweavers.com> wrote:
> - if (desc->compare)
> - GL_EXTCALL(glSamplerParameteri(sampler->name, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE));
> - GL_EXTCALL(glSamplerParameteri(sampler->name, GL_TEXTURE_COMPARE_FUNC,
> - wined3d_gl_compare_func(desc->comparison_func)));
> + if (gl_info->supported[ARB_DEPTH_TEXTURE])
> + {
> + if (desc->compare)
> + GL_EXTCALL(glSamplerParameteri(sampler->name, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE));
> + GL_EXTCALL(glSamplerParameteri(sampler->name, GL_TEXTURE_COMPARE_FUNC,
> + wined3d_gl_compare_func(desc->comparison_func)));
> + }
Does the driver generate GL errors without this? The way I read the
ARB_sampler_objects spec that would a driver bug. (Specifically, it
states that TEXTURE_COMPARE_MODE/TEXTURE_COMPARE_FUNC are accepted by
SamplerParameter(), without qualifying that with a dependency on
ARB_depth_texture. I guess a driver that doesn't support depth
textures can essentially just ignore the texture compare
mode/function, since it would never encounter a texture it would apply
to.)
More information about the wine-devel
mailing list