radv/rt: Flush L2 after writing internal node offset on GFX12

Otherwise the encoder can read a stale value and make internal nodes
point into leaf space (if 0 is read).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
This commit is contained in:
Natalie Vock 2025-03-10 16:21:22 +01:00 committed by Marge Bot
parent cdadda2d51
commit a1b0599105

View file

@ -416,6 +416,8 @@ radv_encode_as(VkCommandBuffer commandBuffer, const VkAccelerationStructureBuild
uint32_t dst_offset = layout.internal_nodes_offset - layout.bvh_offset;
radv_update_buffer_cp(cmd_buffer, intermediate_header_addr + offsetof(struct vk_ir_header, dst_node_offset),
&dst_offset, sizeof(uint32_t));
if (radv_device_physical(device)->info.cp_sdma_ge_use_system_memory_scope)
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_INV_L2;
}
const struct encode_args args = {