[Mesa-dev] Question for nir lower load uniform to scalar

Eric Anholt eric at anholt.net
Fri Aug 25 19:07:12 UTC 2017


Qiang Yu <yuq825 at gmail.com> writes:

> Hi Eric,
>
> I'm working on lima gp compiler which should benefit from nir lowering
> uniform load to scalar.
> I notice you write the nir_lower_io_to_scalar.c which support lowering
> shader_in/shader_out
> but left the uniform lowering in vc4 driver, any reason why not
> implement in the nir_lower_io_to_scalar.c?

I think my theory was that drivers would want different units for the
base/offset (bytes or dwords), so I left it in vc4.  Anyone else want to
weigh in on this?  vc4 wants indirect load offsets in units of bytes.

> I'm new to nir, tried to add it but seems not correct after
> optimization pass. So I should missing
> some place, anyone can help to point out?

Your nir_lower_io.c code looks correct to me, so I'm not sure what might
be missing.  I'm not sure about using the component field, though -- for
VC4 all I want after lowering is a byte offset within the constant
buffer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170825/dcd365f4/attachment.sig>


More information about the mesa-dev mailing list