Skip to content

WIP: nir: Start functions and tests to implement creating a nir shader from a string

Gert Wollny requested to merge gerddie/mesa:nir-shader-from-string into main

In order to facilitate the writing of tests implement a a function that creates a shader nir from the string that nir_print writes. This patch implements the basics to get shader with if/else, loops, arrays, and some texture operations handled. In summary, the level of support can be seen from the unit tests.

I write this to help me get some reproducible shaders to implement a nir backend for r600/evergreen, but also to get a better understanding of nir. There are probably many things that can be done better, I'm thankful for any pointers.

Merge request reports