Nebula
Loading...
Searching...
No Matches
vkaccelerationstructure.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
10#include "ids/idallocator.h"
12namespace Vulkan
13{
14
16{
17 VkAccelerationStructureGeometryTrianglesDataKHR triangleData;
18 VkAccelerationStructureBuildSizesInfoKHR buildSizes;
19 VkAccelerationStructureBuildGeometryInfoKHR buildGeometryInfo;
22};
23
24enum
25{
32};
33
35 0xFFF
36 , VkDevice
37 , VkAccelerationStructureKHR
40 , GeometrySetup
41 , VkDeviceAddress
44
46const VkDevice BlasGetVkDevice(const CoreGraphics::BlasId id);
48const VkBuffer BlasGetVkBuffer(const CoreGraphics::BlasId id);
50const VkAccelerationStructureKHR BlasGetVk(const CoreGraphics::BlasId id);
52const VkAccelerationStructureBuildGeometryInfoKHR& BlasGetVkBuild(const CoreGraphics::BlasId id);
55
57{
58 VkAccelerationStructureGeometryInstancesDataKHR instanceData;
59 VkAccelerationStructureBuildGeometryInfoKHR geometryInfo;
60};
61
62enum
63{
66};
67
69 0xFFFF
70 , VkAccelerationStructureInstanceKHR
72 , uint
75
76
78{
79 VkAccelerationStructureGeometryKHR geo;
80 VkAccelerationStructureBuildGeometryInfoKHR geometryInfo;
81 VkAccelerationStructureBuildSizesInfoKHR buildSizes;
83};
84
85enum
86{
95};
96
98 0xFFF
99 , VkDevice
100 , SceneSetup
101 , VkAccelerationStructureKHR
105 , VkDeviceAddress
106 , VkDeviceAddress
109
111const VkDevice TlasGetVkDevice(const CoreGraphics::TlasId id);
113const VkBuffer TlasGetVkBuffer(const CoreGraphics::TlasId id);
115const VkAccelerationStructureKHR TlasGetVk(const CoreGraphics::TlasId id);
117const VkAccelerationStructureBuildGeometryInfoKHR& TlasGetVkBuild(const CoreGraphics::TlasId id);
120
121} // namespace Vulkan
Definition idallocator.h:106
Nebula's dynamic array class.
Definition array.h:60
Vulkan implementation of GPU acceleration structure.
Definition vkaccelerationstructure.cc:15
@ BlasInstance_Transform
Definition vkaccelerationstructure.h:65
@ BlasInstance_Instance
Definition vkaccelerationstructure.h:64
VkBlasInstanceAllocator blasInstanceAllocator
Definition vkaccelerationstructure.cc:17
const VkBuffer BlasGetVkBuffer(const CoreGraphics::BlasId id)
Get buffer holding TLAS data.
Definition vkaccelerationstructure.cc:34
@ Blas_Geometry
Definition vkaccelerationstructure.h:30
@ Blas_View
Definition vkaccelerationstructure.h:31
@ Blas_Scratch
Definition vkaccelerationstructure.h:29
@ Blas_Device
Definition vkaccelerationstructure.h:26
@ Blas_Buffer
Definition vkaccelerationstructure.h:28
@ Blas_Handle
Definition vkaccelerationstructure.h:27
const VkDevice TlasGetVkDevice(const CoreGraphics::TlasId id)
Get device used to create Tlas.
Definition vkaccelerationstructure.cc:70
const VkAccelerationStructureBuildGeometryInfoKHR & BlasGetVkBuild(const CoreGraphics::BlasId id)
Get build info for bottom level acceleration structure.
Definition vkaccelerationstructure.cc:52
const Util::Array< VkAccelerationStructureBuildRangeInfoKHR > & BlasGetVkRanges(const CoreGraphics::BlasId id)
Get range infos for bottom level acceleration structure.
Definition vkaccelerationstructure.cc:61
const VkAccelerationStructureKHR TlasGetVk(const CoreGraphics::TlasId id)
Get acceleration structure.
Definition vkaccelerationstructure.cc:88
Ids::IdAllocatorSafe< 0xFFFF, VkAccelerationStructureInstanceKHR, Math::mat4, uint > VkBlasInstanceAllocator
Definition vkaccelerationstructure.h:73
const VkAccelerationStructureKHR BlasGetVk(const CoreGraphics::BlasId id)
Get buffer representing the acceleration structure.
Definition vkaccelerationstructure.cc:43
const VkAccelerationStructureBuildGeometryInfoKHR & TlasGetVkBuild(const CoreGraphics::TlasId id)
Get build info.
Definition vkaccelerationstructure.cc:97
VkBlasAllocator blasAllocator
Definition vkaccelerationstructure.cc:16
@ Tlas_UpdateScratch
Definition vkaccelerationstructure.h:92
@ Tlas_BuildScratchAddr
Definition vkaccelerationstructure.h:93
@ Tlas_BuildScratch
Definition vkaccelerationstructure.h:91
@ Tlas_Device
Definition vkaccelerationstructure.h:87
@ Tlas_Scene
Definition vkaccelerationstructure.h:88
@ Tlas_UpdateScratchAddr
Definition vkaccelerationstructure.h:94
@ Tlas_Handle
Definition vkaccelerationstructure.h:89
@ Tlas_Buffer
Definition vkaccelerationstructure.h:90
const VkDevice BlasGetVkDevice(const CoreGraphics::BlasId id)
Get device used to create blas.
Definition vkaccelerationstructure.cc:25
const Util::Array< VkAccelerationStructureBuildRangeInfoKHR > & TlasGetVkRanges(const CoreGraphics::TlasId id)
Get build ranges.
Definition vkaccelerationstructure.cc:106
const VkBuffer TlasGetVkBuffer(const CoreGraphics::TlasId id)
Get buffer holding TLAS data.
Definition vkaccelerationstructure.cc:79
VkTlasAllocator tlasAllocator
Definition vkaccelerationstructure.cc:18
Ids::IdAllocatorSafe< 0xFFF, VkDevice, VkAccelerationStructureKHR, CoreGraphics::BufferId, CoreGraphics::BufferId, GeometrySetup, VkDeviceAddress > VkBlasAllocator
Definition vkaccelerationstructure.h:42
Ids::IdAllocatorSafe< 0xFFF, VkDevice, SceneSetup, VkAccelerationStructureKHR, CoreGraphics::BufferId, CoreGraphics::BufferId, CoreGraphics::BufferId, VkDeviceAddress, VkDeviceAddress > VkTlasAllocator
Definition vkaccelerationstructure.h:107
Definition accelerationstructure.h:48
Definition buffer.h:23
Definition accelerationstructure.h:98
A 4x4 single point precision float matrix.
Definition mat4.h:49
Definition vkaccelerationstructure.h:16
Util::Array< VkAccelerationStructureBuildRangeInfoKHR > rangeInfos
Definition vkaccelerationstructure.h:21
VkAccelerationStructureBuildGeometryInfoKHR buildGeometryInfo
Definition vkaccelerationstructure.h:19
Util::Array< VkAccelerationStructureGeometryKHR > geometries
Definition vkaccelerationstructure.h:20
VkAccelerationStructureGeometryTrianglesDataKHR triangleData
Definition vkaccelerationstructure.h:17
VkAccelerationStructureBuildSizesInfoKHR buildSizes
Definition vkaccelerationstructure.h:18
Definition vkaccelerationstructure.h:57
VkAccelerationStructureGeometryInstancesDataKHR instanceData
Definition vkaccelerationstructure.h:58
VkAccelerationStructureBuildGeometryInfoKHR geometryInfo
Definition vkaccelerationstructure.h:59
Definition vkaccelerationstructure.h:78
VkAccelerationStructureGeometryKHR geo
Definition vkaccelerationstructure.h:79
VkAccelerationStructureBuildGeometryInfoKHR geometryInfo
Definition vkaccelerationstructure.h:80
Util::Array< VkAccelerationStructureBuildRangeInfoKHR > rangeInfos
Definition vkaccelerationstructure.h:82
VkAccelerationStructureBuildSizesInfoKHR buildSizes
Definition vkaccelerationstructure.h:81
unsigned int uint
Definition types.h:31