[Mesa-dev] [PATCH 2/2] i965/fs: Add support for gl_HelperInvocation system value.
Matt Turner
mattst88 at gmail.com
Mon Nov 16 14:15:51 PST 2015
On Fri, Nov 13, 2015 at 6:05 PM, Matt Turner <mattst88 at gmail.com> wrote:
> ---
> This code generates
>
> mov(1) f0<1>UW g1.14<0,1,0>UW
> mov(8) g2<1>UD 0x00000000UD
> (+f0) sel(8) g3<1>D g2<8,8,1>D -1D
>
> which I don't love because it uses the flag register, and likely uses
> of gl_HelperInvocation will be in an if condition, in which case we
> could have just used f0 directly.
>
> Alternative implementation ideas:
>
> - Shift dispatch mask with a vector-immediate, and then
> resolve it to true/false with -(x & 1):
>
> shr(8) tmp<1>UW g1.14<1,8,0>UB 0x76543210V
I got this working (needed to read g1.28, not g1.24) modulo one yet
unexplained issue. Once that is fixed, I'll send a replacement for
this patch.
More information about the mesa-dev
mailing list