Re: [PATCH 1/5] wined3d: Only set TEXTURE_COMPARE_FUNC when ARB_depth_texture is supported.
On 23 March 2015 at 18:59, Stefan Dösinger <stefan(a)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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVEGCcAAoJEN0/YqbEcdMwUHgP/2etOD7t+lUwUjuwid/CZOu5 5gzscoF2RlBOvjMAEhVoa+5fGidZhuV44lpo3jIjuagdaoM4TTymnWt8cgKu2dzW 7Z9FErXVeXakd7zYPejrXUuBU0kHDNRnou3iczlKRqdZpILd3sZ0Zhkvh0JEet86 Nlj1HzhNqJcamgUyWrY59+qe0F22j93gDUTwwuADfm/1Z7k+dw1vkyNBQoeD+rfV 5C7YBhfa4Cu93/Rq3Q9O92Xl8B+GuRSsE9gLjMPW1+7us8k0OGEYSHK4pcVRkF+1 J8Zvk5HKWm5Y/W5+Hp0UgyZcEqi8FnlDcKDdZOV1FIKRVybBsReEeAZehq+5YXBo Kuts99DfSLwwrHqjGFTB7qrB72YGiwG5FRReEu3JXeAOEljMpcjvUfLSRldBIhZt AxTRvAUG7uHum6hwwu7aS9IzKbKa6qYGgS4sDZdfUMj8KBi1cewouft9NalAKXQZ zq/TRvaDPK4fdGO0zdvL1ka3ME5mVklclqI01d7htI46FcGrj52GPcp2o19E3gjt eUvn/9CFfKbRR9FCBsjnVX3QEVLg+ZNuH3Rkn197XZ3drh3pbi4/c1rrCw5cIctI UZ7sMU5wMC8vTxjGumcttDoV5AdWYkfz+xzXt9Vz5JSdtc8qHtggPrTLinANFs/Z yALU3Io2ZSbyjKimkZ9D =vZlw -----END PGP SIGNATURE-----
participants (2)
-
Henri Verbeet -
Stefan Dösinger