mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
anv/rt: fully restore code to write instance_count
Conformance tests and games still pass without this code, but spec says we need it: https://registry.khronos.org/vulkan/specs/latest/html/ vkspec.html#vkCmdCopyAccelerationStructureToMemoryKHR This is potentially expensive code. There may be a future opportunity to optimize this out. Need to research. Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36937>
This commit is contained in:
parent
cff9d82c66
commit
09c218e8aa
1 changed files with 3 additions and 0 deletions
|
|
@ -251,7 +251,10 @@ encode_leaf_node(uint32_t type, uint64_t src_node, uint64_t dst_node, REF(anv_ac
|
|||
DEREF(dst_instance).part1.instance_index = src.instance_id;
|
||||
DEREF(dst_instance).part1.instance_id = src.custom_instance_and_mask & 0xffffff;
|
||||
|
||||
uint64_t instance_leaves_addr_base = args.output_bvh -
|
||||
args.output_bvh_offset + ANV_RT_BVH_HEADER_SIZE;
|
||||
uint64_t cnt = atomicAdd(DEREF(dst_header).instance_count, 1);
|
||||
DEREF(INDEX(uint64_t, instance_leaves_addr_base, cnt)) = dst_node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue