anv: fix acceleration structure descriptor template writes

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d258b0bf0e ("anv: Add support for binding acceleration structures")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16058>
This commit is contained in:
Lionel Landwerlin 2022-04-20 19:29:08 +03:00 committed by Marge Bot
parent ace22edd30
commit b7828f56ba
1 changed files with 13 additions and 0 deletions

View File

@ -1956,6 +1956,19 @@ anv_descriptor_set_write_template(struct anv_device *device,
entry->array_count);
break;
case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR:
for (uint32_t j = 0; j < entry->array_count; j++) {
VkAccelerationStructureKHR *accel_obj =
(VkAccelerationStructureKHR *)(data + entry->offset + j * entry->stride);
ANV_FROM_HANDLE(anv_acceleration_structure, accel, *accel_obj);
anv_descriptor_set_write_acceleration_structure(device, set,
accel,
entry->binding,
entry->array_element + j);
}
break;
default:
break;
}