Kenneth Graunke <kenn...@whitecape.org> writes:

> 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?

Of course.  You're right, this is a good way to guess.

> 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.

Yeah, sampling depth directly is used for some soft shadow techniques.
`

Attachment: pgpNXlgcqJjml.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to