| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_acceleration_structure
Description
Name
VK_KHR_acceleration_structure - device extension
VK_KHR_acceleration_structure
- Name String
VK_KHR_acceleration_structure
- Extension Type
- Device extension
- Registered Extension Number
- 151
- Revision
- 13
- Ratification Status
- Ratified
- Extension and Version Dependencies
- Version 1.1 and VK_EXT_descriptor_indexing and VK_KHR_buffer_device_address and VK_KHR_deferred_host_operations
- Contact
Other Extension Metadata
- Last Modified Date
- 2021-09-30
- Contributors
- Samuel Bourasseau, Adobe
- Matthäus Chajdas, AMD
- Greg Grebe, AMD
- Nicolai Hähnle, AMD
- Tobias Hector, AMD
- Dave Oldcorn, AMD
- Skyler Saleh, AMD
- Mathieu Robart, Arm
- Marius Bjorge, Arm
- Tom Olson, Arm
- Sebastian Tafuri, EA
- Henrik Rydgard, Embark
- Juan Cañada, Epic Games
- Patrick Kelly, Epic Games
- Yuriy O’Donnell, Epic Games
- Michael Doggett, Facebook/Oculus
- Ricardo Garcia, Igalia
- Andrew Garrard, Imagination
- Don Scorgie, Imagination
- Dae Kim, Imagination
- Joshua Barczak, Intel
- Slawek Grajewski, Intel
- Jeff Bolz, NVIDIA
- Pascal Gautron, NVIDIA
- Daniel Koch, NVIDIA
- Christoph Kubisch, NVIDIA
- Ashwin Lele, NVIDIA
- Robert Stepinski, NVIDIA
- Martin Stich, NVIDIA
- Nuno Subtil, NVIDIA
- Eric Werness, NVIDIA
- Jon Leech, Khronos
- Jeroen van Schijndel, OTOY
- Juul Joosten, OTOY
- Alex Bourd, Qualcomm
- Roman Larionov, Qualcomm
- David McAllister, Qualcomm
- Lewis Gordon, Samsung
- Ralph Potter, Samsung
- Jasper Bekkers, Traverse Research
- Jesse Barker, Unity
- Baldur Karlsson, Valve
Description
In order to be efficient, rendering techniques such as ray tracing need a quick way to identify which primitives may be intersected by a ray traversing the geometries. Acceleration structures are the most common way to represent the geometry spatially sorted, in order to quickly identify such potential intersections.
This extension adds new functionalities:
- Acceleration structure objects and build commands
- Structures to describe geometry inputs to acceleration structure builds
- Acceleration structure copy commands
New Object Types
New Commands
cmdBuildAccelerationStructuresIndirectKHRcmdBuildAccelerationStructuresKHRcmdCopyAccelerationStructureKHRcmdCopyAccelerationStructureToMemoryKHRcmdCopyMemoryToAccelerationStructureKHRcmdWriteAccelerationStructuresPropertiesKHRcopyAccelerationStructureKHRcopyAccelerationStructureToMemoryKHRcopyMemoryToAccelerationStructureKHRcreateAccelerationStructureKHRdestroyAccelerationStructureKHRgetAccelerationStructureBuildSizesKHRgetAccelerationStructureDeviceAddressKHRgetDeviceAccelerationStructureCompatibilityKHRwriteAccelerationStructuresPropertiesKHR
New Structures
AccelerationStructureBuildGeometryInfoKHRAccelerationStructureBuildRangeInfoKHRAccelerationStructureBuildSizesInfoKHRAccelerationStructureCreateInfoKHRAccelerationStructureDeviceAddressInfoKHRAccelerationStructureGeometryAabbsDataKHRAccelerationStructureGeometryInstancesDataKHRAccelerationStructureGeometryKHRAccelerationStructureGeometryTrianglesDataKHRAccelerationStructureInstanceKHRAccelerationStructureVersionInfoKHRCopyAccelerationStructureInfoKHRCopyAccelerationStructureToMemoryInfoKHRCopyMemoryToAccelerationStructureInfoKHRTransformMatrixKHRExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:Extending
WriteDescriptorSet:
New Unions
New Enums
AccelerationStructureCompatibilityKHRAccelerationStructureCreateFlagBitsKHRAccelerationStructureTypeKHRBuildAccelerationStructureFlagBitsKHRBuildAccelerationStructureModeKHRCopyAccelerationStructureModeKHRGeometryFlagBitsKHRGeometryInstanceFlagBitsKHRGeometryTypeKHR
New Bitmasks
New Enum Constants
KHR_ACCELERATION_STRUCTURE_SPEC_VERSIONExtending
AccessFlagBits:Extending
BufferUsageFlagBits:Extending
DescriptorType:Extending
FormatFeatureFlagBits:Extending
IndexType:Extending
ObjectType:Extending
PipelineStageFlagBits:Extending
QueryType:Extending
StructureType:STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHRSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHRSTRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHRSTRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHRSTRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHRSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR
If VK_EXT_debug_report is supported:
If VK_KHR_format_feature_flags2 is supported:
Issues
- How does this extension differ from VK_NV_ray_tracing?
DISCUSSION:
The following is a summary of the main functional differences between VK_KHR_acceleration_structure and VK_NV_ray_tracing:
- added acceleration structure serialization / deserialization
(
COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR,COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR,cmdCopyAccelerationStructureToMemoryKHR,cmdCopyMemoryToAccelerationStructureKHR) - document inactive primitives and instances
- added
PhysicalDeviceAccelerationStructureFeaturesKHRstructure - added indirect and batched acceleration structure builds
(
cmdBuildAccelerationStructuresIndirectKHR) - added host acceleration structure commands
- reworked geometry structures so they could be better shared between device, host, and indirect builds
- explicitly made
AccelerationStructureKHRuse device addresses - added acceleration structure compatibility check function
(
getDeviceAccelerationStructureCompatibilityKHR) - add parameter for requesting memory requirements for host and/or device build
- added format feature for acceleration structure build vertex formats
(
FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR)
- Can you give a more detailed comparison of differences and similarities between VK_NV_ray_tracing and VK_KHR_acceleration_structure?
DISCUSSION:
The following is a more detailed comparison of which commands, structures, and enums are aliased, changed, or removed.
Aliased functionality — enums, structures, and commands that are considered equivalent:
GeometryTypeNV↔GeometryTypeKHRAccelerationStructureTypeNV↔AccelerationStructureTypeKHRCopyAccelerationStructureModeNV↔CopyAccelerationStructureModeKHRGeometryFlagsNV↔GeometryFlagsKHRGeometryFlagBitsNV↔GeometryFlagBitsKHRGeometryInstanceFlagsNV↔GeometryInstanceFlagsKHRGeometryInstanceFlagBitsNV↔GeometryInstanceFlagBitsKHRBuildAccelerationStructureFlagsNV↔BuildAccelerationStructureFlagsKHRBuildAccelerationStructureFlagBitsNV↔BuildAccelerationStructureFlagBitsKHRTransformMatrixNV↔TransformMatrixKHR(added to VK_NV_ray_tracing for descriptive purposes)AabbPositionsNV↔AabbPositionsKHR(added to VK_NV_ray_tracing for descriptive purposes)AccelerationStructureInstanceNV↔AccelerationStructureInstanceKHR(added to VK_NV_ray_tracing for descriptive purposes)
Changed enums, structures, and commands:
- renamed
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV→GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHRinGeometryInstanceFlagBitsKHR GeometryTrianglesNV→AccelerationStructureGeometryTrianglesDataKHR(device or host address instead of buffer+offset)GeometryAABBNV→AccelerationStructureGeometryAabbsDataKHR(device or host address instead of buffer+offset)GeometryDataNV→AccelerationStructureGeometryDataKHR(union of triangle/aabbs/instances)GeometryNV→AccelerationStructureGeometryKHR(changed type of geometry)AccelerationStructureCreateInfoNV→AccelerationStructureCreateInfoKHR(reshuffle geometry layout/information)PhysicalDeviceRayTracingPropertiesNV→PhysicalDeviceAccelerationStructurePropertiesKHR(for acceleration structure properties, renamedmaxTriangleCounttomaxPrimitiveCount, added per stage and update after bind limits) andPhysicalDeviceRayTracingPipelinePropertiesKHR(for ray tracing pipeline properties)AccelerationStructureMemoryRequirementsInfoNV(deleted - replaced by allocating on top ofBuffer)WriteDescriptorSetAccelerationStructureNV→WriteDescriptorSetAccelerationStructureKHR(different acceleration structure type)createAccelerationStructureNV→createAccelerationStructureKHR(device address, different geometry layout/information)getAccelerationStructureMemoryRequirementsNV(deleted - replaced by allocating on top ofBuffer)cmdBuildAccelerationStructureNV→cmdBuildAccelerationStructuresKHR(params moved to structs, layout differences)cmdCopyAccelerationStructureNV→cmdCopyAccelerationStructureKHR(params to struct, extendable)getAccelerationStructureHandleNV→getAccelerationStructureDeviceAddressKHR(device address instead of handle)AccelerationStructureMemoryRequirementsTypeNV→ size queries for scratch space moved togetAccelerationStructureBuildSizesKHRdestroyAccelerationStructureNV→destroyAccelerationStructureKHR(different acceleration structure types)cmdWriteAccelerationStructuresPropertiesNV→cmdWriteAccelerationStructuresPropertiesKHR(different acceleration structure types)
- renamed
Added enums, structures and commands:
GEOMETRY_TYPE_INSTANCES_KHRtoGeometryTypeKHRenumCOPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR,COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHRtoCopyAccelerationStructureModeKHRenumPhysicalDeviceAccelerationStructureFeaturesKHRstructureAccelerationStructureBuildTypeKHRenumBuildAccelerationStructureModeKHRenumDeviceOrHostAddressKHRandDeviceOrHostAddressConstKHRunionsAccelerationStructureBuildRangeInfoKHRstructAccelerationStructureGeometryInstancesDataKHRstructAccelerationStructureDeviceAddressInfoKHRstructAccelerationStructureVersionInfoKHRstructStridedDeviceAddressRegionKHRstructCopyAccelerationStructureToMemoryInfoKHRstructCopyMemoryToAccelerationStructureInfoKHRstructCopyAccelerationStructureInfoKHRstructbuildAccelerationStructuresKHRcommand (host build)copyAccelerationStructureKHRcommand (host copy)copyAccelerationStructureToMemoryKHR(host serialize)copyMemoryToAccelerationStructureKHR(host deserialize)writeAccelerationStructuresPropertiesKHR(host properties)cmdCopyAccelerationStructureToMemoryKHR(device serialize)cmdCopyMemoryToAccelerationStructureKHR(device deserialize)getDeviceAccelerationStructureCompatibilityKHR(serialization)
- What are the changes between the public provisional (VK_KHR_ray_tracing v8) release and the internal provisional (VK_KHR_ray_tracing v9) release?
- added
geometryFlagstoVkAccelerationStructureCreateGeometryTypeInfoKHR(later reworked to obsolete this) - added
minAccelerationStructureScratchOffsetAlignmentproperty to VkPhysicalDeviceRayTracingPropertiesKHR fix naming and return enum from
getDeviceAccelerationStructureCompatibilityKHR- renamed
VkAccelerationStructureVersionKHRtoAccelerationStructureVersionInfoKHR - renamed
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_KHRtoSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR - removed
VK_ERROR_INCOMPATIBLE_VERSION_KHR - added
AccelerationStructureCompatibilityKHRenum - remove return value from
getDeviceAccelerationStructureCompatibilityKHRand added return enum parameter
- renamed
- Require Vulkan 1.1
added creation time capture and replay flags
- added
AccelerationStructureCreateFlagBitsKHRandAccelerationStructureCreateFlagsKHR - renamed the
flagsmember ofAccelerationStructureCreateInfoKHRtobuildFlags(later removed) and added thecreateFlagsmember
- added
- change
cmdBuildAccelerationStructuresIndirectKHRto use buffer device address for indirect parameter - make
VK_KHR_deferred_host_operationsan interaction instead of a required extension (later went back on this) renamed
VkAccelerationStructureBuildOffsetInfoKHRtoAccelerationStructureBuildRangeInfoKHR- renamed the
ppOffsetInfosparameter ofcmdBuildAccelerationStructuresKHRtoppBuildRangeInfos
- renamed the
Re-unify geometry description between build and create
- remove
VkAccelerationStructureCreateGeometryTypeInfoKHRandVK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_GEOMETRY_TYPE_INFO_KHR - added
VkAccelerationStructureCreateSizeInfoKHRstructure (later removed) - change type of the
pGeometryInfosmember ofAccelerationStructureCreateInfoKHRfromVkAccelerationStructureCreateGeometryTypeInfoKHRtoAccelerationStructureGeometryKHR(later removed) - added
pCreateSizeInfosmember toAccelerationStructureCreateInfoKHR(later removed)
- remove
Fix ppGeometries ambiguity, add pGeometries
- remove
geometryArrayOfPointersmember of VkAccelerationStructureBuildGeometryInfoKHR - disambiguate two meanings of
ppGeometriesby explicitly addingpGeometriesto theAccelerationStructureBuildGeometryInfoKHRstructure and require one of them beNULL
- remove
- added nullDescriptor support for acceleration structures
- changed the
updatemember ofAccelerationStructureBuildGeometryInfoKHRfrom a bool to themodeBuildAccelerationStructureModeKHRenum which allows future extensibility in update types Clarify deferred host ops for pipeline creation
DeferredOperationKHRis now a top-level parameter forbuildAccelerationStructuresKHR,createRayTracingPipelinesKHR,copyAccelerationStructureToMemoryKHR,copyAccelerationStructureKHR, andcopyMemoryToAccelerationStructureKHR- removed
VkDeferredOperationInfoKHRstructure - change deferred host creation/return parameter behavior such that the implementation can modify such parameters until the deferred host operation completes
VK_KHR_deferred_host_operationsis required again
Change acceleration structure build to always be sized
- de-alias
AccelerationStructureMemoryRequirementsTypeNVandVkAccelerationStructureMemoryRequirementsTypeKHR, and removeVkAccelerationStructureMemoryRequirementsTypeKHR - add
getAccelerationStructureBuildSizesKHRcommand andAccelerationStructureBuildSizesInfoKHRstructure andSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHRenum to query sizes for acceleration structures and scratch storage - move size queries for scratch space to
getAccelerationStructureBuildSizesKHR - remove
compactedSize,buildFlags,maxGeometryCount,pGeometryInfos,pCreateSizeInfosmembers ofAccelerationStructureCreateInfoKHRand add thesizemember - add
maxVertexmember toAccelerationStructureGeometryTrianglesDataKHRstructure - remove
VkAccelerationStructureCreateSizeInfoKHRstructure
- de-alias
- What are the changes between the internal provisional (VK_KHR_ray_tracing v9) release and the final (VK_KHR_acceleration_structure v11) release?
refactor VK_KHR_ray_tracing into 3 extensions, enabling implementation flexibility and decoupling ray query support from ray pipelines:
VK_KHR_acceleration_structure(for acceleration structure operations)VK_KHR_ray_tracing_pipeline(for ray tracing pipeline and shader stages)VK_KHR_ray_query(for ray queries in existing shader stages)
clarify buffer usage flags for ray tracing
BUFFER_USAGE_RAY_TRACING_BIT_NVis left alone inVK_NV_ray_tracing(required onscratchandinstanceData)BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRis added as an alias ofBUFFER_USAGE_RAY_TRACING_BIT_NVinVK_KHR_ray_tracing_pipelineand is required on shader binding table buffersBUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHRis added inVK_KHR_acceleration_structurefor all vertex, index, transform, aabb, and instance buffer data referenced by device build commandsBUFFER_USAGE_STORAGE_BUFFER_BITis used forscratchData
- add max primitive counts (
ppMaxPrimitiveCounts) tocmdBuildAccelerationStructuresIndirectKHR Allocate acceleration structures from
VkBuffersand add a mode to constrain the device address- de-alias
BindAccelerationStructureMemoryInfoNVandbindAccelerationStructureMemoryNV, and removeVkBindAccelerationStructureMemoryInfoKHR,VkAccelerationStructureMemoryRequirementsInfoKHR, andvkGetAccelerationStructureMemoryRequirementsKHR - acceleration structures now take a
Bufferand offset at creation time for memory placement - add a new
BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHRbuffer usage for such buffers - add a new
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHRacceleration structure type for layering
- de-alias
- move
GEOMETRY_TYPE_INSTANCES_KHRto main enum instead of being added via extension - make build commands more consistent - all now build multiple
acceleration structures and are named plurally
(
cmdBuildAccelerationStructuresIndirectKHR,cmdBuildAccelerationStructuresKHR,buildAccelerationStructuresKHR) - add interactions with
DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITfor acceleration structures, including a new feature (descriptorBindingAccelerationStructureUpdateAfterBind) and 3 new properties (maxPerStageDescriptorAccelerationStructures,maxPerStageDescriptorUpdateAfterBindAccelerationStructures,maxDescriptorSetUpdateAfterBindAccelerationStructures) - extension is no longer provisional
- define synchronization requirements for builds, traces, and copies
- define synchronization requirements for AS build inputs and indirect build buffer
- What is
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHRfor?
RESOLVED: It is primarily intended for API layering. In DXR, the acceleration structure is basically just a buffer in a special layout, and you do not know at creation time whether it will be used as a top or bottom level acceleration structure. We thus added a generic acceleration structure type whose type is unknown at creation time, but is specified at build time instead. Applications which are written directly for Vulkan should not use it.
Version History
Revision 1, 2019-12-05 (Members of the Vulkan Ray Tracing TSG)
- Internal revisions (forked from VK_NV_ray_tracing)
Revision 2, 2019-12-20 (Daniel Koch, Eric Werness)
- Add const version of DeviceOrHostAddress (!3515)
- Add VU to clarify that only handles in the current pipeline are valid (!3518)
- Restore some missing VUs and add in-place update language (#1902, !3522)
- rename VkAccelerationStructureInstanceKHR member from accelerationStructure to accelerationStructureReference to better match its type (!3523)
- Allow VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS for pipeline creation if shader group handles cannot be reused (!3523)
- update documentation for the VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS error code and add missing documentation for new return codes from VK_KHR_deferred_host_operations (!3523)
- list new query types for VK_KHR_ray_tracing (!3523)
- Fix VU statements for VkAccelerationStructureGeometryKHR referring to correct union members and update to use more current wording (!3523)
Revision 3, 2020-01-10 (Daniel Koch, Jon Leech, Christoph Kubisch)
- Fix 'instance of' and 'that/which contains/defines' markup issues (!3528)
- factor out VK_KHR_pipeline_library as stand-alone extension (!3540)
Resolve Vulkan-hpp issues (!3543)
- add missing require for VkGeometryInstanceFlagsKHR
- de-alias VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV since the KHR structure is no longer equivalent
- add len to pDataSize attribute for vkWriteAccelerationStructuresPropertiesKHR
Revision 4, 2020-01-23 (Daniel Koch, Eric Werness)
- Improve vkWriteAccelerationStructuresPropertiesKHR, add return value and VUs (#1947)
- Clarify language to allow multiple raygen shaders (#1959)
- Various editorial feedback (!3556)
- Add language to help deal with looped self-intersecting fans (#1901)
- Change vkCmdTraceRays{,Indirect}KHR args to pointers (!3559)
- Add scratch address validation language (#1941, !3551)
- Fix definition and add hierarchy information for shader call scope (#1977, !3571)
Revision 5, 2020-02-04 (Eric Werness, Jeff Bolz, Daniel Koch)
- remove vestigial accelerationStructureUUID (!3582)
- update definition of repack instructions and improve memory model interactions (#1910, #1913, !3584)
- Fix wrong sType for VkPhysicalDeviceRayTracingFeaturesKHR (#1988)
- Use provisional SPIR-V capabilities (#1987)
- require rayTraversalPrimitiveCulling if rayQuery is supported (#1927)
- Miss shaders do not have object parameters (!3592)
- Fix missing required types in XML (!3592)
- clarify matching conditions for update (!3592)
- add goal that host and device builds be similar (!3592)
- clarify that
maxPrimitiveCountlimit should apply to triangles and AABBs (!3592) - Require alignment for instance arrayOfPointers (!3592)
- Zero is a valid value for instance flags (!3592)
- Add some alignment VUs that got lost in refactoring (!3592)
- Recommend TMin epsilon rather than culling (!3592)
- Get angle from dot product not cross product (!3592)
- Clarify that AH can access the payload and attributes (!3592)
- Match DXR behavior for inactive primitive definition (!3592)
- Use a more generic term than degenerate for inactive to avoid confusion (!3592)
Revision 6, 2020-02-20 (Daniel Koch)
- fix some dangling NV references (#1996)
- rename VkCmdTraceRaysIndirectCommandKHR to VkTraceRaysIndirectCommandKHR (!3607)
- update contributor list (!3611)
- use uint64_t instead of VkAccelerationStructureReferenceKHR in VkAccelerationStructureInstanceKHR (#2004)
Revision 7, 2020-02-28 (Tobias Hector)
- remove HitTKHR SPIR-V builtin (spirv/spirv-extensions#7)
Revision 8, 2020-03-06 (Tobias Hector, Dae Kim, Daniel Koch, Jeff Bolz, Eric Werness)
- explicitly state that Tmax is updated when new closest intersection is accepted (#2020,!3536)
- Made references to min and max t values consistent (!3644)
- finish enumerating differences relative to VK_NV_ray_tracing in issues (1) and (2) (#1974,!3642)
- fix formatting in some math equations (!3642)
- Restrict the Hit Kind operand of
OpReportIntersectionKHRto 7-bits (spirv/spirv-extensions#8,!3646) - Say ray tracing 'should' be watertight (#2008,!3631)
- Clarify memory requirements for ray tracing buffers (#2005,!3649)
- Add callable size limits (#1997,!3652)
Revision 9, 2020-04-15 (Eric Werness, Daniel Koch, Tobias Hector, Joshua Barczak)
- Add geometry flags to acceleration structure creation (!3672)
- add build scratch memory alignment (minAccelerationStructureScratchOffsetAlignment) (#2065,!3725)
- fix naming and return enum from vkGetDeviceAccelerationStructureCompatibilityKHR (#2051,!3726)
- require SPIR-V 1.4 (#2096,!3777)
- added creation time capture/replay flags (#2104,!3774)
- require Vulkan 1.1 (#2133,!3806)
- use device addresses instead of VkBuffers for ray tracing commands (#2074,!3815)
- add interactions with Vulkan 1.2 and VK_KHR_vulkan_memory_model (#2133,!3830)
- make VK_KHR_pipeline_library an interaction instead of required (2108,!3830)
- make VK_KHR_deferred_host_operations an interaction instead of required (#2045,!3830)
- removed maxCallableSize and added explicit stack size management for ray pipelines (#1997,!3817,!3772,!3844)
- improved documentation for VkAccelerationStructureVersionInfoKHR (#2135,3835)
- rename VkAccelerationStructureBuildOffsetInfoKHR to VkAccelerationStructureBuildRangeInfoKHR (#2058,!3754)
- Re-unify geometry description between build and create (!3754)
- Fix ppGeometries ambiguity, add pGeometries (#2032,!3811)
- add interactions with VK_EXT_robustness2 and allow nullDescriptor support for acceleration structures (#1920,!3848)
- added future extensibility for AS updates (#2114,!3849)
- Fix VU for dispatchrays and add a limit on the size of the full grid (#2160,!3851)
- Add shaderGroupHandleAlignment property (#2180,!3875)
- Clarify deferred host ops for pipeline creation (#2067,!3813)
- Change acceleration structure build to always be sized (2197,#2198,!3854,!3883,!3880)
Revision 10, 2020-07-03 (Mathieu Robart, Daniel Koch, Eric Werness, Tobias Hector)
- Decomposition of the specification, from VK_KHR_ray_tracing to VK_KHR_acceleration_structure (#1918,!3912)
- clarify buffer usage flags for ray tracing (#2181,!3939)
- add max primitive counts to build indirect command (#2233,!3944)
- Allocate acceleration structures from VkBuffers and add a mode to constrain the device address (#2131,!3936)
- Move VK_GEOMETRY_TYPE_INSTANCES_KHR to main enum (#2243,!3952)
- make build commands more consistent (#2247,!3958)
- add interactions with UPDATE_AFTER_BIND (#2128,!3986)
- correct and expand build command VUs (!4020)
- fix copy command VUs (!4018)
- added various alignment requirements (#2229,!3943)
- fix valid usage for arrays of geometryCount items (#2198,!4010)
- define what is allowed to change on RTAS updates and relevant VUs (#2177,!3961)
Revision 11, 2020-11-12 (Eric Werness, Josh Barczak, Daniel Koch, Tobias Hector)
- de-alias NV and KHR acceleration structure types and associated commands (#2271,!4035)
- specify alignment for host copy commands (#2273,!4037)
- document
FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR - specify that acceleration structures are non-linear (#2289,!4068)
- add several missing VUs for strides, vertexFormat, and indexType (#2315,!4069)
- restore VUs for VkAccelerationStructureBuildGeometryInfoKHR (#2337,!4098)
- ban multi-instance memory for host operations (#2324,!4102)
- allow dstAccelerationStructure to be null for vkGetAccelerationStructureBuildSizesKHR (#2330,!4111)
- more build VU cleanup (4130)
- specify host endianness for AS serialization (#2261,!4136)
- add invertible transform matrix VU (#1710,!4140)
- require geometryCount to be 1 for TLAS builds (!4145)
- improved validity conditions for build addresses (#4142)
- add single statement SPIR-V VUs, build limit VUs (!4158)
- document limits for vertex and aabb strides (#2390,!4184)
- specify that
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHRapplies to AS copies (4173) - define sync for AS build inputs and indirect buffer (#2407,!4208)
Revision 12, 2021-08-06 (Samuel Bourasseau)
- rename VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR to VK_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR (keep previous as alias).
- Clarify description and add note.
Revision 13, 2021-09-30 (Jon Leech)
- Add interaction with
VK_KHR_format_feature_flags2tovk.xml
- Add interaction with
See Also
AabbPositionsKHR, AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureBuildRangeInfoKHR,
AccelerationStructureBuildSizesInfoKHR,
AccelerationStructureBuildTypeKHR,
AccelerationStructureCompatibilityKHR,
AccelerationStructureCreateFlagBitsKHR,
AccelerationStructureCreateFlagsKHR,
AccelerationStructureCreateInfoKHR,
AccelerationStructureDeviceAddressInfoKHR,
AccelerationStructureGeometryAabbsDataKHR,
AccelerationStructureGeometryDataKHR,
AccelerationStructureGeometryInstancesDataKHR,
AccelerationStructureGeometryKHR,
AccelerationStructureGeometryTrianglesDataKHR,
AccelerationStructureInstanceKHR,
AccelerationStructureKHR,
AccelerationStructureTypeKHR, AccelerationStructureVersionInfoKHR,
BuildAccelerationStructureFlagBitsKHR,
BuildAccelerationStructureFlagsKHR,
BuildAccelerationStructureModeKHR, CopyAccelerationStructureInfoKHR,
CopyAccelerationStructureModeKHR,
CopyAccelerationStructureToMemoryInfoKHR,
CopyMemoryToAccelerationStructureInfoKHR,
DeviceOrHostAddressConstKHR, DeviceOrHostAddressKHR,
GeometryFlagBitsKHR, GeometryFlagsKHR,
GeometryInstanceFlagBitsKHR, GeometryInstanceFlagsKHR,
GeometryTypeKHR, PhysicalDeviceAccelerationStructureFeaturesKHR,
PhysicalDeviceAccelerationStructurePropertiesKHR,
TransformMatrixKHR, WriteDescriptorSetAccelerationStructureKHR,
buildAccelerationStructuresKHR,
cmdBuildAccelerationStructuresIndirectKHR,
cmdBuildAccelerationStructuresKHR, cmdCopyAccelerationStructureKHR,
cmdCopyAccelerationStructureToMemoryKHR,
cmdCopyMemoryToAccelerationStructureKHR,
cmdWriteAccelerationStructuresPropertiesKHR,
copyAccelerationStructureKHR, copyAccelerationStructureToMemoryKHR,
copyMemoryToAccelerationStructureKHR,
createAccelerationStructureKHR, destroyAccelerationStructureKHR,
getAccelerationStructureBuildSizesKHR,
getAccelerationStructureDeviceAddressKHR,
getDeviceAccelerationStructureCompatibilityKHR,
writeAccelerationStructuresPropertiesKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- destroyAccelerationStructureKHR :: forall io. MonadIO io => Device -> AccelerationStructureKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- cmdCopyAccelerationStructureKHR :: forall io. MonadIO io => CommandBuffer -> CopyAccelerationStructureInfoKHR -> io ()
- copyAccelerationStructureKHR :: forall io. MonadIO io => Device -> DeferredOperationKHR -> CopyAccelerationStructureInfoKHR -> io Result
- cmdCopyAccelerationStructureToMemoryKHR :: forall io. MonadIO io => CommandBuffer -> CopyAccelerationStructureToMemoryInfoKHR -> io ()
- copyAccelerationStructureToMemoryKHR :: forall io. MonadIO io => Device -> DeferredOperationKHR -> CopyAccelerationStructureToMemoryInfoKHR -> io Result
- cmdCopyMemoryToAccelerationStructureKHR :: forall io. MonadIO io => CommandBuffer -> CopyMemoryToAccelerationStructureInfoKHR -> io ()
- copyMemoryToAccelerationStructureKHR :: forall io. MonadIO io => Device -> DeferredOperationKHR -> CopyMemoryToAccelerationStructureInfoKHR -> io Result
- cmdWriteAccelerationStructuresPropertiesKHR :: forall io. MonadIO io => CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureKHR) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io ()
- writeAccelerationStructuresPropertiesKHR :: forall io. MonadIO io => Device -> ("accelerationStructures" ::: Vector AccelerationStructureKHR) -> QueryType -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: Word64) -> io ()
- getDeviceAccelerationStructureCompatibilityKHR :: forall io. MonadIO io => Device -> AccelerationStructureVersionInfoKHR -> io AccelerationStructureCompatibilityKHR
- createAccelerationStructureKHR :: forall a io. (Extendss AccelerationStructureCreateInfoKHR a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoKHR a -> ("allocator" ::: Maybe AllocationCallbacks) -> io AccelerationStructureKHR
- withAccelerationStructureKHR :: forall a io r. (Extendss AccelerationStructureCreateInfoKHR a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoKHR a -> Maybe AllocationCallbacks -> (io AccelerationStructureKHR -> (AccelerationStructureKHR -> io ()) -> r) -> r
- cmdBuildAccelerationStructuresKHR :: forall io. MonadIO io => CommandBuffer -> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR) -> ("buildRangeInfos" ::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)) -> io ()
- cmdBuildAccelerationStructuresIndirectKHR :: forall io. MonadIO io => CommandBuffer -> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR) -> ("indirectDeviceAddresses" ::: Vector DeviceAddress) -> ("indirectStrides" ::: Vector Word32) -> ("maxPrimitiveCounts" ::: Vector (Vector Word32)) -> io ()
- buildAccelerationStructuresKHR :: forall io. MonadIO io => Device -> DeferredOperationKHR -> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR) -> ("buildRangeInfos" ::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)) -> io Result
- getAccelerationStructureDeviceAddressKHR :: forall io. MonadIO io => Device -> AccelerationStructureDeviceAddressInfoKHR -> io DeviceAddress
- getAccelerationStructureBuildSizesKHR :: forall io. MonadIO io => Device -> AccelerationStructureBuildTypeKHR -> ("buildInfo" ::: AccelerationStructureBuildGeometryInfoKHR) -> ("maxPrimitiveCounts" ::: Vector Word32) -> io ("sizeInfo" ::: AccelerationStructureBuildSizesInfoKHR)
- pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- data WriteDescriptorSetAccelerationStructureKHR = WriteDescriptorSetAccelerationStructureKHR {}
- data PhysicalDeviceAccelerationStructureFeaturesKHR = PhysicalDeviceAccelerationStructureFeaturesKHR {}
- data PhysicalDeviceAccelerationStructurePropertiesKHR = PhysicalDeviceAccelerationStructurePropertiesKHR {
- maxGeometryCount :: Word64
- maxInstanceCount :: Word64
- maxPrimitiveCount :: Word64
- maxPerStageDescriptorAccelerationStructures :: Word32
- maxPerStageDescriptorUpdateAfterBindAccelerationStructures :: Word32
- maxDescriptorSetAccelerationStructures :: Word32
- maxDescriptorSetUpdateAfterBindAccelerationStructures :: Word32
- minAccelerationStructureScratchOffsetAlignment :: Word32
- data AccelerationStructureGeometryTrianglesDataKHR (es :: [Type]) = AccelerationStructureGeometryTrianglesDataKHR {}
- data AccelerationStructureGeometryAabbsDataKHR = AccelerationStructureGeometryAabbsDataKHR {}
- data AccelerationStructureGeometryInstancesDataKHR = AccelerationStructureGeometryInstancesDataKHR {}
- data AccelerationStructureGeometryKHR = AccelerationStructureGeometryKHR {}
- data AccelerationStructureBuildGeometryInfoKHR = AccelerationStructureBuildGeometryInfoKHR {
- type' :: AccelerationStructureTypeKHR
- flags :: BuildAccelerationStructureFlagsKHR
- mode :: BuildAccelerationStructureModeKHR
- srcAccelerationStructure :: AccelerationStructureKHR
- dstAccelerationStructure :: AccelerationStructureKHR
- geometries :: Vector AccelerationStructureGeometryKHR
- scratchData :: DeviceOrHostAddressKHR
- data AccelerationStructureBuildRangeInfoKHR = AccelerationStructureBuildRangeInfoKHR {}
- data AccelerationStructureCreateInfoKHR (es :: [Type]) = AccelerationStructureCreateInfoKHR {}
- data AabbPositionsKHR = AabbPositionsKHR {}
- data TransformMatrixKHR = TransformMatrixKHR {
- matrixRow0 :: (Float, Float, Float, Float)
- matrixRow1 :: (Float, Float, Float, Float)
- matrixRow2 :: (Float, Float, Float, Float)
- data AccelerationStructureInstanceKHR = AccelerationStructureInstanceKHR {}
- data AccelerationStructureDeviceAddressInfoKHR = AccelerationStructureDeviceAddressInfoKHR {}
- data AccelerationStructureVersionInfoKHR = AccelerationStructureVersionInfoKHR {}
- data CopyAccelerationStructureInfoKHR = CopyAccelerationStructureInfoKHR {}
- data CopyAccelerationStructureToMemoryInfoKHR = CopyAccelerationStructureToMemoryInfoKHR {}
- data CopyMemoryToAccelerationStructureInfoKHR = CopyMemoryToAccelerationStructureInfoKHR {}
- data AccelerationStructureBuildSizesInfoKHR = AccelerationStructureBuildSizesInfoKHR {}
- data DeviceOrHostAddressKHR
- = DeviceAddress DeviceAddress
- | HostAddress (Ptr ())
- data DeviceOrHostAddressConstKHR
- data AccelerationStructureGeometryDataKHR
- type GeometryInstanceFlagsKHR = GeometryInstanceFlagBitsKHR
- newtype GeometryInstanceFlagBitsKHR where
- GeometryInstanceFlagBitsKHR Flags
- pattern GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT :: GeometryInstanceFlagBitsKHR
- type GeometryFlagsKHR = GeometryFlagBitsKHR
- newtype GeometryFlagBitsKHR where
- type BuildAccelerationStructureFlagsKHR = BuildAccelerationStructureFlagBitsKHR
- newtype BuildAccelerationStructureFlagBitsKHR where
- BuildAccelerationStructureFlagBitsKHR Flags
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- type AccelerationStructureCreateFlagsKHR = AccelerationStructureCreateFlagBitsKHR
- newtype AccelerationStructureCreateFlagBitsKHR where
- AccelerationStructureCreateFlagBitsKHR Flags
- pattern ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR :: AccelerationStructureCreateFlagBitsKHR
- pattern ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV :: AccelerationStructureCreateFlagBitsKHR
- pattern ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: AccelerationStructureCreateFlagBitsKHR
- newtype CopyAccelerationStructureModeKHR where
- CopyAccelerationStructureModeKHR Int32
- pattern COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR :: CopyAccelerationStructureModeKHR
- newtype BuildAccelerationStructureModeKHR where
- newtype AccelerationStructureTypeKHR where
- newtype GeometryTypeKHR where
- GeometryTypeKHR Int32
- pattern GEOMETRY_TYPE_TRIANGLES_KHR :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_AABBS_KHR :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_INSTANCES_KHR :: GeometryTypeKHR
- newtype AccelerationStructureBuildTypeKHR where
- AccelerationStructureBuildTypeKHR Int32
- pattern ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR :: AccelerationStructureBuildTypeKHR
- pattern ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR :: AccelerationStructureBuildTypeKHR
- pattern ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR :: AccelerationStructureBuildTypeKHR
- newtype AccelerationStructureCompatibilityKHR where
- type KHR_ACCELERATION_STRUCTURE_SPEC_VERSION = 13
- pattern KHR_ACCELERATION_STRUCTURE_SPEC_VERSION :: forall a. Integral a => a
- type KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"
- pattern KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype AccelerationStructureKHR = AccelerationStructureKHR Word64
- newtype DeferredOperationKHR = DeferredOperationKHR Word64
- newtype DebugReportObjectTypeEXT where
- DebugReportObjectTypeEXT Int32
- pattern DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT :: DebugReportObjectTypeEXT
Documentation
destroyAccelerationStructureKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> AccelerationStructureKHR |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyAccelerationStructureKHR - Destroy an acceleration structure object
Valid Usage
- The ::accelerationStructure feature must be enabled
-
All submitted commands that refer to
accelerationStructuremust have completed execution -
If
AllocationCallbackswere provided whenaccelerationStructurewas created, a compatible set of callbacks must be provided here -
If no
AllocationCallbackswere provided whenaccelerationStructurewas created,pAllocatormust beNULL
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
If
accelerationStructureis notNULL_HANDLE,accelerationStructuremust be a validAccelerationStructureKHRhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
If
accelerationStructureis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
accelerationStructuremust be externally synchronized
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
AllocationCallbacks,
Device
cmdCopyAccelerationStructureKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> CopyAccelerationStructureInfoKHR |
|
| -> io () |
vkCmdCopyAccelerationStructureKHR - Copy an acceleration structure
Description
This command copies the pInfo->src acceleration structure to the
pInfo->dst acceleration structure in the manner specified by
pInfo->mode.
Accesses to pInfo->src and pInfo->dst must be
synchronized
with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR
or
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR
as appropriate.
Valid Usage
- The ::accelerationStructure feature must be enabled
- The
bufferused to createpInfo->srcmust be bound to device memory - The
bufferused to createpInfo->dstmust be bound to device memory
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfomust be a valid pointer to a validCopyAccelerationStructureInfoKHRstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_acceleration_structure,
CommandBuffer,
CopyAccelerationStructureInfoKHR
copyAccelerationStructureKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> DeferredOperationKHR |
|
| -> CopyAccelerationStructureInfoKHR |
|
| -> io Result |
vkCopyAccelerationStructureKHR - Copy an acceleration structure on the host
Description
This command fulfills the same task as cmdCopyAccelerationStructureKHR
but is executed by the host.
Valid Usage
- If
deferredOperationis notNULL_HANDLE, it must be a validDeferredOperationKHRobject - Any
previous deferred operation that was associated with
deferredOperationmust be complete - The
bufferused to createpInfo->srcmust be bound to host-visible device memory - The
bufferused to createpInfo->dstmust be bound to host-visible device memory feature must be enabled - The
bufferused to createpInfo->srcmust be bound to memory that was not allocated with multiple instances - The
bufferused to createpInfo->dstmust be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validDeferredOperationKHRhandle -
pInfomust be a valid pointer to a validCopyAccelerationStructureInfoKHRstructure - If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_acceleration_structure,
CopyAccelerationStructureInfoKHR,
DeferredOperationKHR,
Device
cmdCopyAccelerationStructureToMemoryKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> CopyAccelerationStructureToMemoryInfoKHR |
|
| -> io () |
vkCmdCopyAccelerationStructureToMemoryKHR - Copy an acceleration structure to device memory
Description
Accesses to pInfo->src must be
synchronized
with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR.
Accesses to the buffer indicated by pInfo->dst.deviceAddress must be
synchronized with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an and an access type of
ACCESS_TRANSFER_WRITE_BIT.
This command produces the same results as
copyAccelerationStructureToMemoryKHR, but writes its result to a
device address, and is executed on the device rather than the host. The
output may not necessarily be bit-for-bit identical, but it can be
equally used by either cmdCopyMemoryToAccelerationStructureKHR or
copyMemoryToAccelerationStructureKHR.
The defined header structure for the serialized data consists of:
UUID_SIZEbytes of data matchingPhysicalDeviceIDProperties::driverUUIDUUID_SIZEbytes of data identifying the compatibility for comparison usinggetDeviceAccelerationStructureCompatibilityKHR- A 64-bit integer of the total size matching the value queried using
QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR - A 64-bit integer of the deserialized size to be passed in to
AccelerationStructureCreateInfoKHR::size - A 64-bit integer of the count of the number of acceleration
structure handles following. This value matches the value queried
using
QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR. This will be zero for a bottom-level acceleration structure. For top-level acceleration structures this number is implementation-dependent; the number of and ordering of the handles may not match the instance descriptions which were used to build the acceleration structure.
The corresponding handles matching the values returned by
getAccelerationStructureDeviceAddressKHR or
getAccelerationStructureHandleNV
are tightly packed in the buffer following the count. The application is
expected to store a mapping between those handles and the original
application-generated bottom-level acceleration structures to provide
when deserializing. The serialized data is written to the buffer (or
read from the buffer) according to the host endianness.
Valid Usage
- The ::accelerationStructure feature must be enabled
-
pInfo->dst.deviceAddressmust be a valid device address for a buffer bound to device memory -
pInfo->dst.deviceAddressmust be aligned to256bytes - If the
buffer pointed to by
pInfo->dst.deviceAddressis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
bufferused to createpInfo->srcmust be bound to device memory
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfomust be a valid pointer to a validCopyAccelerationStructureToMemoryInfoKHRstructure -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_acceleration_structure,
CommandBuffer,
CopyAccelerationStructureToMemoryInfoKHR
copyAccelerationStructureToMemoryKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> DeferredOperationKHR |
|
| -> CopyAccelerationStructureToMemoryInfoKHR |
|
| -> io Result |
vkCopyAccelerationStructureToMemoryKHR - Serialize an acceleration structure on the host
Description
This command fulfills the same task as
cmdCopyAccelerationStructureToMemoryKHR but is executed by the host.
This command produces the same results as
cmdCopyAccelerationStructureToMemoryKHR, but writes its result
directly to a host pointer, and is executed on the host rather than the
device. The output may not necessarily be bit-for-bit identical, but
it can be equally used by either
cmdCopyMemoryToAccelerationStructureKHR or
copyMemoryToAccelerationStructureKHR.
Valid Usage
- The ::accelerationStructureHostCommands feature must be enabled
-
If
deferredOperationis notNULL_HANDLE, it must be a validDeferredOperationKHRobject -
Any previous deferred operation that was associated with
deferredOperationmust be complete - The
bufferused to createpInfo->srcmust be bound to host-visible device memory -
pInfo->dst.hostAddressmust be a valid host pointer -
pInfo->dst.hostAddressmust be aligned to 16 bytes - The
bufferused to createpInfo->srcmust be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validDeferredOperationKHRhandle -
pInfomust be a valid pointer to a validCopyAccelerationStructureToMemoryInfoKHRstructure -
If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_acceleration_structure,
CopyAccelerationStructureToMemoryInfoKHR,
DeferredOperationKHR,
Device
cmdCopyMemoryToAccelerationStructureKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> CopyMemoryToAccelerationStructureInfoKHR |
|
| -> io () |
vkCmdCopyMemoryToAccelerationStructureKHR - Copy device memory to an acceleration structure
Description
Accesses to pInfo->dst must be
synchronized
with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR.
Accesses to the buffer indicated by pInfo->src.deviceAddress must be
synchronized with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an access type of
ACCESS_TRANSFER_READ_BIT.
This command can accept acceleration structures produced by either
cmdCopyAccelerationStructureToMemoryKHR or
copyAccelerationStructureToMemoryKHR.
The structure provided as input to deserialize is as described in
cmdCopyAccelerationStructureToMemoryKHR, with any acceleration
structure handles filled in with the newly-queried handles to bottom
level acceleration structures created before deserialization. These do
not need to be built at deserialize time, but must be created.
Valid Usage
- The ::accelerationStructure feature must be enabled
-
pInfo->src.deviceAddressmust be a valid device address for a buffer bound to device memory -
pInfo->src.deviceAddressmust be aligned to256bytes - If the
buffer pointed to by
pInfo->src.deviceAddressis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
bufferused to createpInfo->dstmust be bound to device memory
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfomust be a valid pointer to a validCopyMemoryToAccelerationStructureInfoKHRstructure -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_acceleration_structure,
CommandBuffer,
CopyMemoryToAccelerationStructureInfoKHR
copyMemoryToAccelerationStructureKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> DeferredOperationKHR |
|
| -> CopyMemoryToAccelerationStructureInfoKHR |
|
| -> io Result |
vkCopyMemoryToAccelerationStructureKHR - Deserialize an acceleration structure on the host
Description
This command fulfills the same task as
cmdCopyMemoryToAccelerationStructureKHR but is executed by the host.
This command can accept acceleration structures produced by either
cmdCopyAccelerationStructureToMemoryKHR or
copyAccelerationStructureToMemoryKHR.
Valid Usage
- The ::accelerationStructureHostCommands feature must be enabled
-
If
deferredOperationis notNULL_HANDLE, it must be a validDeferredOperationKHRobject -
Any previous deferred operation that was associated with
deferredOperationmust be complete -
pInfo->src.hostAddressmust be a valid host pointer -
pInfo->src.hostAddressmust be aligned to 16 bytes - The
bufferused to createpInfo->dstmust be bound to host-visible device memory - The
bufferused to createpInfo->dstmust be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validDeferredOperationKHRhandle -
pInfomust be a valid pointer to a validCopyMemoryToAccelerationStructureInfoKHRstructure -
If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_acceleration_structure,
CopyMemoryToAccelerationStructureInfoKHR,
DeferredOperationKHR,
Device
cmdWriteAccelerationStructuresPropertiesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("accelerationStructures" ::: Vector AccelerationStructureKHR) |
|
| -> QueryType |
|
| -> QueryPool |
|
| -> ("firstQuery" ::: Word32) |
|
| -> io () |
vkCmdWriteAccelerationStructuresPropertiesKHR - Write acceleration structure result parameters to query results.
Description
Accesses to any of the acceleration structures listed in
pAccelerationStructures must be
synchronized
with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR.
- If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, then the value written out is the number of bytes required by a compacted acceleration structure. - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, then the value written out is the number of bytes required by a serialized acceleration structure.
Valid Usage
- The ::accelerationStructure feature must be enabled
-
queryPoolmust have been created with aqueryTypematchingqueryType -
The queries identified by
queryPoolandfirstQuerymust be unavailable -
The
bufferused to create each acceleration structure inpAccelerationStructuresmust be bound to device memory - The
sum of
queryplusaccelerationStructureCountmust be less than or equal to the number of queries inqueryPool -
All acceleration structures in
pAccelerationStructuresmust have been built prior to the execution of this command -
All acceleration structures in
pAccelerationStructuresmust have been built withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRifqueryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR -
queryTypemust beQUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR,QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR,QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHRorQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalidAccelerationStructureKHRhandles -
queryTypemust be a validQueryTypevalue -
queryPoolmust be a validQueryPoolhandle -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
-
accelerationStructureCountmust be greater than0 -
Each of
commandBuffer,queryPool, and the elements ofpAccelerationStructuresmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
CommandBuffer,
QueryPool,
QueryType
writeAccelerationStructuresPropertiesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> ("accelerationStructures" ::: Vector AccelerationStructureKHR) |
|
| -> QueryType |
|
| -> ("dataSize" ::: Word64) |
|
| -> ("data" ::: Ptr ()) |
|
| -> ("stride" ::: Word64) |
|
| -> io () |
vkWriteAccelerationStructuresPropertiesKHR - Query acceleration structure meta-data on the host
Description
This command fulfills the same task as
cmdWriteAccelerationStructuresPropertiesKHR but is executed by the
host.
Valid Usage
- The ::accelerationStructureHostCommands feature must be enabled
-
All acceleration structures in
pAccelerationStructuresmust have been built prior to the execution of this command -
All acceleration structures in
pAccelerationStructuresmust have been built withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRifqueryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR -
queryTypemust beQUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR,QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR,QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHRorQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, thenstridemust be a multiple of the size ofDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, thenpDatamust point to aDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, thenstridemust be a multiple of the size ofDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR, thenpDatamust point to aDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, thenstridemust be a multiple of the size ofDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR, thenpDatamust point to aDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, thenstridemust be a multiple of the size ofDeviceSize - If
queryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR, thenpDatamust point to aDeviceSize -
dataSizemust be greater than or equal toaccelerationStructureCount*stride - The
bufferused to create each acceleration structure inpAccelerationStructuresmust be bound to host-visible device memory - The
bufferused to create each acceleration structure inpAccelerationStructuresmust be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalidAccelerationStructureKHRhandles -
queryTypemust be a validQueryTypevalue -
pDatamust be a valid pointer to an array ofdataSizebytes -
accelerationStructureCountmust be greater than0 -
dataSizemust be greater than0 -
Each element of
pAccelerationStructuresmust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
Device,
QueryType
getDeviceAccelerationStructureCompatibilityKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> AccelerationStructureVersionInfoKHR |
|
| -> io AccelerationStructureCompatibilityKHR |
vkGetDeviceAccelerationStructureCompatibilityKHR - Check if a serialized acceleration structure is compatible with the current device
Valid Usage
- The ::accelerationStructure feature must be enabled
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pVersionInfomust be a valid pointer to a validAccelerationStructureVersionInfoKHRstructure -
pCompatibilitymust be a valid pointer to aAccelerationStructureCompatibilityKHRvalue
See Also
VK_KHR_acceleration_structure,
AccelerationStructureCompatibilityKHR,
AccelerationStructureVersionInfoKHR, Device
createAccelerationStructureKHR Source #
Arguments
| :: forall a io. (Extendss AccelerationStructureCreateInfoKHR a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> AccelerationStructureCreateInfoKHR a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io AccelerationStructureKHR |
vkCreateAccelerationStructureKHR - Create a new acceleration structure object
Description
Similar to other objects in Vulkan, the acceleration structure creation
merely creates an object with a specific “shape”. The type and quantity
of geometry that can be built into an acceleration structure is
determined by the parameters of AccelerationStructureCreateInfoKHR.
The acceleration structure data is stored in the object referred to by
AccelerationStructureCreateInfoKHR::buffer. Once memory has been
bound to that buffer, it must be populated by acceleration structure
build or acceleration structure copy commands such as
cmdBuildAccelerationStructuresKHR, buildAccelerationStructuresKHR,
cmdCopyAccelerationStructureKHR, and copyAccelerationStructureKHR.
Note
The expected usage for a trace capture/replay tool is that it will
serialize and later deserialize the acceleration structure data using
acceleration structure copy commands. During capture the tool will use
copyAccelerationStructureToMemoryKHR or
cmdCopyAccelerationStructureToMemoryKHR with a mode of
COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR, and
copyMemoryToAccelerationStructureKHR or
cmdCopyMemoryToAccelerationStructureKHR with a mode of
COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR during replay.
The input buffers passed to acceleration structure build commands will be referenced by the implementation for the duration of the command. After the command completes, the acceleration structure may hold a reference to any acceleration structure specified by an active instance contained therein. Apart from this referencing, acceleration structures must be fully self-contained. The application can reuse or free any memory which was used by the command as an input or as scratch without affecting the results of ray traversal.
Valid Usage
- The ::accelerationStructure feature must be enabled
- If
AccelerationStructureCreateInfoKHR::deviceAddressis not zero, the accelerationStructureCaptureReplay feature must be enabled - If
devicewas created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pCreateInfomust be a valid pointer to a validAccelerationStructureCreateInfoKHRstructure - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pAccelerationStructuremust be a valid pointer to aAccelerationStructureKHRhandle
Return Codes
See Also
VK_KHR_acceleration_structure,
AccelerationStructureCreateInfoKHR,
AccelerationStructureKHR,
AllocationCallbacks,
Device
withAccelerationStructureKHR :: forall a io r. (Extendss AccelerationStructureCreateInfoKHR a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoKHR a -> Maybe AllocationCallbacks -> (io AccelerationStructureKHR -> (AccelerationStructureKHR -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createAccelerationStructureKHR and destroyAccelerationStructureKHR
To ensure that destroyAccelerationStructureKHR is always called: pass
bracket (or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,) as the last argument.
cmdBuildAccelerationStructuresKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR) |
|
| -> ("buildRangeInfos" ::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)) |
|
| -> io () |
vkCmdBuildAccelerationStructuresKHR - Build an acceleration structure
Description
The cmdBuildAccelerationStructuresKHR command provides the ability to
initiate multiple acceleration structures builds, however there is no
ordering or synchronization implied between any of the individual
acceleration structure builds.
Note
This means that an application cannot build a top-level acceleration
structure in the same cmdBuildAccelerationStructuresKHR call as the
associated bottom-level or instance acceleration structures are being
built. There also cannot be any memory aliasing between any
acceleration structure memories or scratch memories being used by any of
the builds.
Accesses to the acceleration structure scratch buffers as identified by
the AccelerationStructureBuildGeometryInfoKHR::scratchData buffer
device addresses must be
synchronized
with the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage
and an
access type
of
(ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR
|
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR).
Accesses to each
AccelerationStructureBuildGeometryInfoKHR::srcAccelerationStructure
and
AccelerationStructureBuildGeometryInfoKHR::dstAccelerationStructure
must be
synchronized
with the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR
or
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR,
as appropriate.
Accesses to other input buffers as identified by any used values of
AccelerationStructureGeometryMotionTrianglesDataNV::vertexData,
AccelerationStructureGeometryTrianglesDataKHR::vertexData,
AccelerationStructureGeometryTrianglesDataKHR::indexData,
AccelerationStructureGeometryTrianglesDataKHR::transformData,
AccelerationStructureGeometryAabbsDataKHR::data, and
AccelerationStructureGeometryInstancesDataKHR::data must be
synchronized
with the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage
and an
access type
of ACCESS_SHADER_READ_BIT.
Valid Usage
- The ::accelerationStructure feature must be enabled
- The
modemember of each element ofpInfosmust be a validBuildAccelerationStructureModeKHRvalue -
If the
srcAccelerationStructuremember of any element ofpInfosis notNULL_HANDLE, thesrcAccelerationStructuremember must be a validAccelerationStructureKHRhandle - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructuremember must not beNULL_HANDLE - The
srcAccelerationStructuremember of any element ofpInfosmust not be the same acceleration structure as thedstAccelerationStructuremember of any other element ofpInfos -
The
dstAccelerationStructuremember of any element ofpInfosmust not be the same acceleration structure as thedstAccelerationStructuremember of any other element ofpInfos -
The
dstAccelerationStructuremember of any element ofpInfosmust be a validAccelerationStructureKHRhandle - For each
element of
pInfos, if itstypemember isACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, itsdstAccelerationStructuremember must have been created with a value ofAccelerationStructureCreateInfoKHR::typeequal to eitherACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - For each
element of
pInfos, if itstypemember isACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, itsdstAccelerationStructuremember must have been created with a value ofAccelerationStructureCreateInfoKHR::typeequal to eitherACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, inactive primitives in itssrcAccelerationStructuremember must not be made active - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, active primitives in itssrcAccelerationStructuremember must not be made inactive - The
dstAccelerationStructuremember of any element ofpInfosmust not be referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRin any other element ofpInfos -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thesrcAccelerationStructuremember of any other element ofpInfoswith amodeequal toBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thedstAccelerationStructuremember of any other element ofpInfos, which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thescratchDatamember of any element ofpInfos(including the same element), which is accessed by this command - The
range of memory backing the
scratchDatamember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thescratchDatamember of any other element ofpInfos, which is accessed by this command - The
range of memory backing the
scratchDatamember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thesrcAccelerationStructuremember of any element ofpInfoswith amodeequal toBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR(including the same element), which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing any acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRin any other element ofpInfos, which is accessed by this command - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructuremember must have previously been constructed withBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHRset inAccelerationStructureBuildGeometryInfoKHR::flagsin the build - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructureanddstAccelerationStructuremembers must either be the sameAccelerationStructureKHR, or not have any memory aliasing - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itsgeometryCountmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itsflagsmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itstypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, itsgeometryTypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, itsflagsmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.vertexFormatmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.maxVertexmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.indexTypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, if itsgeometry.triangles.transformDataaddress wasNULLwhensrcAccelerationStructurewas last built, then it must beNULL - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, if itsgeometry.triangles.transformDataaddress was notNULLwhensrcAccelerationStructurewas last built, then it must not beNULL - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, andgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR, then the value of each index referenced must be the same as the corresponding index value whensrcAccelerationStructurewas last built - For
each
AccelerationStructureBuildRangeInfoKHRreferenced by this command, itsprimitiveCountmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each
AccelerationStructureBuildRangeInfoKHRreferenced by this command, if the corresponding geometry uses indices, itsfirstVertexmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, the correspondingppBuildRangeInfos[i][j].primitiveCountmust be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxInstanceCount - For each
element of
pInfos, thebufferused to create itsdstAccelerationStructuremember must be bound to device memory - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRthebufferused to create itssrcAccelerationStructuremember must be bound to device memory - For each
element of
pInfos, thebufferused to create each acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRmust be bound to device memory - If
pInfos[i].modeisBUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, all addresses betweenpInfos[i].scratchData.deviceAddressandpInfos[i].scratchData.deviceAddress+ N - 1 must be in the buffer device address range of the same buffer, where N is given by thebuildScratchSizemember of theAccelerationStructureBuildSizesInfoKHRstructure returned from a call togetAccelerationStructureBuildSizesKHRwith an identicalAccelerationStructureBuildGeometryInfoKHRstructure and primitive count - If
pInfos[i].modeisBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, all addresses betweenpInfos[i].scratchData.deviceAddressandpInfos[i].scratchData.deviceAddress+ N - 1 must be in the buffer device address range of the same buffer, where N is given by theupdateScratchSizemember of theAccelerationStructureBuildSizesInfoKHRstructure returned from a call togetAccelerationStructureBuildSizesKHRwith an identicalAccelerationStructureBuildGeometryInfoKHRstructure and primitive count - The
buffers from which the buffer device addresses for all of the
geometry.triangles.vertexData,geometry.triangles.indexData,geometry.triangles.transformData,geometry.aabbs.data, andgeometry.instances.datamembers of allpInfos[i].pGeometriesandpInfos[i].ppGeometriesare queried must have been created with theBUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHRusage flag - The buffer
from which the buffer device address
pInfos[i].scratchData.deviceAddressis queried must have been created withBUFFER_USAGE_STORAGE_BUFFER_BITusage flag - For each
element of
pInfos, itsscratchData.deviceAddressmember must be a valid device address obtained fromgetBufferDeviceAddress - For each
element of
pInfos, ifscratchData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For each
element of
pInfos, itsscratchData.deviceAddressmember must be a multiple ofPhysicalDeviceAccelerationStructurePropertiesKHR::minAccelerationStructureScratchOffsetAlignment - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR,geometry.triangles.vertexData.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.vertexData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR,geometry.triangles.vertexData.deviceAddressmust be aligned to the size in bytes of the smallest component of the format invertexFormat - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR,geometry.triangles.indexData.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR, ifgeometry.triangles.indexData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, and withgeometry.triangles.indexTypenot equal toINDEX_TYPE_NONE_KHR,geometry.triangles.indexData.deviceAddressmust be aligned to the size in bytes of the type inindexType - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.deviceAddressis not0, it must be a valid device address obtained fromgetBufferDeviceAddress - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.deviceAddressis not0, it must be aligned to16bytes - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR,geometry.aabbs.data.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR, ifgeometry.aabbs.data.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR,geometry.aabbs.data.deviceAddressmust be aligned to8bytes - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.arrayOfPointersisFALSE,geometry.instances.data.deviceAddressmust be aligned to16bytes - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.arrayOfPointersisTRUE,geometry.instances.data.deviceAddressmust be aligned to8bytes - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.arrayOfPointersisTRUE, each element ofgeometry.instances.data.deviceAddressin device memory must be aligned to16bytes - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR,geometry.instances.data.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.instances.data.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For any
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, eachAccelerationStructureInstanceKHR::accelerationStructureReferencevalue ingeometry.instances.data.deviceAddressmust be a valid device address containing a value obtained fromgetAccelerationStructureDeviceAddressKHRor0 - For each
pInfos[i],dstAccelerationStructuremust have been created with a value ofAccelerationStructureCreateInfoKHR::sizegreater than or equal to the memory size required by the build operation, as returned bygetAccelerationStructureBuildSizesKHRwithpBuildInfo=pInfos[i] and with each element of thepMaxPrimitiveCountsarray greater than or equal to the equivalentppBuildRangeInfos[i][j].primitiveCountvalues forjin [0,pInfos[i].geometryCount) -
Each element of
ppBuildRangeInfos[i] must be a valid pointer to an array ofpInfos[i].geometryCountAccelerationStructureBuildRangeInfoKHRstructures
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfosmust be a valid pointer to an array ofinfoCountvalidAccelerationStructureBuildGeometryInfoKHRstructures -
ppBuildRangeInfosmust be a valid pointer to an array ofinfoCountAccelerationStructureBuildRangeInfoKHRstructures -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
-
infoCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureBuildRangeInfoKHR,
CommandBuffer
cmdBuildAccelerationStructuresIndirectKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR) |
|
| -> ("indirectDeviceAddresses" ::: Vector DeviceAddress) |
|
| -> ("indirectStrides" ::: Vector Word32) |
|
| -> ("maxPrimitiveCounts" ::: Vector (Vector Word32)) |
|
| -> io () |
vkCmdBuildAccelerationStructuresIndirectKHR - Build an acceleration structure with some parameters provided on the device
Description
Accesses to acceleration structures, scratch buffers, vertex buffers,
index buffers, and instance buffers must be synchronized as with
cmdBuildAccelerationStructuresKHR.
Accesses to any element of pIndirectDeviceAddresses must be
synchronized
with the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage
and an
access type
of
ACCESS_INDIRECT_COMMAND_READ_BIT.
Valid Usage
- The ::accelerationStructureIndirectBuild feature must be enabled
- The
modemember of each element ofpInfosmust be a validBuildAccelerationStructureModeKHRvalue -
If the
srcAccelerationStructuremember of any element ofpInfosis notNULL_HANDLE, thesrcAccelerationStructuremember must be a validAccelerationStructureKHRhandle - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructuremember must not beNULL_HANDLE - The
srcAccelerationStructuremember of any element ofpInfosmust not be the same acceleration structure as thedstAccelerationStructuremember of any other element ofpInfos -
The
dstAccelerationStructuremember of any element ofpInfosmust not be the same acceleration structure as thedstAccelerationStructuremember of any other element ofpInfos -
The
dstAccelerationStructuremember of any element ofpInfosmust be a validAccelerationStructureKHRhandle - For
each element of
pInfos, if itstypemember isACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, itsdstAccelerationStructuremember must have been created with a value ofAccelerationStructureCreateInfoKHR::typeequal to eitherACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - For
each element of
pInfos, if itstypemember isACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, itsdstAccelerationStructuremember must have been created with a value ofAccelerationStructureCreateInfoKHR::typeequal to eitherACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, inactive primitives in itssrcAccelerationStructuremember must not be made active - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, active primitives in itssrcAccelerationStructuremember must not be made inactive - The
dstAccelerationStructuremember of any element ofpInfosmust not be referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRin any other element ofpInfos -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thesrcAccelerationStructuremember of any other element ofpInfoswith amodeequal toBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thedstAccelerationStructuremember of any other element ofpInfos, which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thescratchDatamember of any element ofpInfos(including the same element), which is accessed by this command -
The range of memory backing the
scratchDatamember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thescratchDatamember of any other element ofpInfos, which is accessed by this command -
The range of memory backing the
scratchDatamember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thesrcAccelerationStructuremember of any element ofpInfoswith amodeequal toBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR(including the same element), which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing any acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRin any other element ofpInfos, which is accessed by this command - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructuremember must have previously been constructed withBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHRset inAccelerationStructureBuildGeometryInfoKHR::flagsin the build - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructureanddstAccelerationStructuremembers must either be the sameAccelerationStructureKHR, or not have any memory aliasing - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itsgeometryCountmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itsflagsmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itstypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, itsgeometryTypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, itsflagsmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.vertexFormatmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.maxVertexmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.indexTypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, if itsgeometry.triangles.transformDataaddress wasNULLwhensrcAccelerationStructurewas last built, then it must beNULL - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, if itsgeometry.triangles.transformDataaddress was notNULLwhensrcAccelerationStructurewas last built, then it must not beNULL - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, andgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR, then the value of each index referenced must be the same as the corresponding index value whensrcAccelerationStructurewas last built -
For each
AccelerationStructureBuildRangeInfoKHRreferenced by this command, itsprimitiveCountmember must have the same value which was specified whensrcAccelerationStructurewas last built -
For each
AccelerationStructureBuildRangeInfoKHRreferenced by this command, if the corresponding geometry uses indices, itsfirstVertexmember must have the same value which was specified whensrcAccelerationStructurewas last built - For
each element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, the correspondingppMaxPrimitiveCounts[i][j] must be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxInstanceCount - For
each element of
pInfos, thebufferused to create itsdstAccelerationStructuremember must be bound to device memory - For
each element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRthebufferused to create itssrcAccelerationStructuremember must be bound to device memory - For
each element of
pInfos, thebufferused to create each acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRmust be bound to device memory - If
pInfos[i].modeisBUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, all addresses betweenpInfos[i].scratchData.deviceAddressandpInfos[i].scratchData.deviceAddress+ N - 1 must be in the buffer device address range of the same buffer, where N is given by thebuildScratchSizemember of theAccelerationStructureBuildSizesInfoKHRstructure returned from a call togetAccelerationStructureBuildSizesKHRwith an identicalAccelerationStructureBuildGeometryInfoKHRstructure and primitive count - If
pInfos[i].modeisBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, all addresses betweenpInfos[i].scratchData.deviceAddressandpInfos[i].scratchData.deviceAddress+ N - 1 must be in the buffer device address range of the same buffer, where N is given by theupdateScratchSizemember of theAccelerationStructureBuildSizesInfoKHRstructure returned from a call togetAccelerationStructureBuildSizesKHRwith an identicalAccelerationStructureBuildGeometryInfoKHRstructure and primitive count -
The buffers from which the buffer device addresses for all of the
geometry.triangles.vertexData,geometry.triangles.indexData,geometry.triangles.transformData,geometry.aabbs.data, andgeometry.instances.datamembers of allpInfos[i].pGeometriesandpInfos[i].ppGeometriesare queried must have been created with theBUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHRusage flag - The
buffer from which the buffer device address
pInfos[i].scratchData.deviceAddressis queried must have been created withBUFFER_USAGE_STORAGE_BUFFER_BITusage flag - For
each element of
pInfos, itsscratchData.deviceAddressmember must be a valid device address obtained fromgetBufferDeviceAddress - For
each element of
pInfos, ifscratchData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For
each element of
pInfos, itsscratchData.deviceAddressmember must be a multiple ofPhysicalDeviceAccelerationStructurePropertiesKHR::minAccelerationStructureScratchOffsetAlignment - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR,geometry.triangles.vertexData.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.vertexData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR,geometry.triangles.vertexData.deviceAddressmust be aligned to the size in bytes of the smallest component of the format invertexFormat - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR,geometry.triangles.indexData.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR, ifgeometry.triangles.indexData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, and withgeometry.triangles.indexTypenot equal toINDEX_TYPE_NONE_KHR,geometry.triangles.indexData.deviceAddressmust be aligned to the size in bytes of the type inindexType - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.deviceAddressis not0, it must be a valid device address obtained fromgetBufferDeviceAddress - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.deviceAddressis not0, it must be aligned to16bytes - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR,geometry.aabbs.data.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR, ifgeometry.aabbs.data.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR,geometry.aabbs.data.deviceAddressmust be aligned to8bytes - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.arrayOfPointersisFALSE,geometry.instances.data.deviceAddressmust be aligned to16bytes - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.arrayOfPointersisTRUE,geometry.instances.data.deviceAddressmust be aligned to8bytes - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.arrayOfPointersisTRUE, each element ofgeometry.instances.data.deviceAddressin device memory must be aligned to16bytes - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR,geometry.instances.data.deviceAddressmust be a valid device address obtained fromgetBufferDeviceAddress - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, ifgeometry.instances.data.deviceAddressis the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemoryobject - For
any element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, eachAccelerationStructureInstanceKHR::accelerationStructureReferencevalue ingeometry.instances.data.deviceAddressmust be a valid device address containing a value obtained fromgetAccelerationStructureDeviceAddressKHRor0 -
For any element of
pIndirectDeviceAddresses, if the buffer from which it was queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
For any element of
pIndirectDeviceAddresses[i], all device addresses betweenpIndirectDeviceAddresses[i] andpIndirectDeviceAddresses[i] + (pInfos[i].geometryCount×pIndirectStrides[i]) - 1 must be in the buffer device address range of the same buffer -
For any element of
pIndirectDeviceAddresses, the buffer from which it was queried must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
Each element of
pIndirectDeviceAddressesmust be a multiple of4 -
Each element of
pIndirectStridesmust be a multiple of4 -
commandBuffermust not be a protected command buffer -
Each
AccelerationStructureBuildRangeInfoKHRstructure referenced by any element ofpIndirectDeviceAddressesmust be a validAccelerationStructureBuildRangeInfoKHRstructure -
pInfos[i].dstAccelerationStructuremust have been created with a value ofAccelerationStructureCreateInfoKHR::sizegreater than or equal to the memory size required by the build operation, as returned bygetAccelerationStructureBuildSizesKHRwithpBuildInfo=pInfos[i] andpMaxPrimitiveCounts=ppMaxPrimitiveCounts[i] -
Each
ppMaxPrimitiveCounts[i][j] must be greater than or equal to theprimitiveCountvalue specified by theAccelerationStructureBuildRangeInfoKHRstructure located atpIndirectDeviceAddresses[i] + (j×pIndirectStrides[i])
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfosmust be a valid pointer to an array ofinfoCountvalidAccelerationStructureBuildGeometryInfoKHRstructures -
pIndirectDeviceAddressesmust be a valid pointer to an array ofinfoCountDeviceAddressvalues -
pIndirectStridesmust be a valid pointer to an array ofinfoCountuint32_tvalues -
ppMaxPrimitiveCountsmust be a valid pointer to an array ofinfoCountuint32_tvalues -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
-
infoCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR,
CommandBuffer,
DeviceAddress
buildAccelerationStructuresKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> DeferredOperationKHR |
|
| -> ("infos" ::: Vector AccelerationStructureBuildGeometryInfoKHR) |
|
| -> ("buildRangeInfos" ::: Vector (Vector AccelerationStructureBuildRangeInfoKHR)) |
|
| -> io Result |
vkBuildAccelerationStructuresKHR - Build an acceleration structure on the host
Description
This command fulfills the same task as
cmdBuildAccelerationStructuresKHR but is executed by the host.
The buildAccelerationStructuresKHR command provides the ability to
initiate multiple acceleration structures builds, however there is no
ordering or synchronization implied between any of the individual
acceleration structure builds.
Note
This means that an application cannot build a top-level acceleration
structure in the same buildAccelerationStructuresKHR call as the
associated bottom-level or instance acceleration structures are being
built. There also cannot be any memory aliasing between any
acceleration structure memories or scratch memories being used by any of
the builds.
Valid Usage
- The ::accelerationStructureHostCommands feature must be enabled
- The
modemember of each element ofpInfosmust be a validBuildAccelerationStructureModeKHRvalue -
If the
srcAccelerationStructuremember of any element ofpInfosis notNULL_HANDLE, thesrcAccelerationStructuremember must be a validAccelerationStructureKHRhandle - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructuremember must not beNULL_HANDLE - The
srcAccelerationStructuremember of any element ofpInfosmust not be the same acceleration structure as thedstAccelerationStructuremember of any other element ofpInfos -
The
dstAccelerationStructuremember of any element ofpInfosmust not be the same acceleration structure as thedstAccelerationStructuremember of any other element ofpInfos -
The
dstAccelerationStructuremember of any element ofpInfosmust be a validAccelerationStructureKHRhandle - For each
element of
pInfos, if itstypemember isACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, itsdstAccelerationStructuremember must have been created with a value ofAccelerationStructureCreateInfoKHR::typeequal to eitherACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - For each
element of
pInfos, if itstypemember isACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR, itsdstAccelerationStructuremember must have been created with a value ofAccelerationStructureCreateInfoKHR::typeequal to eitherACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, inactive primitives in itssrcAccelerationStructuremember must not be made active - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, active primitives in itssrcAccelerationStructuremember must not be made inactive - The
dstAccelerationStructuremember of any element ofpInfosmust not be referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRin any other element ofpInfos -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thesrcAccelerationStructuremember of any other element ofpInfoswith amodeequal toBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thedstAccelerationStructuremember of any other element ofpInfos, which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thescratchDatamember of any element ofpInfos(including the same element), which is accessed by this command - The range
of memory backing the
scratchDatamember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thescratchDatamember of any other element ofpInfos, which is accessed by this command - The range
of memory backing the
scratchDatamember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thesrcAccelerationStructuremember of any element ofpInfoswith amodeequal toBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR(including the same element), which is accessed by this command -
The range of memory backing the
dstAccelerationStructuremember of any element ofpInfosthat is accessed by this command must not overlap the memory backing any acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRin any other element ofpInfos, which is accessed by this command - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructuremember must have previously been constructed withBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHRset inAccelerationStructureBuildGeometryInfoKHR::flagsin the build - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itssrcAccelerationStructureanddstAccelerationStructuremembers must either be the sameAccelerationStructureKHR, or not have any memory aliasing - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itsgeometryCountmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itsflagsmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, itstypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, itsgeometryTypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, itsflagsmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.vertexFormatmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.maxVertexmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, itsgeometry.triangles.indexTypemember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, if itsgeometry.triangles.transformDataaddress wasNULLwhensrcAccelerationStructurewas last built, then it must beNULL - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, if itsgeometry.triangles.transformDataaddress was notNULLwhensrcAccelerationStructurewas last built, then it must not beNULL - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, then for eachAccelerationStructureGeometryKHRstructure referred to by itspGeometriesorppGeometriesmembers, ifgeometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, andgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR, then the value of each index referenced must be the same as the corresponding index value whensrcAccelerationStructurewas last built - For
each
AccelerationStructureBuildRangeInfoKHRreferenced by this command, itsprimitiveCountmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
AccelerationStructureBuildRangeInfoKHRreferenced by this command, if the corresponding geometry uses indices, itsfirstVertexmember must have the same value which was specified whensrcAccelerationStructurewas last built - For each
element of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, the correspondingppBuildRangeInfos[i][j].primitiveCountmust be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxInstanceCount - For each
pInfos[i],dstAccelerationStructuremust have been created with a value ofAccelerationStructureCreateInfoKHR::sizegreater than or equal to the memory size required by the build operation, as returned bygetAccelerationStructureBuildSizesKHRwithpBuildInfo=pInfos[i] and with each element of thepMaxPrimitiveCountsarray greater than or equal to the equivalentppBuildRangeInfos[i][j].primitiveCountvalues forjin [0,pInfos[i].geometryCount) - Each
element of
ppBuildRangeInfos[i] must be a valid pointer to an array ofpInfos[i].geometryCountAccelerationStructureBuildRangeInfoKHRstructures - If
deferredOperationis notNULL_HANDLE, it must be a validDeferredOperationKHRobject - Any
previous deferred operation that was associated with
deferredOperationmust be complete - For each
element of
pInfos, thebufferused to create itsdstAccelerationStructuremember must be bound to host-visible device memory - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRthebufferused to create itssrcAccelerationStructuremember must be bound to host-visible device memory - For each
element of
pInfos, thebufferused to create each acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRmust be bound to host-visible device memory - If
pInfos[i].modeisBUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR, all addresses betweenpInfos[i].scratchData.hostAddressandpInfos[i].scratchData.hostAddress+ N - 1 must be valid host memory, where N is given by thebuildScratchSizemember of theAccelerationStructureBuildSizesInfoKHRstructure returned from a call togetAccelerationStructureBuildSizesKHRwith an identicalAccelerationStructureBuildGeometryInfoKHRstructure and primitive count - If
pInfos[i].modeisBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR, all addresses betweenpInfos[i].scratchData.hostAddressandpInfos[i].scratchData.hostAddress+ N - 1 must be valid host memory, where N is given by theupdateScratchSizemember of theAccelerationStructureBuildSizesInfoKHRstructure returned from a call togetAccelerationStructureBuildSizesKHRwith an identicalAccelerationStructureBuildGeometryInfoKHRstructure and primitive count - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR,geometry.triangles.vertexData.hostAddressmust be a valid host address - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.indexTypeis notINDEX_TYPE_NONE_KHR,geometry.triangles.indexData.hostAddressmust be a valid host address - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHR, ifgeometry.triangles.transformData.hostAddressis not0, it must be a valid host address - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_AABBS_KHR,geometry.aabbs.data.hostAddressmust be a valid host address - For each
element of
pInfos, thebufferused to create itsdstAccelerationStructuremember must be bound to memory that was not allocated with multiple instances - For each
element of
pInfos, if itsmodemember isBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRthebufferused to create itssrcAccelerationStructuremember must be bound to memory that was not allocated with multiple instances - For each
element of
pInfos, thebufferused to create each acceleration structure referenced by thegeometry.instances.datamember of any element ofpGeometriesorppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRmust be bound to memory that was not allocated with multiple instances - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR,geometry.instances.data.hostAddressmust be a valid host address - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, eachAccelerationStructureInstanceKHR::accelerationStructureReferencevalue ingeometry.instances.data.hostAddressmust be a validAccelerationStructureKHRobject - For any element
of
pInfos[i].pGeometriesorpInfos[i].ppGeometrieswith ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHRwithBUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NVset, eachaccelerationStructureReferencein any structure inAccelerationStructureMotionInstanceNVvalue ingeometry.instances.data.hostAddressmust be a validAccelerationStructureKHRobject
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validDeferredOperationKHRhandle -
pInfosmust be a valid pointer to an array ofinfoCountvalidAccelerationStructureBuildGeometryInfoKHRstructures -
ppBuildRangeInfosmust be a valid pointer to an array ofinfoCountAccelerationStructureBuildRangeInfoKHRstructures -
infoCountmust be greater than0 - If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureBuildRangeInfoKHR,
DeferredOperationKHR,
Device
getAccelerationStructureDeviceAddressKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> AccelerationStructureDeviceAddressInfoKHR |
|
| -> io DeviceAddress |
vkGetAccelerationStructureDeviceAddressKHR - Query an address of a acceleration structure
Description
The 64-bit return value is an address of the acceleration structure, which can be used for device and shader operations that involve acceleration structures, such as ray traversal and acceleration structure building.
If the acceleration structure was created with a non-zero value of
AccelerationStructureCreateInfoKHR::deviceAddress, the return value
will be the same address.
If the acceleration structure was created with a type of
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR, the returned address must
be consistent with the relative offset to other acceleration structures
with type ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR allocated with the
same Buffer. That is, the difference in returned
addresses between the two must be the same as the difference in
offsets provided at acceleration structure creation.
The returned address must be aligned to 256 bytes.
Note
The acceleration structure device address may be different from the
buffer device address corresponding to the acceleration structure’s
start offset in its storage buffer for acceleration structure types
other than ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.
Valid Usage
- The ::accelerationStructure feature must be enabled
- If
devicewas created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pInfomust be a valid pointer to a validAccelerationStructureDeviceAddressInfoKHRstructure
See Also
VK_KHR_acceleration_structure,
AccelerationStructureDeviceAddressInfoKHR,
Device
getAccelerationStructureBuildSizesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> AccelerationStructureBuildTypeKHR |
|
| -> ("buildInfo" ::: AccelerationStructureBuildGeometryInfoKHR) |
|
| -> ("maxPrimitiveCounts" ::: Vector Word32) |
|
| -> io ("sizeInfo" ::: AccelerationStructureBuildSizesInfoKHR) |
vkGetAccelerationStructureBuildSizesKHR - Retrieve the required size for an acceleration structure
Description
The srcAccelerationStructure, dstAccelerationStructure, and mode
members of pBuildInfo are ignored. Any DeviceOrHostAddressKHR or
DeviceOrHostAddressConstKHR members of pBuildInfo are ignored by
this command, except that the hostAddress member of
AccelerationStructureGeometryTrianglesDataKHR::transformData will be
examined to check if it is NULL.
An acceleration structure created with the accelerationStructureSize
returned by this command supports any build or update with a
AccelerationStructureBuildGeometryInfoKHR structure and array of
AccelerationStructureBuildRangeInfoKHR structures subject to the
following properties:
- The build command is a host build command, and
buildTypeisACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHRorACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR - The build command is a device build command, and
buildTypeisACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHRorACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR For
AccelerationStructureBuildGeometryInfoKHR:- Its
type, andflagsmembers are equal topBuildInfo->typeandpBuildInfo->flags, respectively. geometryCountis less than or equal topBuildInfo->geometryCount.- For each element of either
pGeometriesorppGeometriesat a given index, itsgeometryTypemember is equal topBuildInfo->geometryType. - For each element of either
pGeometriesorppGeometriesat a given index, itsflagsmember is equal to the corresponding member of the same element inpBuildInfo. - For each element of either
pGeometriesorppGeometriesat a given index, with ageometryTypemember equal toGEOMETRY_TYPE_TRIANGLES_KHR, thevertexFormatandindexTypemembers ofgeometry.trianglesare equal to the corresponding members of the same element inpBuildInfo. - For each element of either
pGeometriesorppGeometriesat a given index, with ageometryTypemember equal toGEOMETRY_TYPE_TRIANGLES_KHR, themaxVertexmember ofgeometry.trianglesis less than or equal to the corresponding member of the same element inpBuildInfo. - For each element of either
pGeometriesorppGeometriesat a given index, with ageometryTypemember equal toGEOMETRY_TYPE_TRIANGLES_KHR, if the applicable address in thetransformDatamember ofgeometry.trianglesis notNULL, the correspondingtransformData.hostAddressparameter inpBuildInfois notNULL.
- Its
For each
AccelerationStructureBuildRangeInfoKHRcorresponding to theAccelerationStructureBuildGeometryInfoKHR:- Its
primitiveCountmember is less than or equal to the corresponding element ofpMaxPrimitiveCounts. - For each element of either
pGeometriesorppGeometriesat a given index, with ageometryTypemember equal toGEOMETRY_TYPE_TRIANGLES_KHR, if thepNextchain containsAccelerationStructureTrianglesOpacityMicromapEXTthe corresponding member ofpBuildInfoalso containsAccelerationStructureTrianglesOpacityMicromapEXTand with an equivalentmicromap. - For each element of either
pGeometriesorppGeometriesat a given index, with ageometryTypemember equal toGEOMETRY_TYPE_TRIANGLES_KHR, if thepNextchain containsAccelerationStructureTrianglesDisplacementMicromapNVthe corresponding member ofpBuildInfoalso containsAccelerationStructureTrianglesDisplacementMicromapNVand with an equivalentmicromap.
- Its
Similarly, the updateScratchSize value will support any build command
specifying the BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR mode
under the above conditions, and the buildScratchSize value will
support any build command specifying the
BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR mode under the above
conditions.
Valid Usage
- The ::accelerationStructure feature must be enabled
- If
devicewas created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled - If
pBuildInfo->geometryCountis not0,pMaxPrimitiveCountsmust be a valid pointer to an array ofpBuildInfo->geometryCountuint32_tvalues - If
pBuildInfo->pGeometriesorpBuildInfo->ppGeometrieshas ageometryTypeofGEOMETRY_TYPE_INSTANCES_KHR, eachpMaxPrimitiveCounts[i] must be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxInstanceCount
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
buildTypemust be a validAccelerationStructureBuildTypeKHRvalue -
pBuildInfomust be a valid pointer to a validAccelerationStructureBuildGeometryInfoKHRstructure -
If
pMaxPrimitiveCountsis notNULL,pMaxPrimitiveCountsmust be a valid pointer to an array ofpBuildInfo->geometryCountuint32_tvalues -
pSizeInfomust be a valid pointer to aAccelerationStructureBuildSizesInfoKHRstructure
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureBuildSizesInfoKHR,
AccelerationStructureBuildTypeKHR, Device
pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: GeometryInstanceFlagBitsKHR Source #
data WriteDescriptorSetAccelerationStructureKHR Source #
VkWriteDescriptorSetAccelerationStructureKHR - Structure specifying acceleration structure descriptor information
Valid Usage
-
Each acceleration structure in
pAccelerationStructuresmust have been created with atypeofACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHRorACCELERATION_STRUCTURE_TYPE_GENERIC_KHR -
If the
nullDescriptor
feature is not enabled, each element of
pAccelerationStructuresmust not beNULL_HANDLE
Valid Usage (Implicit)
-
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalid orNULL_HANDLEAccelerationStructureKHRhandles -
accelerationStructureCountmust be greater than0
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
StructureType
Constructors
| WriteDescriptorSetAccelerationStructureKHR | |
Fields
| |
Instances
data PhysicalDeviceAccelerationStructureFeaturesKHR Source #
VkPhysicalDeviceAccelerationStructureFeaturesKHR - Structure describing the acceleration structure features that can be supported by an implementation
Members
This structure describes the following features:
Description
If the PhysicalDeviceAccelerationStructureFeaturesKHR structure is
included in the pNext chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceAccelerationStructureFeaturesKHR can also
be used in the pNext chain of DeviceCreateInfo
to selectively enable these features.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceAccelerationStructureFeaturesKHR | |
Fields
| |
Instances
data PhysicalDeviceAccelerationStructurePropertiesKHR Source #
VkPhysicalDeviceAccelerationStructurePropertiesKHR - Properties of the physical device for acceleration structure
Description
Due to the fact that the geometry, instance, and primitive counts are specified at acceleration structure creation as 32-bit values, maxGeometryCount, maxInstanceCount, and maxPrimitiveCount must not exceed 232-1.
If the PhysicalDeviceAccelerationStructurePropertiesKHR structure is
included in the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Limits specified by this structure must match those specified with the
same name in
PhysicalDeviceRayTracingPropertiesNV.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceAccelerationStructurePropertiesKHR | |
Fields
| |
Instances
data AccelerationStructureGeometryTrianglesDataKHR (es :: [Type]) Source #
VkAccelerationStructureGeometryTrianglesDataKHR - Structure specifying a triangle geometry in a bottom-level acceleration structure
Description
Note
Unlike the stride for vertex buffers in
VertexInputBindingDescription for graphics
pipelines which must not exceed maxVertexInputBindingStride,
vertexStride for acceleration structure geometry is instead restricted
to being a 32-bit value.
Valid Usage
-
vertexStridemust be less than or equal to 232-1 -
The
format features
of
vertexFormatmust containFORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR -
indexTypemust beINDEX_TYPE_UINT16,INDEX_TYPE_UINT32, orINDEX_TYPE_NONE_KHR
Valid Usage (Implicit)
-
Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofAccelerationStructureGeometryMotionTrianglesDataNV,AccelerationStructureTrianglesDisplacementMicromapNV, orAccelerationStructureTrianglesOpacityMicromapEXT -
The
sTypevalue of each struct in thepNextchain must be unique -
vertexFormatmust be a validFormatvalue -
indexTypemust be a validIndexTypevalue
See Also
VK_KHR_acceleration_structure,
AccelerationStructureGeometryDataKHR, DeviceOrHostAddressConstKHR,
DeviceSize,
Format,
IndexType,
StructureType
Constructors
| AccelerationStructureGeometryTrianglesDataKHR | |
Fields
| |
Instances
data AccelerationStructureGeometryAabbsDataKHR Source #
VkAccelerationStructureGeometryAabbsDataKHR - Structure specifying axis-aligned bounding box geometry in a bottom-level acceleration structure
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
AccelerationStructureGeometryDataKHR, DeviceOrHostAddressConstKHR,
DeviceSize,
StructureType
Constructors
| AccelerationStructureGeometryAabbsDataKHR | |
Fields
| |
Instances
data AccelerationStructureGeometryInstancesDataKHR Source #
VkAccelerationStructureGeometryInstancesDataKHR - Structure specifying a geometry consisting of instances of other acceleration structures
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
AccelerationStructureGeometryDataKHR,
Bool32, DeviceOrHostAddressConstKHR,
StructureType
Constructors
| AccelerationStructureGeometryInstancesDataKHR | |
Fields
| |
Instances
data AccelerationStructureGeometryKHR Source #
VkAccelerationStructureGeometryKHR - Structure specifying geometries to be built into an acceleration structure
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR
-
pNextmust beNULL -
geometryTypemust be a validGeometryTypeKHRvalue - If
geometryTypeisGEOMETRY_TYPE_TRIANGLES_KHR, thetrianglesmember ofgeometrymust be a validAccelerationStructureGeometryTrianglesDataKHRstructure - If
geometryTypeisGEOMETRY_TYPE_AABBS_KHR, theaabbsmember ofgeometrymust be a validAccelerationStructureGeometryAabbsDataKHRstructure - If
geometryTypeisGEOMETRY_TYPE_INSTANCES_KHR, theinstancesmember ofgeometrymust be a validAccelerationStructureGeometryInstancesDataKHRstructure -
flagsmust be a valid combination ofGeometryFlagBitsKHRvalues
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureGeometryDataKHR, GeometryFlagsKHR,
GeometryTypeKHR, StructureType
Constructors
| AccelerationStructureGeometryKHR | |
Fields
| |
Instances
| Show AccelerationStructureGeometryKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods showsPrec :: Int -> AccelerationStructureGeometryKHR -> ShowS # | |
| ToCStruct AccelerationStructureGeometryKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods withCStruct :: AccelerationStructureGeometryKHR -> (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr AccelerationStructureGeometryKHR -> AccelerationStructureGeometryKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr AccelerationStructureGeometryKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr AccelerationStructureGeometryKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero AccelerationStructureGeometryKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods | |
data AccelerationStructureBuildGeometryInfoKHR Source #
VkAccelerationStructureBuildGeometryInfoKHR - Structure specifying the geometry data used to build an acceleration structure
Description
Only one of pGeometries or ppGeometries can be a valid pointer,
the other must be NULL. Each element of the non-NULL array
describes the data used to build each acceleration structure geometry.
The index of each element of the pGeometries or ppGeometries members
of AccelerationStructureBuildGeometryInfoKHR is used as the /geometry
index/ during ray traversal. The geometry index is available in ray
shaders via the
RayGeometryIndexKHR built-in,
and is
used to determine hit and intersection shaders executed during traversal.
The geometry index is available to ray queries via the
OpRayQueryGetIntersectionGeometryIndexKHR instruction.
Setting BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags
indicates that this build is a motion top level acceleration structure.
A motion top level uses instances of format
AccelerationStructureMotionInstanceNV
if AccelerationStructureGeometryInstancesDataKHR::arrayOfPointers is
FALSE.
If AccelerationStructureGeometryInstancesDataKHR::arrayOfPointers is
TRUE, the pointer for each element of
the array of instance pointers consists of 4 bits of
AccelerationStructureMotionInstanceTypeNV
in the low 4 bits of the pointer identifying the type of structure at
the pointer. The device address accessed is the value in the array with
the low 4 bits set to zero. The structure at the pointer is one of
AccelerationStructureInstanceKHR,
AccelerationStructureMatrixMotionInstanceNV
or
AccelerationStructureSRTMotionInstanceNV,
depending on the type value encoded in the low 4 bits.
A top level acceleration structure with either motion instances or
vertex motion in its instances must set
BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags.
Members srcAccelerationStructure and dstAccelerationStructure may
be the same or different for an update operation (when mode is
BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR). If they are the same,
the update happens in-place. Otherwise, the target acceleration
structure is updated and the source is not modified.
Valid Usage
-
typemust not beACCELERATION_STRUCTURE_TYPE_GENERIC_KHR
-
Only one of
pGeometriesorppGeometriescan be a valid pointer, the other must beNULL - If
typeisACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, thegeometryTypemember of elements of eitherpGeometriesorppGeometriesmust beGEOMETRY_TYPE_INSTANCES_KHR - If
typeisACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR,geometryCountmust be1 - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRthegeometryTypemember of elements of eitherpGeometriesorppGeometriesmust not beGEOMETRY_TYPE_INSTANCES_KHR - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRthen thegeometryTypemember of each geometry in eitherpGeometriesorppGeometriesmust be the same - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRthengeometryCountmust be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxGeometryCount - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRand thegeometryTypemember of eitherpGeometriesorppGeometriesisGEOMETRY_TYPE_AABBS_KHR, the total number of AABBs in all geometries must be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxPrimitiveCount - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRand thegeometryTypemember of eitherpGeometriesorppGeometriesisGEOMETRY_TYPE_TRIANGLES_KHR, the total number of triangles in all geometries must be less than or equal toPhysicalDeviceAccelerationStructurePropertiesKHR::maxPrimitiveCount - If
flagshas theBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHRbit set, then it must not have theBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHRbit set -
If
dstAccelerationStructurewas created withACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NVset inAccelerationStructureCreateInfoKHR::flags,BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NVmust be set inflags - If
BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NVis set inflags,dstAccelerationStructuremust have been created withACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NVset inAccelerationStructureCreateInfoKHR::flags - If
BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NVis set inflags,typemust not beACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - If
flagshas theBUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXTbit set then it must not have theBUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXTbit set
Valid Usage (Implicit)
-
pNextmust beNULL -
typemust be a validAccelerationStructureTypeKHRvalue -
flagsmust be a valid combination ofBuildAccelerationStructureFlagBitsKHRvalues -
If
geometryCountis not0, andpGeometriesis notNULL,pGeometriesmust be a valid pointer to an array ofgeometryCountvalidAccelerationStructureGeometryKHRstructures -
If
geometryCountis not0, andppGeometriesis notNULL,ppGeometriesmust be a valid pointer to an array ofgeometryCountvalid pointers to validAccelerationStructureGeometryKHRstructures - Both
of
dstAccelerationStructure, andsrcAccelerationStructurethat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_KHR_acceleration_structure,
AccelerationStructureGeometryKHR,
AccelerationStructureKHR,
AccelerationStructureTypeKHR, BuildAccelerationStructureFlagsKHR,
BuildAccelerationStructureModeKHR, DeviceOrHostAddressKHR,
StructureType,
buildAccelerationStructuresKHR,
cmdBuildAccelerationStructuresIndirectKHR,
cmdBuildAccelerationStructuresKHR,
getAccelerationStructureBuildSizesKHR
Constructors
| AccelerationStructureBuildGeometryInfoKHR | |
Fields
| |
Instances
data AccelerationStructureBuildRangeInfoKHR Source #
VkAccelerationStructureBuildRangeInfoKHR - Structure specifying build offsets and counts for acceleration structure builds
Description
The primitive count and primitive offset are interpreted differently
depending on the GeometryTypeKHR used:
For geometries of type
GEOMETRY_TYPE_TRIANGLES_KHR,primitiveCountis the number of triangles to be built, where each triangle is treated as 3 vertices.- If the geometry uses indices,
primitiveCount× 3 indices are consumed fromAccelerationStructureGeometryTrianglesDataKHR::indexData, starting at an offset ofprimitiveOffset. The value offirstVertexis added to the index values before fetching vertices. - If the geometry does not use indices,
primitiveCount× 3 vertices are consumed fromAccelerationStructureGeometryTrianglesDataKHR::vertexData, starting at an offset ofprimitiveOffset+AccelerationStructureGeometryTrianglesDataKHR::vertexStride×firstVertex. - If
AccelerationStructureGeometryTrianglesDataKHR::transformDatais notNULL, a singleTransformMatrixKHRstructure is consumed fromAccelerationStructureGeometryTrianglesDataKHR::transformData, at an offset oftransformOffset. This matrix describes a transformation from the space in which the vertices for all triangles in this geometry are described to the space in which the acceleration structure is defined.
- If the geometry uses indices,
- For geometries of type
GEOMETRY_TYPE_AABBS_KHR,primitiveCountis the number of axis-aligned bounding boxes.primitiveCountAabbPositionsKHRstructures are consumed fromAccelerationStructureGeometryAabbsDataKHR::data, starting at an offset ofprimitiveOffset. - For geometries of type
GEOMETRY_TYPE_INSTANCES_KHR,primitiveCountis the number of acceleration structures.primitiveCountAccelerationStructureInstanceKHRorAccelerationStructureMotionInstanceNVstructures are consumed fromAccelerationStructureGeometryInstancesDataKHR::data, starting at an offset ofprimitiveOffset.
Valid Usage
-
For geometries of type
GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry uses indices, the offsetprimitiveOffsetfromAccelerationStructureGeometryTrianglesDataKHR::indexDatamust be a multiple of the element size ofAccelerationStructureGeometryTrianglesDataKHR::indexType
-
For geometries of type
GEOMETRY_TYPE_TRIANGLES_KHR, if the geometry does not use indices, the offsetprimitiveOffsetfromAccelerationStructureGeometryTrianglesDataKHR::vertexDatamust be a multiple of the component size ofAccelerationStructureGeometryTrianglesDataKHR::vertexFormat -
For geometries of type
GEOMETRY_TYPE_TRIANGLES_KHR, the offsettransformOffsetfromAccelerationStructureGeometryTrianglesDataKHR::transformDatamust be a multiple of 16 -
For geometries of type
GEOMETRY_TYPE_AABBS_KHR, the offsetprimitiveOffsetfromAccelerationStructureGeometryAabbsDataKHR::datamust be a multiple of 8 -
For geometries of type
GEOMETRY_TYPE_INSTANCES_KHR, the offsetprimitiveOffsetfromAccelerationStructureGeometryInstancesDataKHR::datamust be a multiple of 16
See Also
VK_KHR_acceleration_structure,
buildAccelerationStructuresKHR, cmdBuildAccelerationStructuresKHR
Constructors
| AccelerationStructureBuildRangeInfoKHR | |
Fields
| |
Instances
data AccelerationStructureCreateInfoKHR (es :: [Type]) Source #
VkAccelerationStructureCreateInfoKHR - Structure specifying the parameters of a newly created acceleration structure object
Description
If deviceAddress is zero, no specific address is requested.
If deviceAddress is not zero, deviceAddress must be an address
retrieved from an identically created acceleration structure on the same
implementation. The acceleration structure must also be placed on an
identically created buffer and at the same offset.
Applications should avoid creating acceleration structures with
application-provided addresses and implementation-provided addresses in
the same process, to reduce the likelihood of
ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR
errors.
Note
The expected usage for this is that a trace capture/replay tool will
add the
BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT
flag to all buffers that use
BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT,
and will add
BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT
to all buffers used as storage for an acceleration structure where
deviceAddress is not zero. This also means that the tool will need to
add
MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT
to memory allocations to allow the flag to be set where the application
may not have otherwise required it. During capture the tool will save
the queried opaque device addresses in the trace. During replay, the
buffers will be created specifying the original address so any address
values stored in the trace data will remain valid.
Implementations are expected to separate such buffers in the GPU address
space so normal allocations will avoid using these addresses.
Apps/tools should avoid mixing app-provided and implementation-provided
addresses for buffers created with
BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT,
to avoid address space allocation conflicts.
Applications should create an acceleration structure with a specific
AccelerationStructureTypeKHR other than
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR.
Note
ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR is intended to be used by API
translation layers. This can be used at acceleration structure creation
time in cases where the actual acceleration structure type (top or
bottom) is not yet known. The actual acceleration structure type must be
specified as ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR or
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR when the build is
performed.
If the acceleration structure will be the target of a build operation,
the required size for an acceleration structure can be queried with
getAccelerationStructureBuildSizesKHR. If the acceleration structure
is going to be the target of a compacting copy,
cmdWriteAccelerationStructuresPropertiesKHR or
writeAccelerationStructuresPropertiesKHR can be used to obtain the
compacted size required.
If the acceleration structure will be the target of a build operation
with BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV it must include
ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV in createFlags and
include
AccelerationStructureMotionInfoNV
as an extension structure in pNext with the number of instances as
metadata for the object.
Valid Usage
- If
deviceAddressis not zero,createFlagsmust includeACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
- If
createFlagsincludesACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR,PhysicalDeviceAccelerationStructureFeaturesKHR::accelerationStructureCaptureReplaymust beTRUE -
buffermust have been created with ausagevalue containingBUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR -
buffermust not have been created withBUFFER_CREATE_SPARSE_RESIDENCY_BIT - The sum of
offsetandsizemust be less than the size ofbuffer -
offsetmust be a multiple of256bytes - If
ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NVis set increateFlagsandtypeisACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR, one member of thepNextchain must be a pointer to a valid instance ofAccelerationStructureMotionInfoNV - If any
geometry includes
AccelerationStructureGeometryMotionTrianglesDataNVthencreateFlagsmust containACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV - If
createFlagsincludesACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT, the descriptorBufferCaptureReplay feature must be enabled - If the
pNextchain includes aOpaqueCaptureDescriptorDataCreateInfoEXTstructure,createFlagsmust containACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofAccelerationStructureMotionInfoNVorOpaqueCaptureDescriptorDataCreateInfoEXT - The
sTypevalue of each struct in thepNextchain must be unique -
createFlagsmust be a valid combination ofAccelerationStructureCreateFlagBitsKHRvalues -
buffermust be a validBufferhandle -
typemust be a validAccelerationStructureTypeKHRvalue
See Also
VK_KHR_acceleration_structure,
AccelerationStructureCreateFlagsKHR, AccelerationStructureTypeKHR,
Buffer,
DeviceAddress,
DeviceSize,
StructureType,
createAccelerationStructureKHR
Constructors
| AccelerationStructureCreateInfoKHR | |
Fields
| |
Instances
data AabbPositionsKHR Source #
VkAabbPositionsKHR - Structure specifying two opposing corners of an axis-aligned bounding box
Valid Usage
See Also
Constructors
| AabbPositionsKHR | |
Fields | |
Instances
data TransformMatrixKHR Source #
VkTransformMatrixKHR - Structure specifying a 3x4 affine transformation matrix
Valid Usage
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureInstanceKHR,
AccelerationStructureMatrixMotionInstanceNV
Constructors
| TransformMatrixKHR | |
Fields
| |
Instances
data AccelerationStructureInstanceKHR Source #
VkAccelerationStructureInstanceKHR - Structure specifying a single acceleration structure instance for building into an acceleration structure geometry
Description
The C language specification does not define the ordering of bit-fields, but in practice, this struct produces the correct layout with existing compilers. The intended bit pattern is for the following:
If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureMotionInstanceDataNV,
GeometryInstanceFlagsKHR, TransformMatrixKHR
Constructors
| AccelerationStructureInstanceKHR | |
Fields
| |
Instances
data AccelerationStructureDeviceAddressInfoKHR Source #
VkAccelerationStructureDeviceAddressInfoKHR - Structure specifying the acceleration structure to query an address for
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
StructureType,
getAccelerationStructureDeviceAddressKHR
Constructors
| AccelerationStructureDeviceAddressInfoKHR | |
Fields
| |
Instances
data AccelerationStructureVersionInfoKHR Source #
VkAccelerationStructureVersionInfoKHR - Acceleration structure version information
Description
Note
pVersionData is a pointer to an array of
2×UUID_SIZE uint8_t values instead of two
UUID_SIZE arrays as the expected use case
for this member is to be pointed at the header of a previously
serialized acceleration structure (via
cmdCopyAccelerationStructureToMemoryKHR or
copyAccelerationStructureToMemoryKHR) that is loaded in memory. Using
arrays would necessitate extra memory copies of the UUIDs.
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
StructureType,
getDeviceAccelerationStructureCompatibilityKHR
Constructors
| AccelerationStructureVersionInfoKHR | |
Fields
| |
Instances
data CopyAccelerationStructureInfoKHR Source #
VkCopyAccelerationStructureInfoKHR - Parameters for copying an acceleration structure
Valid Usage
-
modemust beCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHRorCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR
- The source
acceleration structure
srcmust have been constructed prior to the execution of this command - If
modeisCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR,srcmust have been constructed withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRin the build - The
bufferused to createsrcmust be bound to device memory - The
bufferused to createdstmust be bound to device memory - The range of
memory backing
dstthat is accessed by this command must not overlap the memory backingsrcthat is accessed by this command -
dstmust be bound completely and contiguously to a singleDeviceMemoryobject viabindAccelerationStructureMemoryNV
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR
-
pNextmust beNULL -
srcmust be a validAccelerationStructureKHRhandle -
dstmust be a validAccelerationStructureKHRhandle -
modemust be a validCopyAccelerationStructureModeKHRvalue - Both of
dst, andsrcmust have been created, allocated, or retrieved from the sameDevice
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
CopyAccelerationStructureModeKHR,
StructureType,
cmdCopyAccelerationStructureKHR, copyAccelerationStructureKHR
Constructors
| CopyAccelerationStructureInfoKHR | |
Fields
| |
Instances
data CopyAccelerationStructureToMemoryInfoKHR Source #
VkCopyAccelerationStructureToMemoryInfoKHR - Parameters for serializing an acceleration structure
Valid Usage
- The
source acceleration structure
srcmust have been constructed prior to the execution of this command
- The
memory pointed to by
dstmust be at least as large as the serialization size ofsrc, as reported bywriteAccelerationStructuresPropertiesKHRorcmdWriteAccelerationStructuresPropertiesKHRwith a query type ofQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR -
modemust beCOPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR
Valid Usage (Implicit)
-
pNextmust beNULL -
srcmust be a validAccelerationStructureKHRhandle -
modemust be a validCopyAccelerationStructureModeKHRvalue
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
CopyAccelerationStructureModeKHR, DeviceOrHostAddressKHR,
StructureType,
cmdCopyAccelerationStructureToMemoryKHR,
copyAccelerationStructureToMemoryKHR
Constructors
| CopyAccelerationStructureToMemoryInfoKHR | |
Fields
| |
Instances
data CopyMemoryToAccelerationStructureInfoKHR Source #
VkCopyMemoryToAccelerationStructureInfoKHR - Parameters for deserializing an acceleration structure
Valid Usage
- The
source memory pointed to by
srcmust contain data previously serialized usingcmdCopyAccelerationStructureToMemoryKHR, potentially modified to relocate acceleration structure references as described in that command
-
modemust beCOPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR - The
data in
srcmust have a format compatible with the destination physical device as returned bygetDeviceAccelerationStructureCompatibilityKHR -
dstmust have been created with asizegreater than or equal to that used to serialize the data insrc
Valid Usage (Implicit)
-
pNextmust beNULL -
dstmust be a validAccelerationStructureKHRhandle -
modemust be a validCopyAccelerationStructureModeKHRvalue
See Also
VK_KHR_acceleration_structure,
AccelerationStructureKHR,
CopyAccelerationStructureModeKHR, DeviceOrHostAddressConstKHR,
StructureType,
cmdCopyMemoryToAccelerationStructureKHR,
copyMemoryToAccelerationStructureKHR
Constructors
| CopyMemoryToAccelerationStructureInfoKHR | |
Fields
| |
Instances
data AccelerationStructureBuildSizesInfoKHR Source #
VkAccelerationStructureBuildSizesInfoKHR - Structure specifying build sizes for an acceleration structure
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
DeviceSize,
StructureType,
getAccelerationStructureBuildSizesKHR
Constructors
| AccelerationStructureBuildSizesInfoKHR | |
Fields
| |
Instances
data DeviceOrHostAddressKHR Source #
Constructors
| DeviceAddress DeviceAddress | |
| HostAddress (Ptr ()) |
Instances
| Show DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods showsPrec :: Int -> DeviceOrHostAddressKHR -> ShowS # show :: DeviceOrHostAddressKHR -> String # showList :: [DeviceOrHostAddressKHR] -> ShowS # | |
| ToCStruct DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods withCStruct :: DeviceOrHostAddressKHR -> (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr DeviceOrHostAddressKHR -> DeviceOrHostAddressKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr DeviceOrHostAddressKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr DeviceOrHostAddressKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods | |
data DeviceOrHostAddressConstKHR Source #
Constructors
| DeviceAddressConst DeviceAddress | |
| HostAddressConst (Ptr ()) |
Instances
| Show DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods showsPrec :: Int -> DeviceOrHostAddressConstKHR -> ShowS # show :: DeviceOrHostAddressConstKHR -> String # showList :: [DeviceOrHostAddressConstKHR] -> ShowS # | |
| ToCStruct DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods withCStruct :: DeviceOrHostAddressConstKHR -> (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr DeviceOrHostAddressConstKHR -> DeviceOrHostAddressConstKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr DeviceOrHostAddressConstKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr DeviceOrHostAddressConstKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods | |
data AccelerationStructureGeometryDataKHR Source #
Constructors
| Triangles (SomeStruct AccelerationStructureGeometryTrianglesDataKHR) | |
| Aabbs AccelerationStructureGeometryAabbsDataKHR | |
| Instances AccelerationStructureGeometryInstancesDataKHR |
Instances
| Show AccelerationStructureGeometryDataKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods showsPrec :: Int -> AccelerationStructureGeometryDataKHR -> ShowS # show :: AccelerationStructureGeometryDataKHR -> String # showList :: [AccelerationStructureGeometryDataKHR] -> ShowS # | |
| ToCStruct AccelerationStructureGeometryDataKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods withCStruct :: AccelerationStructureGeometryDataKHR -> (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr AccelerationStructureGeometryDataKHR -> AccelerationStructureGeometryDataKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr AccelerationStructureGeometryDataKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr AccelerationStructureGeometryDataKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero AccelerationStructureGeometryDataKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure Methods | |
newtype GeometryInstanceFlagBitsKHR Source #
VkGeometryInstanceFlagBitsKHR - Instance flag bits
Description
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR and
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR must not be used in the same
flag.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
GeometryInstanceFlagsKHR
Constructors
| GeometryInstanceFlagBitsKHR Flags |
Bundled Patterns
Instances
newtype GeometryFlagBitsKHR Source #
VkGeometryFlagBitsKHR - Bitmask specifying additional parameters for a geometry
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
GeometryFlagsKHR
Constructors
| GeometryFlagBitsKHR Flags |
Bundled Patterns
| pattern GEOMETRY_OPAQUE_BIT_KHR :: GeometryFlagBitsKHR |
|
| pattern GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR :: GeometryFlagBitsKHR |
|
Instances
newtype BuildAccelerationStructureFlagBitsKHR Source #
VkBuildAccelerationStructureFlagBitsKHR - Bitmask specifying additional parameters for acceleration structure builds
Description
Note
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR may take more
time and memory than a normal build, and so should only be used when
those features are needed.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
BuildAccelerationStructureFlagsKHR
Constructors
| BuildAccelerationStructureFlagBitsKHR Flags |
Bundled Patterns
Instances
newtype AccelerationStructureCreateFlagBitsKHR Source #
VkAccelerationStructureCreateFlagBitsKHR - Bitmask specifying additional creation parameters for acceleration structure
See Also
VK_KHR_acceleration_structure,
AccelerationStructureCreateFlagsKHR
Constructors
| AccelerationStructureCreateFlagBitsKHR Flags |
Bundled Patterns
| pattern ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR :: AccelerationStructureCreateFlagBitsKHR |
|
| pattern ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV :: AccelerationStructureCreateFlagBitsKHR | |
| pattern ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: AccelerationStructureCreateFlagBitsKHR |
|
Instances
newtype CopyAccelerationStructureModeKHR Source #
VkCopyAccelerationStructureModeKHR - Acceleration structure copy mode
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
CopyAccelerationStructureInfoKHR,
CopyAccelerationStructureToMemoryInfoKHR,
CopyMemoryToAccelerationStructureInfoKHR,
cmdCopyAccelerationStructureNV
Constructors
| CopyAccelerationStructureModeKHR Int32 |
Bundled Patterns
| pattern COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR :: CopyAccelerationStructureModeKHR |
|
| pattern COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR :: CopyAccelerationStructureModeKHR |
|
| pattern COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR :: CopyAccelerationStructureModeKHR |
|
| pattern COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR :: CopyAccelerationStructureModeKHR |
|
Instances
newtype BuildAccelerationStructureModeKHR Source #
VkBuildAccelerationStructureModeKHR - Enum specifying the type of build operation to perform
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR
Constructors
| BuildAccelerationStructureModeKHR Int32 |
Bundled Patterns
| pattern BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR :: BuildAccelerationStructureModeKHR |
|
| pattern BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR :: BuildAccelerationStructureModeKHR |
|
Instances
newtype AccelerationStructureTypeKHR Source #
VkAccelerationStructureTypeKHR - Type of acceleration structure
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureCreateInfoKHR,
AccelerationStructureInfoNV
Constructors
| AccelerationStructureTypeKHR Int32 |
Bundled Patterns
| pattern ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR :: AccelerationStructureTypeKHR |
|
| pattern ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR :: AccelerationStructureTypeKHR |
|
| pattern ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR :: AccelerationStructureTypeKHR |
|
Instances
newtype GeometryTypeKHR Source #
VkGeometryTypeKHR - Enum specifying which type of geometry is provided
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureGeometryKHR,
GeometryNV
Constructors
| GeometryTypeKHR Int32 |
Bundled Patterns
| pattern GEOMETRY_TYPE_TRIANGLES_KHR :: GeometryTypeKHR |
|
| pattern GEOMETRY_TYPE_AABBS_KHR :: GeometryTypeKHR |
|
| pattern GEOMETRY_TYPE_INSTANCES_KHR :: GeometryTypeKHR |
|
Instances
newtype AccelerationStructureBuildTypeKHR Source #
VkAccelerationStructureBuildTypeKHR - Acceleration structure build type
See Also
VK_KHR_acceleration_structure,
getAccelerationStructureBuildSizesKHR,
getMicromapBuildSizesEXT
Constructors
| AccelerationStructureBuildTypeKHR Int32 |
Bundled Patterns
| pattern ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR :: AccelerationStructureBuildTypeKHR |
|
| pattern ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR :: AccelerationStructureBuildTypeKHR |
|
| pattern ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR :: AccelerationStructureBuildTypeKHR |
|
Instances
newtype AccelerationStructureCompatibilityKHR Source #
VkAccelerationStructureCompatibilityKHR - Acceleration structure compatibility
See Also
VK_KHR_acceleration_structure,
getDeviceAccelerationStructureCompatibilityKHR,
getDeviceMicromapCompatibilityEXT
Constructors
| AccelerationStructureCompatibilityKHR Int32 |
Bundled Patterns
| pattern ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR :: AccelerationStructureCompatibilityKHR |
|
| pattern ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR :: AccelerationStructureCompatibilityKHR |
|
Instances
type KHR_ACCELERATION_STRUCTURE_SPEC_VERSION = 13 Source #
pattern KHR_ACCELERATION_STRUCTURE_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure" Source #
pattern KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype AccelerationStructureKHR Source #
VkAccelerationStructureKHR - Opaque handle to an acceleration structure object
See Also
VK_KHR_acceleration_structure,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureCaptureDescriptorDataInfoEXT,
AccelerationStructureDeviceAddressInfoKHR,
CopyAccelerationStructureInfoKHR,
CopyAccelerationStructureToMemoryInfoKHR,
CopyMemoryToAccelerationStructureInfoKHR,
WriteDescriptorSetAccelerationStructureKHR,
cmdWriteAccelerationStructuresPropertiesKHR,
createAccelerationStructureKHR,
destroyAccelerationStructureKHR,
writeAccelerationStructuresPropertiesKHR
Constructors
| AccelerationStructureKHR Word64 |
Instances
newtype DeferredOperationKHR Source #
VkDeferredOperationKHR - A deferred operation
Description
This handle refers to a tracking structure which manages the execution state for a deferred command.
See Also
VK_KHR_deferred_host_operations,
buildAccelerationStructuresKHR,
buildMicromapsEXT,
copyAccelerationStructureKHR,
copyAccelerationStructureToMemoryKHR,
copyMemoryToAccelerationStructureKHR,
copyMemoryToMicromapEXT,
copyMicromapEXT,
copyMicromapToMemoryEXT,
createDeferredOperationKHR,
createRayTracingPipelinesKHR,
deferredOperationJoinKHR,
destroyDeferredOperationKHR,
getDeferredOperationMaxConcurrencyKHR,
getDeferredOperationResultKHR
Constructors
| DeferredOperationKHR Word64 |
Instances
newtype DebugReportObjectTypeEXT Source #
VkDebugReportObjectTypeEXT - Specify the type of an object handle
Description
'
DebugReportObjectTypeEXT and Vulkan Handle Relationship
Note
The primary expected use of
ERROR_VALIDATION_FAILED_EXT is for
validation layer testing. It is not expected that an application would
see this error code during normal use of the validation layers.
See Also
VK_EXT_debug_marker,
VK_EXT_debug_report,
DebugMarkerObjectNameInfoEXT,
DebugMarkerObjectTagInfoEXT,
debugReportMessageEXT
Constructors
| DebugReportObjectTypeEXT Int32 |
Bundled Patterns