microsoft/compiler: Put actual data in the view ID and I/O dependency tables
The D3D multi-view feature added some DXIL metadata in addition to the core functionality. This metadata serves 2 purposes:
- Allow drivers to understand the dependency chain from view ID -> output, even across shaders (view ID -> output0 -> input0 -> output1)
- Allow D3D to validate the spec language that imposes limits on how many outputs can consume view ID
From discussions with our internal compiler team, they indicated that the only real reason for this metadata was the validation, but it looks like our Qualcomm drivers actually do use this metadata. So, let's try to get it right.
This is not 100% complete; it tracks direct I/O dependencies, including control flow related dependencies, but does not currently track indirect dependencies, where an input value is stored to external/scratch memory and then loaded back, or stored to an output and then loaded back (only relevant for tessellation shaders). But, this is probably good enough for now until we see an app/shader where we need the indirect handling, which will be complicated to get right.