radv: Fix incorrect build info indexing

Fixes: 8666b1f ("radv: Build acceleration structures using BVH IR")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18928>
This commit is contained in:
Konstantin Seurer 2022-10-01 20:15:03 +02:00 committed by Marge Bot
parent 0ae3eb834d
commit 7485660d12

View file

@ -682,8 +682,8 @@ convert_leaf_nodes(VkCommandBuffer commandBuffer, uint32_t infoCount,
const struct convert_leaf_args args = {
.intermediate_bvh = pInfos[i].scratchData.deviceAddress + bvh_states[i].scratch.ir_offset,
.output_bvh = accel_struct->va,
.geometry_type = pInfos->pGeometries ? pInfos->pGeometries[0].geometryType
: pInfos->ppGeometries[0]->geometryType,
.geometry_type = pInfos[i].pGeometries ? pInfos[i].pGeometries[0].geometryType
: pInfos[i].ppGeometries[0]->geometryType,
};
radv_CmdPushConstants(commandBuffer,
cmd_buffer->device->meta_state.accel_struct_build.convert_leaf_p_layout,
@ -712,8 +712,8 @@ convert_internal_nodes(VkCommandBuffer commandBuffer, uint32_t infoCount,
* because it will be multiplied with 0.
*/
if (pInfos[i].geometryCount)
geometry_type = pInfos->pGeometries ? pInfos->pGeometries[0].geometryType
: pInfos->ppGeometries[0]->geometryType;
geometry_type = pInfos[i].pGeometries ? pInfos[i].pGeometries[0].geometryType
: pInfos[i].ppGeometries[0]->geometryType;
const struct convert_internal_args args = {
.intermediate_bvh = pInfos[i].scratchData.deviceAddress + bvh_states[i].scratch.ir_offset,