95a90b359a
D3D's view instancing is an optional feature, and even when it's supported, it only goes up to 4 views, where Vulkan requires a minimum of 6 supported views. So, we need to have a path for handling the cases where we can't use the native feature. In this mode, pass the view ID as a runtime var. The caller is then responsible for looping the draw calls and filling out the constant buffer value correctly for each draw. When we get to the last pre-rast stage, we'll additionally want to write out gl_Layer to select the right RTV array slice. Lastly, for the fragment shader, if there's any input attachments, those get loaded using the RTV slice instead of the view ID. RTV slice input into the PS is done with a signature entry (which must be output from the previous stage) rather than a system value. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20650>