[Mesa-dev] Question for nir lower load uniform to scalar
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
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 832 bytes
Desc: not available
More information about the mesa-dev