On 08/27/2012 01:38 PM, Eric Anholt wrote: > Kenneth Graunke <kenn...@whitecape.org> writes: > >> Our previous assumption, SWIZZLE_XYZW, was completely bogus for depth >> textures. There are no Y, Z, or W components. > > Seems like this doesn't even need to be shadow-sampler-dependent, just > whether the baseformat is depth/depthstencil.
Except for one problem: the baseformat depends on the currently bound textures. I doubt people have the correct textures bound at glLinkShader() time, so we'd be guessing...randomly? Using the shadow sampler is nice because it's purely based on the program source. You -know- it's going to be depth/depthstencil. That said, it would be great to do better: I'm still seeing some recompiles due to us guessing XYZW instead of XXX1, and I think that's due to people sampling raw depth values by binding a depth texture to a regular (non-shadow) sampler. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev