On 31/03/18 00:43, Qiang Yu wrote:
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?

It's not a problem for any other GPUs using Gallium currently. You might need to add a CAP and skip the passes for your driver or run a new recombine pass which I think you might need to write. You could check with the i965 guys if a pass exist as they are the only ones using NIR with a vector backend, but I don't think there is.

mesa-dev mailing list

Reply via email to