Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Vulkan: Fix acceleration structure descriptor writes after skipped bindings

David Chavezd16b7e1a9987
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp
index b9e56ab5f55..92ac08f89bb 100644
--- a/drivers/vulkan/rendering_device_driver_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp
@@ -4949,8 +4949,8 @@ RDD::UniformSetID RenderingDeviceDriverVulkan::uniform_set_create(VectorView<Bou
acceleration_structure_write->accelerationStructureCount = 1;
acceleration_structure_write->pAccelerationStructures = &accel_info->vk_acceleration_structure;
- vk_writes[i].descriptorType = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR;
- vk_writes[i].pNext = acceleration_structure_write;
+ vk_writes[writes_amount].descriptorType = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR;
+ vk_writes[writes_amount].pNext = acceleration_structure_write;
} break;
default: {
DEV_ASSERT(false);