Skip to content
Snippets Groups Projects
Commit c8ce254e authored by Ivan Briano's avatar Ivan Briano Committed by Eric Engestrom
Browse files

intel/rt: fix terminateOnFirstHit handling


If TraceRay() is called with the TerminateOnFirstHit flag, we need to
terminate the ray on the first confirmed intersection. This is handled
by the lowering of accept_ray_intersection and it's working fine for the
case of multiple instances of the intersection shader being called.

But if the shader calls reportIntersection() more than once, we were
handling them all and accepting the closest one regardless of the flag.

Check for the flag on every confirmed intersection and, if set, accept
it right there. The subsequent lowering will take care of terminating
handling the ray termination if necessary.

Fixes new test dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first

Cc: mesa-stable

Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Part-of: <mesa/mesa!30418>
(cherry picked from commit f8553f56)
parent 71125139
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment