[Mesa-dev] [PATCH] st/glsl_to_tgsi: don't increase immediate index by 1.

Dave Airlie airlied at gmail.com
Wed Jun 22 01:50:12 UTC 2016


On 22 June 2016 at 11:06, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Is that correct in the case where I have something like
>
> dvec4 foo = ...
> bool x = (foo == dvec4(0, 1, 2, 3));
>
> ?

Yes, since immediates are repacked, and relooked up.

So if you do dvec4(1, 2, 2, 1) you only end up using two immediate
locations, and the should have a direct lookup.
>
> Can you elaborate a little bit more as to why this is right? Shouldn't
> this be based on the swizzle of the src[j] argument? [Note, I haven't
> carefully read all the surrounding code.]

No, again immediates are already packed at this stage, we are just
looking up the value in the array.

Dave.


More information about the mesa-dev mailing list