Open jeffnn opened 3 weeks ago
LGTM, but we should get a review from someone more familiar with all of this. @adam-yang perhaps?
Is there a reason that the testing for this isn't filecheck based?
Yes: you can't get the textual pass "printf" output via filecheck.
Bit of background: PIX's debug passes add new allocas, stores to which tie debug info to DXIL Values. In the case of a preexisting alloca, PIX will still add its debug writes, but the codegen may have emitted vector-valued stores. Concretely, this happens for the ray payload and RayDesc structs in DXR. Those vector-values stores were being treated incorrectly, resulting in missing values in the PIX shader debugger.
This change splits vector-valued stores to such allocas into extractelement/scalar-stores, which enables the rest of the PIX instrumentation to function as expected.
(Worth noting that this change only applies to the PIX shader debugging pass.)