[Mesa-dev] Question about NIR changes since mesa 17.3

Qiang Yu yuq825 at gmail.com
Fri Mar 30 13:43:27 UTC 2018


Hi guys,

I'm rebasing the mesa-lima code from 17.3 to 18.0 and found the NIR changes
in 18.0 will always do nir_lower_io_to_scalar_early() for the output of
vertex
shader and input of fragment shader. My first question is:
Is it for the link time optimization that we can drop un-used channel in a
slot
and merge channels in different slots to one slot if possible?

Mali4xx GPU has different processor for vertex shader (GP) and fragment
shader (PP). Scalar is OK for GP, but PP more like vec ops. So this scalar
change make PP not comfortable. I like the link time optimization, so don't
want to just disable it. My second question is:
Is there any NIR helper that I can use to merge scalar input to vector
again?
Or what's the right way to make the scalar input vector again?

I see master mesa branch will further do nir_lower_alu_to_scalar
for all nir which will get more pain for mali PP, so my third question is:
How other vec GPU solve this problem or anyway to disable it?

Thanks,
Qiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180330/e5bb5d89/attachment-0001.html>


More information about the mesa-dev mailing list