DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Inline Raytrace RayQuery::CommittedTriangleFrontFace Not Working

Open nuno-cardoso opened this issue 4 years ago • 3 comments

When using inline raytrace, after calling proceed on a ray query, using the call to RayQuery::CommittedTriangleFrontFace makes all the other calls to RayQuery::Committed*** return zeros or invalid. Not using the call to RayQuery::CommittedTriangleFrontFace makes the other calls return meaningful values.

nuno-cardoso avatar Feb 25 '21 19:02 nuno-cardoso

Hit the same issue.

StarsX avatar Mar 26 '21 03:03 StarsX

The same here. I hope that can be fixed because it's a very usefull feature.

Jose-gd-mse avatar Sep 28 '21 11:09 Jose-gd-mse

Any updates on this issue?

aschrein-AMD avatar Jun 22 '22 17:06 aschrein-AMD

Also hitting it. (RTX 2080 super with driver 522.25 in case its vendor specific)

VZout avatar Oct 14 '22 08:10 VZout

Hitting this myself on the 3070 using the 531.79 driver.

perneky avatar May 12 '23 17:05 perneky

If you think is a DXC compiler issue, can we get an HLSL repro that shows the bad DXIL output?

tex3d avatar Jul 24 '23 20:07 tex3d

Please disregard the prior request for a repro. We have a repo and understand why this happens.

The root cause is that our intermediate high-level intrinsic functions have a collision problem when attributes differ. CommittedTriangleFrontFace has the same function signature as Proceed, so when called, CommittedTriangleFrontFace creates the HL operation first with a ReadOnly function attribute, then Proceed looks up a matching signature and uses the existing function with the incorrect ReadOnly attribute. Later, optimizations think Proceed may be eliminated as dead code if the return value isn't used because it looks like it's ReadOnly, when it shouldn't be. There are potentially other impacts of this problem beyond this combination of calls as well.

Fixing this requires a change to the mangling of our intermediate high-level functions to properly capture the attributes.

tex3d avatar Jul 24 '23 22:07 tex3d