You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ScalarReplHLSL is missing transforms for some RayDesc users, making the RayDesc flattening unreliable. However, the RayDesc has to be flattened in the HL op parameter lists or the DXIL opcode translation will fail.
Steps to Reproduce
HLSL shaders (raygen) with the following snippet will fail. The HitObject::TraceRay prevents the flattening of the RayDesc.
ScalarReplHLSL will refuse to faltten RayDesc if some users are
incompatible. This is at odds with HLOperationLower, which always
expects a specific flattened form.
This implements explicit RayDesc flattening in ScalarReplHLSL to make this more reliable. One issue with RayDesc-from-cbuffer in RayQuery remains and is documented with a test.
Implement ScalarReplHLSL handling for RayDesc param in HL ops:
- HitObject::MakeMiss [RewriteCallArg]
- HitObject::TraceRay [RewriteCallArg]
- TraceRay [RewriteCallArg]
- RayQuery::TraceRayInline [unchanged - flatten to RayDesc elements]
In the process:
- Fix copyout code in RewriteCallArg (ScalarReplHLSL)
- Remove obsolete tests that expected a RayDesc alloca (where RayDesc is
now SROA'd entirely)
- Document RayQuery lowering bug when RayDesc is taken directly from
cbuffer.
Closesmicrosoft#7434 Unflattened RayDesc breaking HL->DXIL lowering microsoft#7434
ScalarReplHLSL is missing transforms for some RayDesc users, making the RayDesc flattening unreliable. However, the RayDesc has to be flattened in the HL op parameter lists or the DXIL opcode translation will fail.
Steps to Reproduce
HLSL shaders (raygen) with the following snippet will fail. The
HitObject::TraceRay
prevents the flattening of theRayDesc
.Actual Behavior
Assert/crash in
TranslateHitObjectMake
as theRayDesc
isn't flattened in the MakeMiss HL op.The text was updated successfully, but these errors were encountered: