diff --git a/.pick_status.json b/.pick_status.json index 0bfe6a6ad70..479e0ca085a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4244,7 +4244,7 @@ "description": "radv/rt: Don't enable midpoint sorting", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/nir/radv_nir_rt_common.c b/src/amd/vulkan/nir/radv_nir_rt_common.c index 38e8503c1c3..ca2c2499bdf 100644 --- a/src/amd/vulkan/nir/radv_nir_rt_common.c +++ b/src/amd/vulkan/nir/radv_nir_rt_common.c @@ -560,15 +560,12 @@ create_bvh_descriptor(nir_builder *b, const struct radv_physical_device *pdev, s /* Enable pointer flags on GFX11+ */ dword3 |= BITFIELD_BIT(119 - 96); - /* Instead of the default box sorting (closest point), use largest for terminate_on_first_hit rays and midpoint - * for closest hit; this makes it more likely that the ray traversal will visit fewer nodes. */ + /* Instead of the default box sorting (closest point), use largest for terminate_on_first_hit rays; + * this makes it more likely that the ray traversal will visit fewer nodes. */ const uint32_t box_sort_largest = 1; - const uint32_t box_sort_midpoint = 2; - /* Only use largest/midpoint sorting when all invocations have the same ray flags, otherwise + /* Only use largest sorting when all invocations have the same ray flags, otherwise * fall back to the default closest point. */ - dword1 = nir_bcsel(b, nir_vote_any(b, 1, ray_flags->terminate_on_first_hit), dword1, - nir_imm_int(b, (box_sort_midpoint << 21) | sort_triangles_first | box_sort_enable)); dword1 = nir_bcsel(b, nir_vote_all(b, 1, ray_flags->terminate_on_first_hit), nir_imm_int(b, (box_sort_largest << 21) | sort_triangles_first | box_sort_enable), dword1); }