NIR: Add a concept of "named" sources
One problem that's very common when writing passes that work on any sort of I/O is looking at an intrinsic and trying to figure out which source is which. Where is the data? Where is my resource index? Where is my offset? Do I have a vertex index? Where (if any) is my deref? We have a nir_get_io_offest
helper in nir_lower_io.c but this is far from an actual solution to the problem.
One thought for how to do this better would be to add a concept of "named sources" similar to what @robclark did for nir_intrinsic_instr::const_index
. That might be a bit over the top but we need some more generic mechanism to get this metadata.