531d17c334
This probably could/should be split up into multiple commits, but it's simpler to make this a monolithic change. This change inlines a bunch of logic from spirv_to_dxil into the spirv2dxil tool so that linking can be done on the nir shaders. Probably the linking functionality should be exposed in the lib/dll form too, which means that a helper for freeing intermediate nir would be needed too. That's TODO for now. The tool now requires arguments to be in-order, and once a filename is encountered, will use the previous arguments to compile the shader. If multiple graphics shaders are passed, they're linked as if they were forming a pipeline together. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20440>