Skip to content

nir: Allow zero-length array copies

Connor Abbott requested to merge cwabbott0/mesa:nir-zero-len-copies into main

For drivers that have a standalone compiler like lima, when we compile just a vertex shader we have to not use the linker, lest everything get removed since it thinks nothing is in use. In legacy GL there's gl_TexCoord, which is sized implicitly based on the maximum index used to store it. Normally if it's not stored to it's removed by the linker, but since we don't use the linker and lima uses lower_io_to_temporaries, we get a zero-length copy of gl_TexCoord. There was an assertion against this in NIR, but the code handles it perfectly fine. Just remove it.

Edited by Jordan Justen

Merge request reports