One further note:

It initially looked like the USCALED/SSCALED surface formats might be
usable for this, and if so would reduce the required shader workaround
to just a single mov for the float to [u]int conversion -- but
unfortunately the sampler is broken for these as well.

-- Chris

On Mon, Feb 3, 2014 at 10:29 PM, Chris Forbes <chr...@ijw.co.nz> 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.
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to