[Mesa-dev] [PATCH] glsl: Ignore ir_texture in lower_const_arrays_to_uniforms.

Kenneth Graunke kenneth at whitecape.org
Fri Jun 24 23:26:00 UTC 2016


On Friday, June 24, 2016 7:03:35 PM PDT Ilia Mirkin wrote:
> On Fri, Jun 24, 2016 at 6:41 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > The only part of an ir_texture which can be an array is the
> > offsets array in textureGatherOffsets() calls.  We don't want
> > to lower those, because they're required to remain constants.
> >
> > Fixes textureGatherOffsets with Gallium drivers such as llvmpipe,
> > which commit ef78df8d3b0cf540e5f08c8c2f6caa338b64a6c7 regressed.
> 
> I believe you need to also CC this to stable, as that one was tagged
> for stable as well.

Right.  Fixed locally.

> 
> I suppose you could have a situation like
> 
> vec2 coords[] = { ... }
> 
> texture(coords[n])
> 
> in which case this won't cause the coords array to get lowered?
> 
>   -ilia

That would show up as

    (assign () (var_ref coords) (constant (array vec2 n) ...))

    (tex ... (array_ref (var_ref coords) <n>) ...)

So the constant array would still get promoted.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160624/306d1c38/attachment.sig>


More information about the mesa-dev mailing list