| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_opacity_micromap
Description
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
MicromapEXTstructure to store the micromap, - functions similar to acceleration structure build functions to build the opacity micromap array, and
- a structure to extend
AccelerationStructureGeometryTrianglesDataKHRto attach a micromap to the geometry of the acceleration structure.
New Object Types
New Commands
cmdBuildMicromapsEXTcmdCopyMemoryToMicromapEXTcmdCopyMicromapEXTcmdCopyMicromapToMemoryEXTcmdWriteMicromapsPropertiesEXTcopyMemoryToMicromapEXTcopyMicromapEXTcopyMicromapToMemoryEXTcreateMicromapEXTdestroyMicromapEXTgetDeviceMicromapCompatibilityEXTgetMicromapBuildSizesEXTwriteMicromapsPropertiesEXT
New Structures
CopyMicromapInfoEXTCopyMicromapToMemoryInfoEXTMicromapBuildInfoEXTMicromapBuildSizesInfoEXTMicromapCreateInfoEXTMicromapTriangleEXTMicromapUsageEXTMicromapVersionInfoEXTExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
BuildMicromapModeEXTCopyMicromapModeEXTMicromapCreateFlagBitsEXTMicromapTypeEXTOpacityMicromapFormatEXTOpacityMicromapSpecialIndexEXT
New Bitmasks
New Enum Constants
EXT_OPACITY_MICROMAP_SPEC_VERSIONExtending
AccessFlagBits2:Extending
BufferUsageFlagBits:Extending
BuildAccelerationStructureFlagBitsKHR:Extending
GeometryInstanceFlagBitsKHR:Extending
ObjectType:Extending
PipelineCreateFlagBits:Extending
PipelineStageFlagBits2:Extending
QueryType:Extending
StructureType:STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_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_structureand 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
Arguments
| :: 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::deviceAddressis not zero, the micromapCaptureReplay 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 validMicromapCreateInfoEXTstructure - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pMicromapmust be a valid pointer to aMicromapEXThandle
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.
Arguments
| :: 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],dstMicromapmust have been created with a value ofMicromapCreateInfoEXT::sizegreater than or equal to the memory size required by the build operation, as returned bygetMicromapBuildSizesEXTwithpBuildInfo=pInfos[i]
- The
modemember of each element ofpInfosmust be a validBuildMicromapModeEXTvalue - The
dstMicromapmember of any element ofpInfosmust be a validMicromapEXThandle - For each element of
pInfositstypemember must match the value ofMicromapCreateInfoEXT::typewhen itsdstMicromapwas created - The range of memory
backing the
dstMicromapmember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thedstMicromapmember of any other element ofpInfos, which is accessed by this command - The range of memory
backing the
dstMicromapmember 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 - For each element of
pInfos, thebufferused to create itsdstMicromapmember must be bound to device memory - If
pInfos[i].modeisBUILD_MICROMAP_MODE_BUILD_EXT, 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 theMicromapBuildSizesInfoEXTstructure returned from a call togetMicromapBuildSizesEXTwith an identicalMicromapBuildInfoEXTstructure and primitive count - The buffers from which the
buffer device addresses for all of the
dataandtriangleArraymembers of allpInfos[i] are queried must have been created with theBUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXTusage flag - For each element of
pInfos[i] the buffer from which the buffer device addresspInfos[i].scratchData.deviceAddressis queried must have been created withBUFFER_USAGE_STORAGE_BUFFER_BITusage flag - For each element of
pInfos, itsscratchData.deviceAddress,data.deviceAddress, andtriangleArray.deviceAddressmembers must be valid device addresses obtained fromgetBufferDeviceAddress - For each element of
pInfos, ifscratchData.deviceAddress,data.deviceAddress, ortriangleArray.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 each element of
pInfos, itstriangleArray.deviceAddressanddata.deviceAddressmembers must be a multiple of256
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfosmust be a valid pointer to an array ofinfoCountvalidMicromapBuildInfoEXTstructures -
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_EXT_opacity_micromap,
CommandBuffer, MicromapBuildInfoEXT
Arguments
| :: 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],dstMicromapmust have been created with a value ofMicromapCreateInfoEXT::sizegreater than or equal to the memory size required by the build operation, as returned bygetMicromapBuildSizesEXTwithpBuildInfo=pInfos[i]
- The
modemember of each element ofpInfosmust be a validBuildMicromapModeEXTvalue - The
dstMicromapmember of any element ofpInfosmust be a validMicromapEXThandle - For each element of
pInfositstypemember must match the value ofMicromapCreateInfoEXT::typewhen itsdstMicromapwas created - The range of memory
backing the
dstMicromapmember of any element ofpInfosthat is accessed by this command must not overlap the memory backing thedstMicromapmember of any other element ofpInfos, which is accessed by this command - The range of memory
backing the
dstMicromapmember 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 - For each element of
pInfos, thebufferused to create itsdstMicromapmember must be bound to host-visible device memory - For each element of
pInfos, all referenced addresses ofpInfos[i].data.hostAddressmust be valid host memory - For each element of
pInfos, all referenced addresses ofpInfos[i].triangleArray.hostAddressmust be valid host memory - The ::micromapHostCommands feature must be enabled
- If
pInfos[i].modeisBUILD_MICROMAP_MODE_BUILD_EXT, all addresses betweenpInfos[i].scratchData.hostAddressandpInfos[i].scratchData.hostAddress+ N - 1 must be valid host memory, where N is given by thebuildScratchSizemember of theMicromapBuildSizesInfoEXTstructure returned from a call togetMicromapBuildSizesEXTwith an identicalMicromapBuildInfoEXTstructure and primitive count - For each element of
pInfos, thebufferused to create itsdstMicromapmember must 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 -
pInfosmust be a valid pointer to an array ofinfoCountvalidMicromapBuildInfoEXTstructures -
infoCountmust be greater than0 - If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_EXT_opacity_micromap,
DeferredOperationKHR,
Device, MicromapBuildInfoEXT
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> MicromapEXT |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyMicromapEXT - Destroy a micromap object
Valid Usage
- If
AllocationCallbackswere provided whenmicromapwas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whenmicromapwas created,pAllocatormust beNULL
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
- If
micromapis notNULL_HANDLE,micromapmust be a validMicromapEXThandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure - If
micromapis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
micromapmust be externally synchronized
See Also
VK_EXT_opacity_micromap,
AllocationCallbacks,
Device, MicromapEXT
Arguments
| :: 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)
-
commandBuffermust be a validCommandBufferhandle
-
pInfomust be a valid pointer to a validCopyMicromapInfoEXTstructure -
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
Arguments
| :: 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
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 - The ::micromapHostCommands 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 validCopyMicromapInfoEXTstructure - If
deferredOperationis 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 #
Arguments
| :: 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_SIZEbytes of data matchingPhysicalDeviceIDProperties::driverUUIDUUID_SIZEbytes of data identifying the compatibility for comparison usinggetDeviceMicromapCompatibilityEXTThe serialized data is written to the buffer (or read from the buffer) according to the host endianness.
Valid Usage
-
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 validCopyMicromapToMemoryInfoEXTstructure -
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_EXT_opacity_micromap,
CommandBuffer, CopyMicromapToMemoryInfoEXT
copyMicromapToMemoryEXT Source #
Arguments
| :: 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
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 ::micromapHostCommands feature must be enabled
- 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 validCopyMicromapToMemoryInfoEXTstructure - If
deferredOperationis 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 #
Arguments
| :: 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.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 validCopyMemoryToMicromapInfoEXTstructure -
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_EXT_opacity_micromap,
CommandBuffer, CopyMemoryToMicromapInfoEXT
copyMemoryToMicromapEXT Source #
Arguments
| :: 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
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 ::micromapHostCommands feature must be enabled
- 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 validCopyMemoryToMicromapInfoEXTstructure - If
deferredOperationis 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 #
Arguments
| :: 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
queryTypeisQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, then the value written out is the number of bytes required by a serialized micromap. - If
queryTypeisQUERY_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
queryPoolandfirstQuerymust be unavailable - The
bufferused to create each micromap inpMicrmapsmust be bound to device memory - The sum of
queryplusmicromapCountmust be less than or equal to the number of queries inqueryPool - All
micromaps in
pMicromapsmust have been constructed prior to the execution of this command - All
micromaps in
pMicromapsmust have been constructed withBUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXTifqueryTypeisQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT -
queryTypemust beQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXTorQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pMicromapsmust be a valid pointer to an array ofmicromapCountvalidMicromapEXThandles -
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
-
micromapCountmust be greater than0 - Each of
commandBuffer,queryPool, and the elements ofpMicromapsmust 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_EXT_opacity_micromap,
CommandBuffer,
MicromapEXT,
QueryPool,
QueryType
writeMicromapsPropertiesEXT Source #
Arguments
| :: 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
pMicromapsmust have been constructed withBUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXTifqueryTypeisQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT -
queryTypemust beQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXTorQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT - If
queryTypeisQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, thenstridemust be a multiple of the size ofDeviceSize - If
queryTypeisQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, thenpDatamust point to aDeviceSize - If
queryTypeis -
dataSizemust be greater than or equal tomicromapCount*stride - The
bufferused to create each micromap inpMicromapsmust be bound to host-visible device memory - The ::micromapHostCommands feature must be enabled
- The
bufferused to create each micromap inpMicromapsmust be bound to memory that was not allocated with multiple instances
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pMicromapsmust be a valid pointer to an array ofmicromapCountvalidMicromapEXThandles -
queryTypemust be a validQueryTypevalue -
pDatamust be a valid pointer to an array ofdataSizebytes -
micromapCountmust be greater than0 -
dataSizemust be greater than0 - Each element
of
pMicromapsmust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
getDeviceMicromapCompatibilityEXT Source #
Arguments
| :: 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)
-
devicemust be a validDevicehandle
-
pVersionInfomust be a valid pointer to a validMicromapVersionInfoEXTstructure -
pCompatibilitymust be a valid pointer to aAccelerationStructureCompatibilityKHRvalue
See Also
VK_EXT_opacity_micromap,
AccelerationStructureCompatibilityKHR,
Device, MicromapVersionInfoEXT
getMicromapBuildSizesEXT Source #
Arguments
| :: 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
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
MicromapBuildInfoEXT:- Its
type, andflagsmembers are equal topBuildInfo->typeandpBuildInfo->flags, respectively. - The sum of usage information in either
pUsageCountsorppUsageCountsis equal to the sum of usage information in eitherpBuildInfo->pUsageCountsorpBuildInfo->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::dstMicromapmust have been created fromdevice
- The micromap 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
-
buildTypemust be a validAccelerationStructureBuildTypeKHRvalue -
pBuildInfomust be a valid pointer to a validMicromapBuildInfoEXTstructure -
pSizeInfomust be a valid pointer to aMicromapBuildSizesInfoEXTstructure
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
typeisMICROMAP_TYPE_OPACITY_MICROMAP_EXTtheformatmember ofMicromapUsageEXTmust be a valid value fromOpacityMicromapFormatEXT - If
typeisMICROMAP_TYPE_OPACITY_MICROMAP_EXTtheformatmember ofMicromapTriangleEXTmust be a valid value fromOpacityMicromapFormatEXT - If
typeisMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVtheformatmember ofMicromapUsageEXTmust be a valid value fromDisplacementMicromapFormatNV - If
typeisMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVtheformatmember ofMicromapTriangleEXTmust be a valid value fromDisplacementMicromapFormatNV
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT
-
pNextmust beNULL -
typemust be a validMicromapTypeEXTvalue -
flagsmust be a valid combination ofBuildMicromapFlagBitsEXTvalues - If
usageCountsCountis not0, andpUsageCountsis notNULL,pUsageCountsmust be a valid pointer to an array ofusageCountsCountMicromapUsageEXTstructures - If
usageCountsCountis not0, andppUsageCountsis notNULL,ppUsageCountsmust be a valid pointer to an array ofusageCountsCountvalid pointers toMicromapUsageEXTstructures
See Also
VK_EXT_opacity_micromap,
BuildMicromapFlagsEXT, BuildMicromapModeEXT,
DeviceOrHostAddressConstKHR,
DeviceOrHostAddressKHR,
DeviceSize,
MicromapEXT, MicromapTypeEXT,
MicromapUsageEXT, StructureType,
buildMicromapsEXT, cmdBuildMicromapsEXT, getMicromapBuildSizesEXT
Constructors
| MicromapBuildInfoEXT | |
Fields
| |
Instances
| Show MicromapBuildInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods showsPrec :: Int -> MicromapBuildInfoEXT -> ShowS # show :: MicromapBuildInfoEXT -> String # showList :: [MicromapBuildInfoEXT] -> ShowS # | |
| ToCStruct MicromapBuildInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods 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 Methods | |
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
deviceAddressis not zero,createFlagsmust includeMICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
- If
createFlagsincludesMICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT,PhysicalDeviceOpacityMicromapFeaturesEXT::micromapCaptureReplaymust beTRUE -
buffermust have been created with ausagevalue containingBUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT -
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
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT
-
pNextmust beNULL -
createFlagsmust be a valid combination ofMicromapCreateFlagBitsEXTvalues -
buffermust be a validBufferhandle -
typemust be a validMicromapTypeEXTvalue
See Also
VK_EXT_opacity_micromap,
Buffer,
DeviceAddress,
DeviceSize, MicromapCreateFlagsEXT,
MicromapTypeEXT, StructureType,
createMicromapEXT
Constructors
| MicromapCreateInfoEXT | |
Fields
| |
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
Constructors
| MicromapVersionInfoEXT | |
Fields
| |
Instances
| Show MicromapVersionInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods showsPrec :: Int -> MicromapVersionInfoEXT -> ShowS # show :: MicromapVersionInfoEXT -> String # showList :: [MicromapVersionInfoEXT] -> ShowS # | |
| FromCStruct MicromapVersionInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods peekCStruct :: Ptr MicromapVersionInfoEXT -> IO MicromapVersionInfoEXT Source # | |
| ToCStruct MicromapVersionInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods 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 # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods | |
data CopyMicromapInfoEXT Source #
VkCopyMicromapInfoEXT - Parameters for copying a micromap
Valid Usage
-
modemust beCOPY_MICROMAP_MODE_COMPACT_EXTorCOPY_MICROMAP_MODE_CLONE_EXT
- The source acceleration
structure
srcmust have been constructed prior to the execution of this command - If
modeisCOPY_MICROMAP_MODE_COMPACT_EXT,srcmust have been constructed withBUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXTin the build - The
bufferused to createsrcmust be bound to device memory - The
bufferused to createdstmust be bound to device memory
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT
-
pNextmust beNULL -
srcmust be a validMicromapEXThandle -
dstmust be a validMicromapEXThandle -
modemust be a validCopyMicromapModeEXTvalue - Both of
dst, andsrcmust have been created, allocated, or retrieved from the sameDevice
See Also
VK_EXT_opacity_micromap,
CopyMicromapModeEXT, MicromapEXT,
StructureType, cmdCopyMicromapEXT,
copyMicromapEXT
Constructors
| CopyMicromapInfoEXT | |
Fields
| |
Instances
data CopyMicromapToMemoryInfoEXT Source #
VkCopyMicromapToMemoryInfoEXT - Parameters for serializing a micromap
Valid Usage
- The memory pointed to
by
dstmust be at least as large as the serialization size ofsrc, as reported bywriteMicromapsPropertiesEXTorcmdWriteMicromapsPropertiesEXTwith a query type ofQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT -
modemust beCOPY_MICROMAP_MODE_SERIALIZE_EXT
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT
-
pNextmust beNULL -
srcmust be a validMicromapEXThandle -
modemust be a validCopyMicromapModeEXTvalue
See Also
VK_EXT_opacity_micromap,
CopyMicromapModeEXT,
DeviceOrHostAddressKHR,
MicromapEXT,
StructureType,
cmdCopyMicromapToMemoryEXT, copyMicromapToMemoryEXT
Constructors
| CopyMicromapToMemoryInfoEXT | |
Fields
| |
Instances
| Show CopyMicromapToMemoryInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods showsPrec :: Int -> CopyMicromapToMemoryInfoEXT -> ShowS # show :: CopyMicromapToMemoryInfoEXT -> String # showList :: [CopyMicromapToMemoryInfoEXT] -> ShowS # | |
| ToCStruct CopyMicromapToMemoryInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods 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 # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods | |
data CopyMemoryToMicromapInfoEXT Source #
VkCopyMemoryToMicromapInfoEXT - Parameters for deserializing a micromap
Valid Usage
- The source memory
pointed to by
srcmust contain data previously serialized usingcmdCopyMicromapToMemoryEXT
-
modemust beCOPY_MICROMAP_MODE_DESERIALIZE_EXT - The data in
srcmust have a format compatible with the destination physical device as returned bygetDeviceMicromapCompatibilityEXT -
dstmust have been created with asizegreater than or equal to that used to serialize the data insrc
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT
-
pNextmust beNULL -
dstmust be a validMicromapEXThandle -
modemust be a validCopyMicromapModeEXTvalue
See Also
VK_EXT_opacity_micromap,
CopyMicromapModeEXT,
DeviceOrHostAddressConstKHR,
MicromapEXT,
StructureType,
cmdCopyMemoryToMicromapEXT, copyMemoryToMicromapEXT
Constructors
| CopyMemoryToMicromapInfoEXT | |
Fields
| |
Instances
| Show CopyMemoryToMicromapInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods showsPrec :: Int -> CopyMemoryToMicromapInfoEXT -> ShowS # show :: CopyMemoryToMicromapInfoEXT -> String # showList :: [CopyMemoryToMicromapInfoEXT] -> ShowS # | |
| ToCStruct CopyMemoryToMicromapInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods 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 # | |
Defined in Vulkan.Extensions.VK_EXT_opacity_micromap Methods | |
data MicromapBuildSizesInfoEXT Source #
VkMicromapBuildSizesInfoEXT - Structure specifying build sizes for a micromap
Valid Usage (Implicit)
See Also
VK_EXT_opacity_micromap,
Bool32,
DeviceSize,
StructureType,
getMicromapBuildSizesEXT
Constructors
| MicromapBuildSizesInfoEXT | |
Fields
| |
Instances
data MicromapUsageEXT Source #
VkMicromapUsageEXT - Structure specifying the usage information used to build a micromap
Valid Usage
- If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTthenformatmust beOPACITY_MICROMAP_FORMAT_2_STATE_EXTorOPACITY_MICROMAP_FORMAT_4_STATE_EXT
- If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTandformatisOPACITY_MICROMAP_FORMAT_2_STATE_EXTthensubdivisionLevelmust be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT::maxOpacity2StateSubdivisionLevel - If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTandformatisOPACITY_MICROMAP_FORMAT_4_STATE_EXTthensubdivisionLevelmust be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT::maxOpacity4StateSubdivisionLevel - If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVthenformatmust beDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV,DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NVorDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV - If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVthensubdivisionLevelmust 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
Constructors
| MicromapUsageEXT | |
Instances
data MicromapTriangleEXT Source #
VkMicromapTriangleEXT - Structure specifying the micromap format and data for a triangle
Valid Usage
- If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTthenformatmust beOPACITY_MICROMAP_FORMAT_2_STATE_EXTorOPACITY_MICROMAP_FORMAT_4_STATE_EXT
- If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTandformatisOPACITY_MICROMAP_FORMAT_2_STATE_EXTthensubdivisionLevelmust be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT::maxOpacity2StateSubdivisionLevel - If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_OPACITY_MICROMAP_EXTandformatisOPACITY_MICROMAP_FORMAT_4_STATE_EXTthensubdivisionLevelmust be less than or equal toPhysicalDeviceOpacityMicromapPropertiesEXT::maxOpacity4StateSubdivisionLevel - If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVthenformatmust beDISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV,DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NVorDISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV - If the
MicromapTypeEXTof the micromap isMICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVthensubdivisionLevelmust be less than or equal toPhysicalDeviceDisplacementMicromapPropertiesNV::maxDisplacementMicromapSubdivisionLevel
The format is interpreted based on the type of the micromap using
it.
See Also
Constructors
| MicromapTriangleEXT | |
Fields
| |
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
Constructors
| PhysicalDeviceOpacityMicromapFeaturesEXT | |
Fields | |
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
Constructors
| PhysicalDeviceOpacityMicromapPropertiesEXT | |
Fields
| |
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)
-
indexTypemust be a validIndexTypevalue -
If
usageCountsCountis not0, andpUsageCountsis notNULL,pUsageCountsmust be a valid pointer to an array ofusageCountsCountMicromapUsageEXTstructures -
If
usageCountsCountis not0, andppUsageCountsis notNULL,ppUsageCountsmust be a valid pointer to an array ofusageCountsCountvalid pointers toMicromapUsageEXTstructures -
If
micromapis notNULL_HANDLE,micromapmust be a validMicromapEXThandle
See Also
VK_EXT_opacity_micromap,
DeviceOrHostAddressConstKHR,
DeviceSize,
IndexType,
MicromapEXT, MicromapUsageEXT,
StructureType
Constructors
| AccelerationStructureTrianglesOpacityMicromapEXT | |
Fields
| |
Instances
newtype MicromapTypeEXT Source #
VkMicromapTypeEXT - Type of micromap
See Also
VK_EXT_opacity_micromap,
MicromapBuildInfoEXT, MicromapCreateInfoEXT
Constructors
| MicromapTypeEXT Int32 |
Bundled Patterns
| 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
Constructors
| BuildMicromapFlagBitsEXT Flags |
Bundled Patterns
| 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
Constructors
| MicromapCreateFlagBitsEXT Flags |
Bundled Patterns
| 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
Constructors
| CopyMicromapModeEXT Int32 |
Bundled Patterns
| 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
Constructors
| BuildMicromapModeEXT Int32 |
Bundled Patterns
| 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
Constructors
| OpacityMicromapFormatEXT Int32 |
Bundled Patterns
| 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
Constructors
| OpacityMicromapSpecialIndexEXT Int32 |
Bundled Patterns
| 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
Constructors
| DeferredOperationKHR Word64 |
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
Constructors
| MicromapEXT Word64 |
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 | |
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 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 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 |
|