Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19089>
accel->size = pCreateInfo->size;
accel->bo = buffer->bo;
accel->va = radv_buffer_get_va(accel->bo) + accel->mem_offset;
+ accel->type = pCreateInfo->type;
*pAccelerationStructure = radv_acceleration_structure_to_handle(accel);
return VK_SUCCESS;
uint64_t mem_offset;
uint64_t size;
uint64_t va;
+ VkAccelerationStructureTypeKHR type;
};
VK_DEFINE_NONDISP_HANDLE_CASTS(radv_acceleration_structure, base, VkAccelerationStructureKHR,
{
bool result = true;
+ if (accel_struct->type == VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR &&
+ header->instance_count > 0) {
+ rra_accel_struct_validation_fail(0, "BLAS contains instances");
+ result = false;
+ }
+
if (header->bvh_offset >= accel_struct->size) {
rra_accel_struct_validation_fail(0, "Invalid BVH offset %u", header->bvh_offset);
result = false;