On 23 March 2015 at 18:59, Stefan Dösinger stefan@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.)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 03/23/15 19:14, Henri Verbeet wrote:
Does the driver generate GL errors without this? The way I read the ARB_sampler_objects spec that would a driver bug.
Yes, it does. I'll see how easy it is to fix in the the driver and propose a patch to the Mesa developers.
The rest of the patches should apply and work without this change.