[Mesa-dev] [PATCH 1/4] xa: handle solid-fill src/mask

Roland Scheidegger sroland at vmware.com
Tue Apr 8 14:41:12 PDT 2014


Am 08.04.2014 13:49, schrieb Rob Clark:
> btw, I think I've tracked down at least one of the rendercheck issues
> I was having.  Which seems to be a pre-existing condition.  The
> problem is a composite operation with xrgb src and a8 dst.  Ends up
> generating a shader along the lines of:
> 
>   0: TEX TEMP[0], IN[0], SAMP[0], 2D
>   1: MOV TEMP[0].w, IMM[..]
>   2: MOV OUT[0], TEMP[0].wwww
>   3: END
> 
> in this case, my compiler optimizes out the texture fetch.  But that
> causes a bit of confusion in freedreno because half the driver thinks
> there is a texture and sets things up accordingly.
> 
> I'm not entirely sure if XA should detect this.. or if that should be
> fixed in the driver..
I think the driver should handle that correctly in any case - I could easily
see such shaders being generated in other places too. Obviously, a
driver can optimize away the tex instruction but is not required to do
so (though it would be better if it did...), the shader is perfectly
valid (but needs the sampler to be set up correctly).
If the state tracker should avoid it in the first place, I'm not
certain. If it doesn't add too much complexity, sounds like a good idea.
But just relying on dead code elimination in the drivers doesn't sound
too unreasonable to me neither.

Roland


More information about the mesa-dev mailing list