[Mesa-dev] ARB_texture_gather support for Sandy Bridge

Kenneth Graunke kenneth at whitecape.org
Wed Feb 5 05:34:20 CET 2014


On 02/03/2014 01:29 AM, Chris Forbes wrote:
> This series adds a bunch of workarounds to enable ARB_texture_gather
> (in its more restrictive form) on Gen6 hardware.
> 
> These are necessary because Gen6's gather4 instruction doesn't work
> correctly with integer or unsigned integer formats.
> 
> The approach is:
> 
> * For 32-bit wide formats, pretend the surface is FLOAT, and reinterpret
> the bits as INT/UINT. This requires only a surface format override; nothing
> in the shader.
> 
> * For 8- and 16-bit wide formats, pretend the surface is UNORM,
> and recover the appropriate unsigned integer value by multiplying up,
> and then converting to INT/UINT. If INT is required, then fix the sign
> extension of the value by the usual SHL/ASR method.
> 
> This now passes all the applicable ARB_texture_gather piglit tests.

Chris,

This is great!  Much, much simpler than your old code to get this
working.  I see no reason not to commit this and enable it.

I sent a bunch of nits and suggestions.  Mostly, more comments would be
great.  I don't feel a need to see this again, so assuming you take my
suggestions (or some approximation thereof), feel free to push this.

For the series:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140204/59958cf4/attachment-0001.pgp>


More information about the mesa-dev mailing list