[Mesa-dev] Question for nir lower load uniform to scalar
Jason Ekstrand
jason at jlekstrand.net
Fri Aug 25 21:40:37 UTC 2017
On August 25, 2017 12:14:20 PM Eric Anholt <eric at anholt.net> wrote:
> 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.
We could do the same thing as nir_lower_io and pass a size function in.
I've thought about doing some sort of io secularization for our driver but
it already handles the vectors so there's no rush. It would also be a
reasonable thing to just combine lower_io_to_scalar with lower_io and just
let the driver indicate what it wants scalarized. Just thoughts...
--Jason
>> 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.
>
>
>
> ----------
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list