Create Acceleration.
- Parameters
-
| [in] | accel | VkAccelerationStructureCreateInfoKHR. |
- Returns
- Returns created Acceleration.
Allocating the buffer to hold the acceleration structure.
Setting the buffer.
Create the acceleration structure.
Allocating the buffer to hold the acceleration structure.
Setting the buffer.
Create the acceleration structure.
Definition at line 606 of file VulkanRayTracing.cpp.
607 {
609
610 AccelKHR resultAccel;
611
615 resultAccel.buffer = std::make_shared<VulkanBuffer>(
617 "AccelBuffer",
618 accel.size,
619 VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR |
620 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
621 0
622 );
623
627 accel.buffer = resultAccel.buffer->Get();
628
632 resultAccel.accel = std::make_shared<VulkanAccelerationStructure>(
m_VulkanState, accel);
633
634 return resultAccel;
635 }
#define SPICES_PROFILE_ZONE
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.