[Mesa-dev] [PATCH 1/2] i965: Make the precompile ignore DEPTH_TEXTURE_MODE on Gen7.5+.

Kenneth Graunke kenneth at whitecape.org
Thu Jan 1 22:51:10 PST 2015


On Thursday, January 01, 2015 10:21:43 PM Ian Romanick wrote:
> On 12/31/2014 08:04 PM, Kenneth Graunke wrote:
> > Gen7.5+ platforms that support the "Shader Channel Select" feature leave
> > key->tex.swizzles[i] as SWIZZLE_NOOP except when GL_DEPTH_TEXTURE_MODE
> > is GL_ALPHA (which is really uncommon).  So, the precompile should leave
> > them as SWIZZLE_NOOP (aka SWIZZLE_XYZW) as well.
> > 
> > We didn't notice this because prog->ShadowSamplers is not set correctly.
> > The next patch will fix that problem.
> 
> I had some patches related to this a long time ago, but I'm not sure
> what happened to them.  My recollection is that, basically, nothing
> should use prog->ShadowSamplers.  That was only used by the
> ARB_fragment_program assembler, and other paths (including ff fragment
> programs) don't set these fields.  I just pushed the (ancient!) branch
> to my fd.o repo as r300-shadow-samplers.  The two patches are from 2011. :(

No, it's definitely set.

link_uniforms.cpp sets shader->shadow_samplers, which ir_to_mesa copies
to prog->ShadowSamplers.  I'm guessing we stopped copying that at some point.

I don't see why we shouldn't use it...

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150101/057f448c/attachment.sig>


More information about the mesa-dev mailing list