This refactors the tessellation, ES-GS and NGG shader ABI to use NIR based intrinsics instead of hard-coding RADV specifics into ACO.
- MR !12773 (merged) for the new NIR intrinsics
- MR !15414 (merged) for optimizing some of the code generated by the current MR
Also, there is MR !16266 which mitigates the stats changes caused by this MR.
This continues the work by Connor and Rhys. We will now allow NIR shaders to access
ac_args directly. This means that instead of introducing an AMD-specific NIR intrinsic to represent each shader argument, we only need an intrinsic for loading args, and then can use that and remove most of the old ones from the backend.
In order to cater to the differences between the RadeonSI and RADV, a new NIR-based ABI is added which allows the drivers to customize how these intrinsics behave, eg. this will be easy to extend to support RadeonSI's more complicated tessellation I/O (I originally thought what we had previously will be adequate, but it wasn't) and the different way of how some details of NGG are handled.
Our goal with this is to enable sharing more NIR code between the drivers and eventually remove (or significantly reduce) the LLVM based shader ABI.
- The new ABI isn't hooked up to RadeonSI yet, we will do that as follow-up.