Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_EXT_opacity_micromap - device extension
VK_EXT_opacity_micromap
- Name String
VK_EXT_opacity_micromap
- Extension Type
- Device extension
- Registered Extension Number
- 397
- Revision
- 2
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_acceleration_structure and VK_KHR_synchronization2
- Contact
- Christoph Kubisch @pixeljetstream%0A*Here describe the issue or question you have about the VK_EXT_opacity_micromap extension*
- Eric Werness
- Extension Proposal
- VK_EXT_opacity_micromap
Other Extension Metadata
- Last Modified Date
- 2022-08-24
- Interactions and External Dependencies
- This extension requires SPV_EXT_opacity_micromap
- This extension provides API support for GLSL_EXT_opacity_micromap
- Contributors
- Christoph Kubisch, NVIDIA
- Eric Werness, NVIDIA
- Josh Barczak, Intel
- Stu Smith, AMD
Description
When adding adding transparency to a ray traced scene, an application can choose between further tessellating the geometry or using an any hit shader to allow the ray through specific parts of the geometry. These options have the downside of either significantly increasing memory consumption or adding runtime overhead to run shader code in the middle of traversal, respectively.
This extension adds the ability to add an opacity micromap to geometry when building an acceleration structure. The opacity micromap compactly encodes opacity information which can be read by the implementation to mark parts of triangles as opaque or transparent. The format is externally visible to allow the application to compress its internal geometry and surface representations into the compressed format ahead of time. The compressed format subdivides each triangle into a set of subtriangles, each of which can be assigned either two or four opacity values. These opacity values can control if a ray hitting that subtriangle is treated as an opaque hit, complete miss, or possible hit, depending on the controls described in Ray Opacity Micromap.
This extension provides:
- a
MicromapEXT
structure to store the micromap, - functions similar to acceleration structure build functions to build the opacity micromap array, and
- a structure to extend
AccelerationStructureGeometryTrianglesDataKHR
to attach a micromap to the geometry of the acceleration structure.
New Object Types
New Commands
cmdBuildMicromapsEXT
cmdCopyMemoryToMicromapEXT
cmdCopyMicromapEXT
cmdCopyMicromapToMemoryEXT
cmdWriteMicromapsPropertiesEXT
copyMemoryToMicromapEXT
copyMicromapEXT
copyMicromapToMemoryEXT
createMicromapEXT
destroyMicromapEXT
getDeviceMicromapCompatibilityEXT
getMicromapBuildSizesEXT
writeMicromapsPropertiesEXT
New Structures
CopyMicromapInfoEXT
CopyMicromapToMemoryInfoEXT
MicromapBuildInfoEXT
MicromapBuildSizesInfoEXT
MicromapCreateInfoEXT
MicromapTriangleEXT
MicromapUsageEXT
MicromapVersionInfoEXT
Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:
New Enums
BuildMicromapModeEXT
CopyMicromapModeEXT
MicromapCreateFlagBitsEXT
MicromapTypeEXT
OpacityMicromapFormatEXT
OpacityMicromapSpecialIndexEXT
New Bitmasks
New Enum Constants
EXT_OPACITY_MICROMAP_SPEC_VERSION
Extending
AccessFlagBits2
:Extending
BufferUsageFlagBits
:Extending
BuildAccelerationStructureFlagBitsKHR
:Extending
GeometryInstanceFlagBitsKHR
:Extending
ObjectType
:Extending
PipelineCreateFlagBits
:Extending
PipelineStageFlagBits2
:Extending
QueryType
:Extending
StructureType
:STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT
STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT
STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT
STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT
STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT
STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT
STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT
STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT
Reference Code
uint32_t BarycentricsToSpaceFillingCurveIndex(float u, float v, uint32_t level) { u = clamp(u, 0.0f, 1.0f); v = clamp(v, 0.0f, 1.0f); uint32_t iu, iv, iw; // Quantize barycentric coordinates float fu = u * (1u << level); float fv = v * (1u << level); iu = (uint32_t)fu; iv = (uint32_t)fv; float uf = fu - float(iu); float vf = fv - float(iv); if (iu >= (1u << level)) iu = (1u << level) - 1u; if (iv >= (1u << level)) iv = (1u << level) - 1u; uint32_t iuv = iu + iv; if (iuv >= (1u << level)) iu -= iuv - (1u << level) + 1u; iw = ~(iu + iv); if (uf + vf >= 1.0f && iuv < (1u << level) - 1u) --iw; uint32_t b0 = ~(iu ^ iw); b0 &= ((1u << level) - 1u); uint32_t t = (iu ^ iv) & b0; uint32_t f = t; f ^= f >> 1u; f ^= f >> 2u; f ^= f >> 4u; f ^= f >> 8u; uint32_t b1 = ((f ^ iu) & ~b0) | t; // Interleave bits b0 = (b0 | (b0 << 8u)) & 0x00ff00ffu; b0 = (b0 | (b0 << 4u)) & 0x0f0f0f0fu; b0 = (b0 | (b0 << 2u)) & 0x33333333u; b0 = (b0 | (b0 << 1u)) & 0x55555555u; b1 = (b1 | (b1 << 8u)) & 0x00ff00ffu; b1 = (b1 | (b1 << 4u)) & 0x0f0f0f0fu; b1 = (b1 | (b1 << 2u)) & 0x33333333u; b1 = (b1 | (b1 << 1u)) & 0x55555555u; return b0 | (b1 << 1u); }
Issues
- Is the build actually similar to an acceleration structure build?
- Resolved: The build should be much lighter-weight than an acceleration structure build, but the infrastructure is similar enough that it makes sense to keep the concepts compatible.
- Why does VkMicromapUsageEXT not have type/pNext?
- Resolved: There can be a very large number of these structures, so doubling the size of these can be significant memory consumption. Also, an application may be loading these directly from a file which is more compatible with it being a flat structure. The including structures are extensible and are probably a more suitable place to add extensibility.
- Why is there a SPIR-V extension?
- Resolved: There is a ray flag. To be consistent with how the existing ray tracing extensions work that ray flag needs its own extension.
- Should there be indirect micromap build?
- Resolved: Not for now. There is more in-depth usage metadata required and it seems less likely that something like a GPU culling system would need to change the counts for a micromap.
- Should micromaps have a micromap device address?
- Resolved: There is no need right now (can just use the handle) but that is a bit different from acceleration structures, though the two are not completely parallel in their usage.
- Why are the alignment requirements defined as a mix of hardcoded values and caps?
- Resolved: This is most parallel with the definition of
VK_KHR_acceleration_structure
and maintaining commonality makes it easier for applications to share memory.
Version History
Revision 2, 2022-06-22 (Eric Werness)
- EXTify and clean up for discussion
Revision 1, 2022-01-01 (Eric Werness)
- Initial revision
See Also
AccelerationStructureTrianglesOpacityMicromapEXT
,
BuildMicromapFlagBitsEXT
, BuildMicromapFlagsEXT
,
BuildMicromapModeEXT
, CopyMemoryToMicromapInfoEXT
,
CopyMicromapInfoEXT
, CopyMicromapModeEXT
,
CopyMicromapToMemoryInfoEXT
, MicromapBuildInfoEXT
,
MicromapBuildSizesInfoEXT
, MicromapCreateFlagBitsEXT
,
MicromapCreateFlagsEXT
, MicromapCreateInfoEXT
,
MicromapEXT
, MicromapTriangleEXT
,
MicromapTypeEXT
, MicromapUsageEXT
, MicromapVersionInfoEXT
,
OpacityMicromapFormatEXT
, OpacityMicromapSpecialIndexEXT
,
PhysicalDeviceOpacityMicromapFeaturesEXT
,
PhysicalDeviceOpacityMicromapPropertiesEXT
, buildMicromapsEXT
,
cmdBuildMicromapsEXT
, cmdCopyMemoryToMicromapEXT
,
cmdCopyMicromapEXT
, cmdCopyMicromapToMemoryEXT
,
cmdWriteMicromapsPropertiesEXT
, copyMemoryToMicromapEXT
,
copyMicromapEXT
, copyMicromapToMemoryEXT
, createMicromapEXT
,
destroyMicromapEXT
, getDeviceMicromapCompatibilityEXT
,
getMicromapBuildSizesEXT
, writeMicromapsPropertiesEXT
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
- createMicromapEXT :: forall io. MonadIO io => Device -> MicromapCreateInfoEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io MicromapEXT
- withMicromapEXT :: forall io r. MonadIO io => Device -> MicromapCreateInfoEXT -> Maybe AllocationCallbacks -> (io MicromapEXT -> (MicromapEXT -> io ()) -> r) -> r
- cmdBuildMicromapsEXT :: forall io. MonadIO io => CommandBuffer -> ("infos" ::: Vector MicromapBuildInfoEXT) -> io ()
- buildMicromapsEXT :: forall io. MonadIO io => Device -> DeferredOperationKHR -> ("infos" ::: Vector MicromapBuildInfoEXT) -> io Result
- destroyMicromapEXT :: forall io. MonadIO io => Device -> MicromapEXT -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- cmdCopyMicromapEXT :: forall io. MonadIO io => CommandBuffer -> CopyMicromapInfoEXT -> io ()
- copyMicromapEXT :: forall io. MonadIO io => Device -> DeferredOperationKHR -> CopyMicromapInfoEXT -> io Result
- cmdCopyMicromapToMemoryEXT :: forall io. MonadIO io => CommandBuffer -> CopyMicromapToMemoryInfoEXT -> io ()
- copyMicromapToMemoryEXT :: forall io. MonadIO io => Device -> DeferredOperationKHR -> CopyMicromapToMemoryInfoEXT -> io Result
- cmdCopyMemoryToMicromapEXT :: forall io. MonadIO io => CommandBuffer -> CopyMemoryToMicromapInfoEXT -> io ()
- copyMemoryToMicromapEXT :: forall io. MonadIO io => Device -> DeferredOperationKHR -> CopyMemoryToMicromapInfoEXT -> io Result
- cmdWriteMicromapsPropertiesEXT :: forall io. MonadIO io => CommandBuffer -> ("micromaps" ::: Vector MicromapEXT) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io ()
- writeMicromapsPropertiesEXT :: forall io. MonadIO io => Device -> ("micromaps" ::: Vector MicromapEXT) -> QueryType -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: Word64) -> io ()
- getDeviceMicromapCompatibilityEXT :: forall io. MonadIO io => Device -> MicromapVersionInfoEXT -> io AccelerationStructureCompatibilityKHR
- getMicromapBuildSizesEXT :: forall io. MonadIO io => Device -> AccelerationStructureBuildTypeKHR -> MicromapBuildInfoEXT -> io ("sizeInfo" ::: MicromapBuildSizesInfoEXT)
- data MicromapBuildInfoEXT = MicromapBuildInfoEXT {}
- data MicromapCreateInfoEXT = MicromapCreateInfoEXT {}
- data MicromapVersionInfoEXT = MicromapVersionInfoEXT {}
- data CopyMicromapInfoEXT = CopyMicromapInfoEXT {}
- data CopyMicromapToMemoryInfoEXT = CopyMicromapToMemoryInfoEXT {}
- data CopyMemoryToMicromapInfoEXT = CopyMemoryToMicromapInfoEXT {}
- data MicromapBuildSizesInfoEXT = MicromapBuildSizesInfoEXT {}
- data MicromapUsageEXT = MicromapUsageEXT {}
- data MicromapTriangleEXT = MicromapTriangleEXT {}
- data PhysicalDeviceOpacityMicromapFeaturesEXT = PhysicalDeviceOpacityMicromapFeaturesEXT {}
- data PhysicalDeviceOpacityMicromapPropertiesEXT = PhysicalDeviceOpacityMicromapPropertiesEXT {}
- data AccelerationStructureTrianglesOpacityMicromapEXT = AccelerationStructureTrianglesOpacityMicromapEXT {}
- newtype MicromapTypeEXT where
- type BuildMicromapFlagsEXT = BuildMicromapFlagBitsEXT
- newtype BuildMicromapFlagBitsEXT where
- type MicromapCreateFlagsEXT = MicromapCreateFlagBitsEXT
- newtype MicromapCreateFlagBitsEXT where
- newtype CopyMicromapModeEXT where
- newtype BuildMicromapModeEXT where
- newtype OpacityMicromapFormatEXT where
- newtype OpacityMicromapSpecialIndexEXT where
- OpacityMicromapSpecialIndexEXT Int32
- pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT :: OpacityMicromapSpecialIndexEXT
- pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT :: OpacityMicromapSpecialIndexEXT
- pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT :: OpacityMicromapSpecialIndexEXT
- pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT :: OpacityMicromapSpecialIndexEXT
- type EXT_OPACITY_MICROMAP_SPEC_VERSION = 2
- pattern EXT_OPACITY_MICROMAP_SPEC_VERSION :: forall a. Integral a => a
- type EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap"
- pattern EXT_OPACITY_MICROMAP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype DeferredOperationKHR = DeferredOperationKHR Word64
- newtype MicromapEXT = MicromapEXT Word64
- data DeviceOrHostAddressKHR
- = DeviceAddress DeviceAddress
- | HostAddress (Ptr ())
- data DeviceOrHostAddressConstKHR
- 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 GeometryInstanceFlagsKHR = GeometryInstanceFlagBitsKHR
- 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 BuildAccelerationStructureFlagsKHR = BuildAccelerationStructureFlagBitsKHR
- 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
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> MicromapCreateInfoEXT |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io MicromapEXT |
vkCreateMicromapEXT - Create a new micromap object
Description
Similar to other objects in Vulkan, the micromap creation merely creates
an object with a specific “shape”. The type and quantity of geometry
that can be built into a micromap is determined by the parameters of
MicromapCreateInfoEXT
.
The micromap data is stored in the object referred to by
MicromapCreateInfoEXT
::buffer
. Once memory has been bound to that
buffer, it must be populated by micromap build or micromap copy
commands such as cmdBuildMicromapsEXT
, buildMicromapsEXT
,
cmdCopyMicromapEXT
, and copyMicromapEXT
.
Note
The expected usage for a trace capture/replay tool is that it will
serialize and later deserialize the micromap data using micromap copy
commands. During capture the tool will use copyMicromapToMemoryEXT
or
cmdCopyMicromapToMemoryEXT
with a mode
of
COPY_MICROMAP_MODE_SERIALIZE_EXT
, and copyMemoryToMicromapEXT
or
cmdCopyMemoryToMicromapEXT
with a mode
of
COPY_MICROMAP_MODE_DESERIALIZE_EXT
during replay.
The input buffers passed to micromap build commands will be referenced by the implementation for the duration of the command. Micromaps 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 a subsequent acceleration structure build using the micromap or traversal of that acceleration structure.
Valid Usage
- The micromap feature must be enabled
- If
MicromapCreateInfoEXT
::deviceAddress
is not zero, the micromapCaptureReplay feature must be enabled - If
device
was created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCreateInfo
must be a valid pointer to a validMicromapCreateInfoEXT
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pMicromap
must be a valid pointer to aMicromapEXT
handle
Return Codes
See Also
VK_EXT_opacity_micromap,
AllocationCallbacks
,
Device
, MicromapCreateInfoEXT
,
MicromapEXT
withMicromapEXT :: forall io r. MonadIO io => Device -> MicromapCreateInfoEXT -> Maybe AllocationCallbacks -> (io MicromapEXT -> (MicromapEXT -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createMicromapEXT
and destroyMicromapEXT
To ensure that destroyMicromapEXT
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.
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("infos" ::: Vector MicromapBuildInfoEXT) |
|
-> io () |
vkCmdBuildMicromapsEXT - Build a micromap
Description
The cmdBuildMicromapsEXT
command provides the ability to initiate
multiple micromaps builds, however there is no ordering or
synchronization implied between any of the individual micromap builds.
Note
This means that there cannot be any memory aliasing between any micromap memories or scratch memories being used by any of the builds.
Accesses to the micromap scratch buffers as identified by the
MicromapBuildInfoEXT
::scratchData
buffer device addresses must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of (ACCESS_2_MICROMAP_READ_BIT_EXT
|
ACCESS_2_MICROMAP_WRITE_BIT_EXT
).
Accesses to MicromapBuildInfoEXT
::dstMicromap
must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of ACCESS_2_MICROMAP_WRITE_BIT_EXT
.
Accesses to other input buffers as identified by any used values of
MicromapBuildInfoEXT
::data
or
MicromapBuildInfoEXT
::triangleArray
must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of ACCESS_SHADER_READ_BIT
.
Valid Usage
- For each
pInfos
[i],dstMicromap
must have been created with a value ofMicromapCreateInfoEXT
::size
greater than or equal to the memory size required by the build operation, as returned bygetMicromapBuildSizesEXT
withpBuildInfo
=pInfos
[i]
- The
mode
member of each element ofpInfos
must be a validBuildMicromapModeEXT
value - The
dstMicromap
member of any element ofpInfos
must be a validMicromapEXT
handle - For each element of
pInfos
itstype
member must match the value ofMicromapCreateInfoEXT
::type
when itsdstMicromap
was created - The range of memory
backing the
dstMicromap
member of any element ofpInfos
that is accessed by this command must not overlap the memory backing thedstMicromap
member of any other element ofpInfos
, which is accessed by this command - The range of memory
backing the
dstMicromap
member of any element ofpInfos
that is accessed by this command must not overlap the memory backing thescratchData
member of any element ofpInfos
(including the same element), which is accessed by this command - The range of memory
backing the
scratchData
member of any element ofpInfos
that is accessed by this command must not overlap the memory backing thescratchData
member of any other element ofpInfos
, which is accessed by this command - For each element of
pInfos
, thebuffer
used to create itsdstMicromap
member must be bound to device memory - If
pInfos
[i].mode
isBUILD_MICROMAP_MODE_BUILD_EXT
, all addresses betweenpInfos
[i].scratchData.deviceAddress
andpInfos
[i].scratchData.deviceAddress
+ N - 1 must be in the buffer device address range of the same buffer, where N is given by thebuildScratchSize
member of theMicromapBuildSizesInfoEXT
structure returned from a call togetMicromapBuildSizesEXT
with an identicalMicromapBuildInfoEXT
structure and primitive count - The buffers from which the
buffer device addresses for all of the
data
andtriangleArray
members of allpInfos
[i] are queried must have been created with theBUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT
usage flag - For each element of
pInfos
[i] the buffer from which the buffer device addresspInfos
[i].scratchData.deviceAddress
is queried must have been created withBUFFER_USAGE_STORAGE_BUFFER_BIT
usage flag - For each element of
pInfos
, itsscratchData.deviceAddress
,data.deviceAddress
, andtriangleArray.deviceAddress
members must be valid device addresses obtained fromgetBufferDeviceAddress
- For each element of
pInfos
, ifscratchData.deviceAddress
,data.deviceAddress
, ortriangleArray.deviceAddress
is the address of a non-sparse buffer then it must be bound completely and contiguously to a singleDeviceMemory
object - For each element of
pInfos
, itsscratchData.deviceAddress
member must be a multiple ofPhysicalDeviceAccelerationStructurePropertiesKHR
::minAccelerationStructureScratchOffsetAlignment
- For each element of
pInfos
, itstriangleArray.deviceAddress
anddata.deviceAddress
members must be a multiple of256
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pInfos
must be a valid pointer to an array ofinfoCount
validMicromapBuildInfoEXT
structures -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was 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
-
infoCount
must be greater than0
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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_EXT_opacity_micromap,
CommandBuffer
, MicromapBuildInfoEXT
:: forall io. MonadIO io | |
=> Device |
|
-> DeferredOperationKHR |
|
-> ("infos" ::: Vector MicromapBuildInfoEXT) |
|
-> io Result |
vkBuildMicromapsEXT - Build a micromap on the host
Description
This command fulfills the same task as cmdBuildMicromapsEXT
but is
executed by the host.
The buildMicromapsEXT
command provides the ability to initiate
multiple micromaps builds, however there is no ordering or
synchronization implied between any of the individual micromap builds.
Note
This means that there cannot be any memory aliasing between any micromap memories or scratch memories being used by any of the builds.
Valid Usage
- For each
pInfos
[i],dstMicromap
must have been created with a value ofMicromapCreateInfoEXT
::size
greater than or equal to the memory size required by the build operation, as returned bygetMicromapBuildSizesEXT
withpBuildInfo
=pInfos
[i]
- The
mode
member of each element ofpInfos
must be a validBuildMicromapModeEXT
value - The
dstMicromap
member of any element ofpInfos
must be a validMicromapEXT
handle - For each element of
pInfos
itstype
member must match the value ofMicromapCreateInfoEXT
::type
when itsdstMicromap
was created - The range of memory
backing the
dstMicromap
member of any element ofpInfos
that is accessed by this command must not overlap the memory backing thedstMicromap
member of any other element ofpInfos
, which is accessed by this command - The range of memory
backing the
dstMicromap
member of any element ofpInfos
that is accessed by this command must not overlap the memory backing thescratchData
member of any element ofpInfos
(including the same element), which is accessed by this command - The range of memory
backing the
scratchData
member of any element ofpInfos
that is accessed by this command must not overlap the memory backing thescratchData
member of any other element ofpInfos
, which is accessed by this command - For each element of
pInfos
, thebuffer
used to create itsdstMicromap
member must be bound to host-visible device memory - For each element of
pInfos
, all referenced addresses ofpInfos
[i].data.hostAddress
must be valid host memory - For each element of
pInfos
, all referenced addresses ofpInfos
[i].triangleArray.hostAddress
must be valid host memory - The ::micromapHostCommands feature must be enabled
- If
pInfos
[i].mode
isBUILD_MICROMAP_MODE_BUILD_EXT
, all addresses betweenpInfos
[i].scratchData.hostAddress
andpInfos
[i].scratchData.hostAddress
+ N - 1 must be valid host memory, where N is given by thebuildScratchSize
member of theMicromapBuildSizesInfoEXT
structure returned from a call togetMicromapBuildSizesEXT
with an identicalMicromapBuildInfoEXT
structure and primitive count - For each element of
pInfos
, thebuffer
used to create itsdstMicromap
member must be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
deferredOperation
is notNULL_HANDLE
,deferredOperation
must be a validDeferredOperationKHR
handle -
pInfos
must be a valid pointer to an array ofinfoCount
validMicromapBuildInfoEXT
structures -
infoCount
must be greater than0
- If
deferredOperation
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_EXT_opacity_micromap,
DeferredOperationKHR
,
Device
, MicromapBuildInfoEXT
:: forall io. MonadIO io | |
=> Device |
|
-> MicromapEXT |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyMicromapEXT - Destroy a micromap object
Valid Usage
- If
AllocationCallbacks
were provided whenmicromap
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenmicromap
was created,pAllocator
must beNULL
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
micromap
is notNULL_HANDLE
,micromap
must be a validMicromapEXT
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
micromap
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
micromap
must be externally synchronized
See Also
VK_EXT_opacity_micromap,
AllocationCallbacks
,
Device
, MicromapEXT
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> CopyMicromapInfoEXT |
|
-> io () |
vkCmdCopyMicromapEXT - Copy a micromap
Description
This command copies the pInfo->src
micromap to the pInfo->dst
micromap in the manner specified by pInfo->mode
.
Accesses to pInfo->src
and pInfo->dst
must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of ACCESS_2_MICROMAP_READ_BIT_EXT
or
ACCESS_2_MICROMAP_WRITE_BIT_EXT
as
appropriate.
Valid Usage
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pInfo
must be a valid pointer to a validCopyMicromapInfoEXT
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was 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
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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
:: forall io. MonadIO io | |
=> Device |
|
-> DeferredOperationKHR |
|
-> CopyMicromapInfoEXT |
|
-> io Result |
vkCopyMicromapEXT - Copy a micromap on the host
Description
This command fulfills the same task as cmdCopyMicromapEXT
but is
executed by the host.
Valid Usage
- If
deferredOperation
is notNULL_HANDLE
, it must be a validDeferredOperationKHR
object
- Any previous
deferred operation that was associated with
deferredOperation
must be complete - The
buffer
used to createpInfo->src
must be bound to host-visible device memory - The
buffer
used to createpInfo->dst
must be bound to host-visible device memory - The ::micromapHostCommands feature must be enabled
- The
buffer
used to createpInfo->src
must be bound to memory that was not allocated with multiple instances - The
buffer
used to createpInfo->dst
must be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
deferredOperation
is notNULL_HANDLE
,deferredOperation
must be a validDeferredOperationKHR
handle -
pInfo
must be a valid pointer to a validCopyMicromapInfoEXT
structure - If
deferredOperation
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_EXT_opacity_micromap,
CopyMicromapInfoEXT
, DeferredOperationKHR
,
Device
cmdCopyMicromapToMemoryEXT Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> CopyMicromapToMemoryInfoEXT |
|
-> io () |
vkCmdCopyMicromapToMemoryEXT - Copy a micromap to device memory
Description
Accesses to pInfo->src
must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of ACCESS_2_MICROMAP_READ_BIT_EXT
.
Accesses to the buffer indicated by pInfo->dst.deviceAddress
must be
synchronized with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage and an access type of
ACCESS_TRANSFER_WRITE_BIT
.
This command produces the same results as copyMicromapToMemoryEXT
, 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
cmdCopyMemoryToMicromapEXT
or copyMemoryToMicromapEXT
.
The defined header structure for the serialized data consists of:
UUID_SIZE
bytes of data matchingPhysicalDeviceIDProperties
::driverUUID
UUID_SIZE
bytes of data identifying the compatibility for comparison usinggetDeviceMicromapCompatibilityEXT
The serialized data is written to the buffer (or read from the buffer) according to the host endianness.
Valid Usage
-
pInfo->dst.deviceAddress
must be aligned to256
bytes - If the buffer
pointed to by
pInfo->dst.deviceAddress
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer
used to createpInfo->src
must be bound to device memory
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pInfo
must be a valid pointer to a validCopyMicromapToMemoryInfoEXT
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was 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
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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_EXT_opacity_micromap,
CommandBuffer
, CopyMicromapToMemoryInfoEXT
copyMicromapToMemoryEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> DeferredOperationKHR |
|
-> CopyMicromapToMemoryInfoEXT |
|
-> io Result |
vkCopyMicromapToMemoryEXT - Serialize a micromap on the host
Description
This command fulfills the same task as cmdCopyMicromapToMemoryEXT
but
is executed by the host.
This command produces the same results as cmdCopyMicromapToMemoryEXT
,
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
cmdCopyMemoryToMicromapEXT
or copyMemoryToMicromapEXT
.
Valid Usage
- If
deferredOperation
is notNULL_HANDLE
, it must be a validDeferredOperationKHR
object
- Any
previous deferred operation that was associated with
deferredOperation
must be complete - The
buffer
used to createpInfo->src
must be bound to host-visible device memory -
pInfo->dst.hostAddress
must be a valid host pointer -
pInfo->dst.hostAddress
must be aligned to 16 bytes - The ::micromapHostCommands feature must be enabled
- The
buffer
used to createpInfo->src
must be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
deferredOperation
is notNULL_HANDLE
,deferredOperation
must be a validDeferredOperationKHR
handle -
pInfo
must be a valid pointer to a validCopyMicromapToMemoryInfoEXT
structure - If
deferredOperation
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_EXT_opacity_micromap,
CopyMicromapToMemoryInfoEXT
,
DeferredOperationKHR
,
Device
cmdCopyMemoryToMicromapEXT Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> CopyMemoryToMicromapInfoEXT |
|
-> io () |
vkCmdCopyMemoryToMicromapEXT - Copy device memory to a micromap
Description
Accesses to pInfo->dst
must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of ACCESS_2_MICROMAP_READ_BIT_EXT
.
Accesses to the buffer indicated by pInfo->src.deviceAddress
must be
synchronized with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage and an access type of
ACCESS_TRANSFER_READ_BIT
.
This command can accept micromaps produced by either
cmdCopyMicromapToMemoryEXT
or copyMicromapToMemoryEXT
.
Valid Usage
-
pInfo->src.deviceAddress
must be aligned to256
bytes - If the buffer
pointed to by
pInfo->src.deviceAddress
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - The
buffer
used to createpInfo->dst
must be bound to device memory
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pInfo
must be a valid pointer to a validCopyMemoryToMicromapInfoEXT
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was 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
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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_EXT_opacity_micromap,
CommandBuffer
, CopyMemoryToMicromapInfoEXT
copyMemoryToMicromapEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> DeferredOperationKHR |
|
-> CopyMemoryToMicromapInfoEXT |
|
-> io Result |
vkCopyMemoryToMicromapEXT - Deserialize a micromap on the host
Description
This command fulfills the same task as cmdCopyMemoryToMicromapEXT
but
is executed by the host.
This command can accept micromaps produced by either
cmdCopyMicromapToMemoryEXT
or copyMicromapToMemoryEXT
.
Valid Usage
- If
deferredOperation
is notNULL_HANDLE
, it must be a validDeferredOperationKHR
object
- Any
previous deferred operation that was associated with
deferredOperation
must be complete -
pInfo->src.hostAddress
must be a valid host pointer -
pInfo->src.hostAddress
must be aligned to 16 bytes - The
buffer
used to createpInfo->dst
must be bound to host-visible device memory - The ::micromapHostCommands feature must be enabled
- The
buffer
used to createpInfo->dst
must be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
deferredOperation
is notNULL_HANDLE
,deferredOperation
must be a validDeferredOperationKHR
handle -
pInfo
must be a valid pointer to a validCopyMemoryToMicromapInfoEXT
structure - If
deferredOperation
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_EXT_opacity_micromap,
CopyMemoryToMicromapInfoEXT
,
DeferredOperationKHR
,
Device
cmdWriteMicromapsPropertiesEXT Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("micromaps" ::: Vector MicromapEXT) |
|
-> QueryType |
|
-> QueryPool |
|
-> ("firstQuery" ::: Word32) |
|
-> io () |
vkCmdWriteMicromapsPropertiesEXT - Write micromap result parameters to query results.
Description
Accesses to any of the micromaps listed in pMicromaps
must be
synchronized
with the
PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
pipeline stage
and an
access type
of ACCESS_2_MICROMAP_READ_BIT_EXT
.
- If
queryType
isQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
, then the value written out is the number of bytes required by a serialized micromap. - If
queryType
isQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT
, then the value written out is the number of bytes required by a compacted micromap.
Valid Usage
- The queries
identified by
queryPool
andfirstQuery
must be unavailable - The
buffer
used to create each micromap inpMicrmaps
must be bound to device memory - The sum of
query
plusmicromapCount
must be less than or equal to the number of queries inqueryPool
- All
micromaps in
pMicromaps
must have been constructed prior to the execution of this command - All
micromaps in
pMicromaps
must have been constructed withBUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT
ifqueryType
isQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT
-
queryType
must beQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT
orQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pMicromaps
must be a valid pointer to an array ofmicromapCount
validMicromapEXT
handles -
queryType
must be a validQueryType
value -
queryPool
must be a validQueryPool
handle -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was 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
-
micromapCount
must be greater than0
- Each of
commandBuffer
,queryPool
, and the elements ofpMicromaps
must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was 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_EXT_opacity_micromap,
CommandBuffer
,
MicromapEXT
,
QueryPool
,
QueryType
writeMicromapsPropertiesEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> ("micromaps" ::: Vector MicromapEXT) |
|
-> QueryType |
|
-> ("dataSize" ::: Word64) |
|
-> ("data" ::: Ptr ()) |
|
-> ("stride" ::: Word64) |
|
-> io () |
vkWriteMicromapsPropertiesEXT - Query micromap meta-data on the host
Description
This command fulfills the same task as cmdWriteMicromapsPropertiesEXT
but is executed by the host.
Valid Usage
- All micromaps
in
pMicromaps
must have been constructed withBUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT
ifqueryType
isQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT
-
queryType
must beQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT
orQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
- If
queryType
isQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
, thenstride
must be a multiple of the size ofDeviceSize
- If
queryType
isQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
, thenpData
must point to aDeviceSize
- If
queryType
is -
dataSize
must be greater than or equal tomicromapCount
*stride
- The
buffer
used to create each micromap inpMicromaps
must be bound to host-visible device memory - The ::micromapHostCommands feature must be enabled
- The
buffer
used to create each micromap inpMicromaps
must be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pMicromaps
must be a valid pointer to an array ofmicromapCount
validMicromapEXT
handles -
queryType
must be a validQueryType
value -
pData
must be a valid pointer to an array ofdataSize
bytes -
micromapCount
must be greater than0
-
dataSize
must be greater than0
- Each element
of
pMicromaps
must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
getDeviceMicromapCompatibilityEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> MicromapVersionInfoEXT |
|
-> io AccelerationStructureCompatibilityKHR |
vkGetDeviceMicromapCompatibilityEXT - Check if a serialized micromap is compatible with the current device
Valid Usage
- The micromap feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pVersionInfo
must be a valid pointer to a validMicromapVersionInfoEXT
structure -
pCompatibility
must be a valid pointer to aAccelerationStructureCompatibilityKHR
value
See Also
VK_EXT_opacity_micromap,
AccelerationStructureCompatibilityKHR
,
Device
, MicromapVersionInfoEXT
getMicromapBuildSizesEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> AccelerationStructureBuildTypeKHR |
|
-> MicromapBuildInfoEXT |
|
-> io ("sizeInfo" ::: MicromapBuildSizesInfoEXT) |
vkGetMicromapBuildSizesEXT - Retrieve the required size for a micromap
Description
The dstMicromap
and mode
members of pBuildInfo
are ignored. Any
DeviceOrHostAddressKHR
members of pBuildInfo
are ignored by this command.
A micromap created with the micromapSize
returned by this command
supports any build with a MicromapBuildInfoEXT
structure subject to
the following properties:
- The build command is a host build command, and
buildType
isACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR
orACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
- The build command is a device build command, and
buildType
isACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR
orACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR
For
MicromapBuildInfoEXT
:- Its
type
, andflags
members are equal topBuildInfo->type
andpBuildInfo->flags
, respectively. - The sum of usage information in either
pUsageCounts
orppUsageCounts
is equal to the sum of usage information in eitherpBuildInfo->pUsageCounts
orpBuildInfo->ppUsageCounts
.
- Its
Similarly, the buildScratchSize
value will support any build command
specifying the BUILD_MICROMAP_MODE_BUILD_EXT
mode
under the above
conditions.
Valid Usage
-
MicromapBuildInfoEXT
::dstMicromap
must have been created fromdevice
- The micromap feature must be enabled
- If
device
was created with multiple physical devices, then the bufferDeviceAddressMultiDevice feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
buildType
must be a validAccelerationStructureBuildTypeKHR
value -
pBuildInfo
must be a valid pointer to a validMicromapBuildInfoEXT
structure -
pSizeInfo
must be a valid pointer to aMicromapBuildSizesInfoEXT
structure
See Also
VK_EXT_opacity_micromap,
AccelerationStructureBuildTypeKHR
,
Device
, MicromapBuildInfoEXT
,
MicromapBuildSizesInfoEXT
data MicromapBuildInfoEXT Source #
VkMicromapBuildInfoEXT - Structure specifying the data used to build a micromap
Description
Only one of pUsageCounts
or ppUsageCounts
can be a valid pointer,
the other must be NULL
. The elements of the non-NULL
array
describe the total counts used to build each micromap. Each element
contains a count
which is the number of micromap triangles of that
format
and subdivisionLevel
contained in the micromap. Multiple
elements with the same format
and subdivisionLevel
are allowed and
the total count for that format
and subdivisionLevel
is the sum of
the count
for each element.
Each micromap triangle refers to one element in triangleArray
which
contains the format
and subdivisionLevel
for that particular
triangle as well as a dataOffset
in bytes which is the location
relative to data
where that triangle’s micromap data begins. The data
at triangleArray
is laid out as a 4 byte unsigned integer for the
dataOffset
followed by a 2 byte unsigned integer for the subdivision
level then a 2 byte unsigned integer for the format. In practice,
compilers compile MicromapTriangleEXT
to match this pattern.
For opacity micromaps, the data at data
is packed as either one bit
per element for OPACITY_MICROMAP_FORMAT_2_STATE_EXT
or two bits per
element for OPACITY_MICROMAP_FORMAT_4_STATE_EXT
and is packed from LSB
to MSB in each byte. The data at each index in those bytes is
interpreted as discussed in
Ray Opacity Micromap.
For displacement micromaps, the data at data
is interpreted as
discussed in
Displacement Micromap Encoding.
Valid Usage
- If
type
isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
theformat
member ofMicromapUsageEXT
must be a valid value fromOpacityMicromapFormatEXT
- If
type
isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
theformat
member ofMicromapTriangleEXT
must be a valid value fromOpacityMicromapFormatEXT
- If
type
isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV
theformat
member ofMicromapUsageEXT
must be a valid value fromDisplacementMicromapFormatNV
- If
type
isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV
theformat
member ofMicromapTriangleEXT
must be a valid value fromDisplacementMicromapFormatNV
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT
-
pNext
must beNULL
-
type
must be a validMicromapTypeEXT
value -
flags
must be a valid combination ofBuildMicromapFlagBitsEXT
values - If
usageCountsCount
is not0
, andpUsageCounts
is notNULL
,pUsageCounts
must be a valid pointer to an array ofusageCountsCount
MicromapUsageEXT
structures - If
usageCountsCount
is not0
, andppUsageCounts
is notNULL
,ppUsageCounts
must be a valid pointer to an array ofusageCountsCount
valid pointers toMicromapUsageEXT
structures
See Also
VK_EXT_opacity_micromap,
BuildMicromapFlagsEXT
, BuildMicromapModeEXT
,
DeviceOrHostAddressConstKHR
,
DeviceOrHostAddressKHR
,
DeviceSize
,
MicromapEXT
, MicromapTypeEXT
,
MicromapUsageEXT
, StructureType
,
buildMicromapsEXT
, cmdBuildMicromapsEXT
, getMicromapBuildSizesEXT
MicromapBuildInfoEXT | |
|
Instances
Show MicromapBuildInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap showsPrec :: Int -> MicromapBuildInfoEXT -> ShowS # show :: MicromapBuildInfoEXT -> String # showList :: [MicromapBuildInfoEXT] -> ShowS # | |
ToCStruct MicromapBuildInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap withCStruct :: MicromapBuildInfoEXT -> (Ptr MicromapBuildInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr MicromapBuildInfoEXT -> MicromapBuildInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr MicromapBuildInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr MicromapBuildInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero MicromapBuildInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap |
data MicromapCreateInfoEXT Source #
VkMicromapCreateInfoEXT - Structure specifying the parameters of a newly created micromap 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 micromap on the same
implementation. The micromap must also be placed on an identically
created buffer
and at the same offset
.
Applications should avoid creating micromaps 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 a micromap 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.
If the micromap will be the target of a build operation, the required
size for a micromap can be queried with getMicromapBuildSizesEXT
.
Valid Usage
- If
deviceAddress
is not zero,createFlags
must includeMICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
- If
createFlags
includesMICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
,PhysicalDeviceOpacityMicromapFeaturesEXT
::micromapCaptureReplay
must beTRUE
-
buffer
must have been created with ausage
value containingBUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT
-
buffer
must not have been created withBUFFER_CREATE_SPARSE_RESIDENCY_BIT
- The sum of
offset
andsize
must be less than the size ofbuffer
-
offset
must be a multiple of256
bytes
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT
-
pNext
must beNULL
-
createFlags
must be a valid combination ofMicromapCreateFlagBitsEXT
values -
buffer
must be a validBuffer
handle -
type
must be a validMicromapTypeEXT
value
See Also
VK_EXT_opacity_micromap,
Buffer
,
DeviceAddress
,
DeviceSize
, MicromapCreateFlagsEXT
,
MicromapTypeEXT
, StructureType
,
createMicromapEXT
MicromapCreateInfoEXT | |
|
Instances
data MicromapVersionInfoEXT Source #
VkMicromapVersionInfoEXT - Micromap 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 micromap (via cmdCopyMicromapToMemoryEXT
or
copyMicromapToMemoryEXT
) that is loaded in memory. Using arrays would
necessitate extra memory copies of the UUIDs.
Valid Usage (Implicit)
See Also
VK_EXT_opacity_micromap,
StructureType
,
getDeviceMicromapCompatibilityEXT
MicromapVersionInfoEXT | |
|
Instances
Show MicromapVersionInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap showsPrec :: Int -> MicromapVersionInfoEXT -> ShowS # show :: MicromapVersionInfoEXT -> String # showList :: [MicromapVersionInfoEXT] -> ShowS # | |
FromCStruct MicromapVersionInfoEXT Source # | |
ToCStruct MicromapVersionInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap withCStruct :: MicromapVersionInfoEXT -> (Ptr MicromapVersionInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr MicromapVersionInfoEXT -> MicromapVersionInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr MicromapVersionInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr MicromapVersionInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero MicromapVersionInfoEXT Source # | |
data CopyMicromapInfoEXT Source #
VkCopyMicromapInfoEXT - Parameters for copying a micromap
Valid Usage
-
mode
must beCOPY_MICROMAP_MODE_COMPACT_EXT
orCOPY_MICROMAP_MODE_CLONE_EXT
- The source acceleration
structure
src
must have been constructed prior to the execution of this command - If
mode
isCOPY_MICROMAP_MODE_COMPACT_EXT
,src
must have been constructed withBUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT
in the build - The
buffer
used to createsrc
must be bound to device memory - The
buffer
used to createdst
must be bound to device memory
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT
-
pNext
must beNULL
-
src
must be a validMicromapEXT
handle -
dst
must be a validMicromapEXT
handle -
mode
must be a validCopyMicromapModeEXT
value - Both of
dst
, andsrc
must have been created, allocated, or retrieved from the sameDevice
See Also
VK_EXT_opacity_micromap,
CopyMicromapModeEXT
, MicromapEXT
,
StructureType
, cmdCopyMicromapEXT
,
copyMicromapEXT
CopyMicromapInfoEXT | |
|
Instances
data CopyMicromapToMemoryInfoEXT Source #
VkCopyMicromapToMemoryInfoEXT - Parameters for serializing a micromap
Valid Usage
- The memory pointed to
by
dst
must be at least as large as the serialization size ofsrc
, as reported bywriteMicromapsPropertiesEXT
orcmdWriteMicromapsPropertiesEXT
with a query type ofQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
-
mode
must beCOPY_MICROMAP_MODE_SERIALIZE_EXT
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT
-
pNext
must beNULL
-
src
must be a validMicromapEXT
handle -
mode
must be a validCopyMicromapModeEXT
value
See Also
VK_EXT_opacity_micromap,
CopyMicromapModeEXT
,
DeviceOrHostAddressKHR
,
MicromapEXT
,
StructureType
,
cmdCopyMicromapToMemoryEXT
, copyMicromapToMemoryEXT
CopyMicromapToMemoryInfoEXT | |
|
Instances
Show CopyMicromapToMemoryInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap showsPrec :: Int -> CopyMicromapToMemoryInfoEXT -> ShowS # show :: CopyMicromapToMemoryInfoEXT -> String # showList :: [CopyMicromapToMemoryInfoEXT] -> ShowS # | |
ToCStruct CopyMicromapToMemoryInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap withCStruct :: CopyMicromapToMemoryInfoEXT -> (Ptr CopyMicromapToMemoryInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr CopyMicromapToMemoryInfoEXT -> CopyMicromapToMemoryInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr CopyMicromapToMemoryInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CopyMicromapToMemoryInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero CopyMicromapToMemoryInfoEXT Source # | |
data CopyMemoryToMicromapInfoEXT Source #
VkCopyMemoryToMicromapInfoEXT - Parameters for deserializing a micromap
Valid Usage
- The source memory
pointed to by
src
must contain data previously serialized usingcmdCopyMicromapToMemoryEXT
-
mode
must beCOPY_MICROMAP_MODE_DESERIALIZE_EXT
- The data in
src
must have a format compatible with the destination physical device as returned bygetDeviceMicromapCompatibilityEXT
-
dst
must have been created with asize
greater than or equal to that used to serialize the data insrc
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT
-
pNext
must beNULL
-
dst
must be a validMicromapEXT
handle -
mode
must be a validCopyMicromapModeEXT
value
See Also
VK_EXT_opacity_micromap,
CopyMicromapModeEXT
,
DeviceOrHostAddressConstKHR
,
MicromapEXT
,
StructureType
,
cmdCopyMemoryToMicromapEXT
, copyMemoryToMicromapEXT
CopyMemoryToMicromapInfoEXT | |
|
Instances
Show CopyMemoryToMicromapInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap showsPrec :: Int -> CopyMemoryToMicromapInfoEXT -> ShowS # show :: CopyMemoryToMicromapInfoEXT -> String # showList :: [CopyMemoryToMicromapInfoEXT] -> ShowS # | |
ToCStruct CopyMemoryToMicromapInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap withCStruct :: CopyMemoryToMicromapInfoEXT -> (Ptr CopyMemoryToMicromapInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr CopyMemoryToMicromapInfoEXT -> CopyMemoryToMicromapInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr CopyMemoryToMicromapInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CopyMemoryToMicromapInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero CopyMemoryToMicromapInfoEXT Source # | |
data MicromapBuildSizesInfoEXT Source #
VkMicromapBuildSizesInfoEXT - Structure specifying build sizes for a micromap
Valid Usage (Implicit)
See Also
VK_EXT_opacity_micromap,
Bool32
,
DeviceSize
,
StructureType
,
getMicromapBuildSizesEXT
MicromapBuildSizesInfoEXT | |
|
Instances
data MicromapUsageEXT Source #
VkMicromapUsageEXT - Structure specifying the usage information used to build a micromap
Valid Usage
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
thenformat
must beOPACITY_MICROMAP_FORMAT_2_STATE_EXT
orOPACITY_MICROMAP_FORMAT_4_STATE_EXT
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
andformat
isOPACITY_MICROMAP_FORMAT_2_STATE_EXT
thensubdivisionLevel
must be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT
::maxOpacity2StateSubdivisionLevel
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
andformat
isOPACITY_MICROMAP_FORMAT_4_STATE_EXT
thensubdivisionLevel
must be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT
::maxOpacity4StateSubdivisionLevel
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV
thenformat
must beDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV
,DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV
orDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV
thensubdivisionLevel
must be less than or equal toPhysicalDeviceDisplacementMicromapPropertiesNV
::maxDisplacementMicromapSubdivisionLevel
The format
is interpreted based on the type
of the micromap using
it.
See Also
VK_EXT_opacity_micromap,
AccelerationStructureTrianglesDisplacementMicromapNV
,
AccelerationStructureTrianglesOpacityMicromapEXT
,
MicromapBuildInfoEXT
Instances
data MicromapTriangleEXT Source #
VkMicromapTriangleEXT - Structure specifying the micromap format and data for a triangle
Valid Usage
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
thenformat
must beOPACITY_MICROMAP_FORMAT_2_STATE_EXT
orOPACITY_MICROMAP_FORMAT_4_STATE_EXT
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
andformat
isOPACITY_MICROMAP_FORMAT_2_STATE_EXT
thensubdivisionLevel
must be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT
::maxOpacity2StateSubdivisionLevel
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXT
andformat
isOPACITY_MICROMAP_FORMAT_4_STATE_EXT
thensubdivisionLevel
must be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT
::maxOpacity4StateSubdivisionLevel
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV
thenformat
must beDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV
,DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV
orDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV
- If the
MicromapTypeEXT
of the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV
thensubdivisionLevel
must be less than or equal toPhysicalDeviceDisplacementMicromapPropertiesNV
::maxDisplacementMicromapSubdivisionLevel
The format
is interpreted based on the type
of the micromap using
it.
See Also
MicromapTriangleEXT | |
|
Instances
data PhysicalDeviceOpacityMicromapFeaturesEXT Source #
VkPhysicalDeviceOpacityMicromapFeaturesEXT - Structure describing the ray tracing opacity micromap features that can be supported by an implementation
Members
This structure describes the following feature:
Description
If the PhysicalDeviceOpacityMicromapFeaturesEXT
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. PhysicalDeviceOpacityMicromapFeaturesEXT
can also be used
in the pNext
chain of DeviceCreateInfo
to
selectively enable these features.
Valid Usage (Implicit)
See Also
Instances
data PhysicalDeviceOpacityMicromapPropertiesEXT Source #
VkPhysicalDeviceOpacityMicromapPropertiesEXT - Structure describing the opacity micromap properties of a physical device
Description
If the PhysicalDeviceOpacityMicromapPropertiesEXT
structure is
included in the pNext
chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2
,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
PhysicalDeviceOpacityMicromapPropertiesEXT | |
|
Instances
data AccelerationStructureTrianglesOpacityMicromapEXT Source #
VkAccelerationStructureTrianglesOpacityMicromapEXT - Structure specifying an opacity micromap in a bottom-level acceleration structure
Description
If AccelerationStructureTrianglesOpacityMicromapEXT
is included in the
pNext
chain of a
AccelerationStructureGeometryTrianglesDataKHR
structure, that geometry will reference that micromap.
For each triangle in the geometry, the acceleration structure build
fetches an index from indexBuffer
using indexType
and indexStride
.
If that value is the unsigned cast of one of the values from
OpacityMicromapSpecialIndexEXT
then that triangle behaves as described
for that special value in
Ray Opacity Micromap.
Otherwise that triangle uses the opacity micromap information from
micromap
at that index plus baseTriangle
.
Only one of pUsageCounts
or ppUsageCounts
can be a valid pointer,
the other must be NULL
. The elements of the non-NULL
array
describe the total count used to build this geometry. For a given
format
and subdivisionLevel
the number of triangles in this geometry
matching those values after indirection and special index handling
must be equal to the sum of matching count
provided.
If micromap
is NULL_HANDLE
, then every
value read from indexBuffer
must be one of the values in
OpacityMicromapSpecialIndexEXT
.
Valid Usage
Valid Usage (Implicit)
-
indexType
must be a validIndexType
value -
If
usageCountsCount
is not0
, andpUsageCounts
is notNULL
,pUsageCounts
must be a valid pointer to an array ofusageCountsCount
MicromapUsageEXT
structures -
If
usageCountsCount
is not0
, andppUsageCounts
is notNULL
,ppUsageCounts
must be a valid pointer to an array ofusageCountsCount
valid pointers toMicromapUsageEXT
structures -
If
micromap
is notNULL_HANDLE
,micromap
must be a validMicromapEXT
handle
See Also
VK_EXT_opacity_micromap,
DeviceOrHostAddressConstKHR
,
DeviceSize
,
IndexType
,
MicromapEXT
, MicromapUsageEXT
,
StructureType
AccelerationStructureTrianglesOpacityMicromapEXT | |
|
Instances
newtype MicromapTypeEXT Source #
VkMicromapTypeEXT - Type of micromap
See Also
VK_EXT_opacity_micromap,
MicromapBuildInfoEXT
, MicromapCreateInfoEXT
pattern MICROMAP_TYPE_OPACITY_MICROMAP_EXT :: MicromapTypeEXT |
|
pattern MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV :: MicromapTypeEXT |
|
Instances
newtype BuildMicromapFlagBitsEXT Source #
VkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap builds
See Also
pattern BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT :: BuildMicromapFlagBitsEXT |
|
pattern BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT :: BuildMicromapFlagBitsEXT |
|
pattern BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT :: BuildMicromapFlagBitsEXT |
Instances
newtype MicromapCreateFlagBitsEXT Source #
VkMicromapCreateFlagBitsEXT - Bitmask specifying additional creation parameters for micromap
See Also
pattern MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT :: MicromapCreateFlagBitsEXT |
|
Instances
newtype CopyMicromapModeEXT Source #
VkCopyMicromapModeEXT - Micromap copy mode
See Also
VK_EXT_opacity_micromap,
CopyMemoryToMicromapInfoEXT
, CopyMicromapInfoEXT
,
CopyMicromapToMemoryInfoEXT
pattern COPY_MICROMAP_MODE_CLONE_EXT :: CopyMicromapModeEXT |
|
pattern COPY_MICROMAP_MODE_SERIALIZE_EXT :: CopyMicromapModeEXT |
|
pattern COPY_MICROMAP_MODE_DESERIALIZE_EXT :: CopyMicromapModeEXT |
|
pattern COPY_MICROMAP_MODE_COMPACT_EXT :: CopyMicromapModeEXT |
|
Instances
newtype BuildMicromapModeEXT Source #
VkBuildMicromapModeEXT - Enum specifying the type of build operation to perform
See Also
pattern BUILD_MICROMAP_MODE_BUILD_EXT :: BuildMicromapModeEXT |
|
Instances
newtype OpacityMicromapFormatEXT Source #
VkOpacityMicromapFormatEXT - Format enum for opacity micromaps
Description
Note
For compactness, these values are stored as 16-bit in some structures.
See Also
pattern OPACITY_MICROMAP_FORMAT_2_STATE_EXT :: OpacityMicromapFormatEXT |
|
pattern OPACITY_MICROMAP_FORMAT_4_STATE_EXT :: OpacityMicromapFormatEXT |
|
Instances
newtype OpacityMicromapSpecialIndexEXT Source #
VkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromap
See Also
pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT :: OpacityMicromapSpecialIndexEXT |
|
pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT :: OpacityMicromapSpecialIndexEXT |
|
pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT :: OpacityMicromapSpecialIndexEXT |
|
pattern OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT :: OpacityMicromapSpecialIndexEXT |
|
Instances
type EXT_OPACITY_MICROMAP_SPEC_VERSION = 2 Source #
pattern EXT_OPACITY_MICROMAP_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap" Source #
pattern EXT_OPACITY_MICROMAP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
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
Instances
newtype MicromapEXT Source #
VkMicromapEXT - Opaque handle to a micromap object
See Also
VK_EXT_opacity_micromap,
AccelerationStructureTrianglesDisplacementMicromapNV
,
AccelerationStructureTrianglesOpacityMicromapEXT
,
CopyMemoryToMicromapInfoEXT
,
CopyMicromapInfoEXT
,
CopyMicromapToMemoryInfoEXT
,
MicromapBuildInfoEXT
,
cmdWriteMicromapsPropertiesEXT
,
createMicromapEXT
,
destroyMicromapEXT
,
writeMicromapsPropertiesEXT
Instances
data DeviceOrHostAddressKHR Source #
Instances
Show DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure showsPrec :: Int -> DeviceOrHostAddressKHR -> ShowS # show :: DeviceOrHostAddressKHR -> String # showList :: [DeviceOrHostAddressKHR] -> ShowS # | |
ToCStruct DeviceOrHostAddressKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure 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 # | |
data DeviceOrHostAddressConstKHR Source #
Instances
Show DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure showsPrec :: Int -> DeviceOrHostAddressConstKHR -> ShowS # show :: DeviceOrHostAddressConstKHR -> String # showList :: [DeviceOrHostAddressConstKHR] -> ShowS # | |
ToCStruct DeviceOrHostAddressConstKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_acceleration_structure 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 # | |
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
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
Instances
newtype AccelerationStructureBuildTypeKHR Source #
VkAccelerationStructureBuildTypeKHR - Acceleration structure build type
See Also
VK_KHR_acceleration_structure,
getAccelerationStructureBuildSizesKHR
,
getMicromapBuildSizesEXT
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
pattern ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR :: AccelerationStructureCompatibilityKHR |
|
pattern ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR :: AccelerationStructureCompatibilityKHR |
|