| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_NV_displacement_micromap
Description
Name
VK_NV_displacement_micromap - device extension
VK_NV_displacement_micromap
- Name String
VK_NV_displacement_micromap
- Extension Type
- Device extension
- Registered Extension Number
- 398
- Revision
- 2
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_EXT_opacity_micromap
- __This is a provisional extension and must be used with caution. See the description of provisional header files for enablement and stability details.__
- Deprecation State
- Deprecated by VK_NV_cluster_acceleration_structure extension
- Contact
Other Extension Metadata
- Last Modified Date
- 2023-03-17
- Interactions and External Dependencies
- TBD
- Contributors
- Christoph Kubisch, NVIDIA
- Eric Werness, NVIDIA
Description
Ray tracing can very efficiently render from geometry which has very fine detail, but when using only a basic triangle representation, memory consumption can be an issue. This extension adds the ability to add a displacement map to add more detail to triangles in an acceleration structure with an efficient in-memory format. The format is externally visible to allow the application to compress its internal geometry representations into the compressed format ahead of time. This format adds displacements along a defined vector to subtriangle vertices which are subdivided from the main triangles.
This extension provides:
- a new
MicromapTypeEXTformat for the displacement micromap, - a structure to extend
AccelerationStructureGeometryTrianglesDataKHRto attach a displacement micromap to the geometry of the acceleration structure, - enums extending
BuildAccelerationStructureFlagBitsKHRto allow for updates.
New Structures
Extending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
New Enum Constants
NV_DISPLACEMENT_MICROMAP_SPEC_VERSIONExtending
BuildAccelerationStructureFlagBitsKHR:Extending
MicromapTypeEXT:Extending
PipelineCreateFlagBits:Extending
StructureType:
Issues
- What is the status of this extension?
- Deprecated. The VK_NV_cluster_acceleration_structure extension is not a one-to-one replacement for this extension but enables similar performance improvements for high-tessellation geometry and is considered the preferred direction to improve high-tessellation geometry performance.
Version History
Revision 1, 2023-03-17 (Eric Werness)
- Initial public revision
Revision 2, 2023-07-07 (Eric Werness)
- Add shader support for decode intrinsics
See Also
No cross-references are available
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
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV :: BuildAccelerationStructureFlagBitsKHR
- data PhysicalDeviceDisplacementMicromapFeaturesNV = PhysicalDeviceDisplacementMicromapFeaturesNV {}
- data PhysicalDeviceDisplacementMicromapPropertiesNV = PhysicalDeviceDisplacementMicromapPropertiesNV {}
- data AccelerationStructureTrianglesDisplacementMicromapNV = AccelerationStructureTrianglesDisplacementMicromapNV {
- displacementBiasAndScaleFormat :: Format
- displacementVectorFormat :: Format
- displacementBiasAndScaleBuffer :: DeviceOrHostAddressConstKHR
- displacementBiasAndScaleStride :: DeviceSize
- displacementVectorBuffer :: DeviceOrHostAddressConstKHR
- displacementVectorStride :: DeviceSize
- displacedMicromapPrimitiveFlags :: DeviceOrHostAddressConstKHR
- displacedMicromapPrimitiveFlagsStride :: DeviceSize
- indexType :: IndexType
- indexBuffer :: DeviceOrHostAddressConstKHR
- indexStride :: DeviceSize
- baseTriangle :: Word32
- usageCounts :: Vector MicromapUsageEXT
- micromap :: MicromapEXT
- newtype DisplacementMicromapFormatNV where
- DisplacementMicromapFormatNV Int32
- pattern DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV :: DisplacementMicromapFormatNV
- pattern DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV :: DisplacementMicromapFormatNV
- pattern DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV :: DisplacementMicromapFormatNV
- type NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 2
- pattern NV_DISPLACEMENT_MICROMAP_SPEC_VERSION :: Integral a => a
- type NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap"
- pattern NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: (Eq a, IsString a) => a
- newtype MicromapEXT = MicromapEXT Word64
- data MicromapUsageEXT = MicromapUsageEXT {}
- data DeviceOrHostAddressConstKHR
- newtype BuildAccelerationStructureFlagBitsKHR where
- BuildAccelerationStructureFlagBitsKHR Flags
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- type BuildAccelerationStructureFlagsKHR = BuildAccelerationStructureFlagBitsKHR
- newtype MicromapTypeEXT where
Documentation
pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV :: BuildAccelerationStructureFlagBitsKHR Source #
data PhysicalDeviceDisplacementMicromapFeaturesNV Source #
VkPhysicalDeviceDisplacementMicromapFeaturesNV - Structure describing the ray tracing displacement micromap features that can be supported by an implementation
Members
This structure describes the following feature:
Description
If the PhysicalDeviceDisplacementMicromapFeaturesNV 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. If the application wishes to use a
Device with any features described by
PhysicalDeviceDisplacementMicromapFeaturesNV, it must add an
instance of the structure, with the desired feature members set to
TRUE, to the pNext chain of
DeviceCreateInfo when creating the
Device.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceDisplacementMicromapFeaturesNV | |
Fields | |
Instances
data PhysicalDeviceDisplacementMicromapPropertiesNV Source #
VkPhysicalDeviceDisplacementMicromapPropertiesNV - Structure describing the displacement micromap properties of a physical device
Description
If the PhysicalDeviceDisplacementMicromapPropertiesNV 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
| PhysicalDeviceDisplacementMicromapPropertiesNV | |
Fields
| |
Instances
data AccelerationStructureTrianglesDisplacementMicromapNV Source #
VkAccelerationStructureTrianglesDisplacementMicromapNV - Structure specifying a displacement micromap in a bottom-level acceleration structure
Description
If AccelerationStructureTrianglesDisplacementMicromapNV 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.
That triangle uses the displacement 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 must be equal to the sum of
matching count provided.
Valid Usage
-
displacementBiasAndScaleFormatmust not beFORMAT_UNDEFINED
-
displacementVectorFormatmust not beFORMAT_UNDEFINED -
Only one of
pUsageCountsorppUsageCountscan be a valid pointer, the other must beNULL
Valid Usage (Implicit)
-
displacementBiasAndScaleFormatmust be a validFormatvalue -
displacementVectorFormatmust be a validFormatvalue -
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_NV_displacement_micromap,
DeviceOrHostAddressConstKHR,
DeviceSize,
Format,
IndexType,
MicromapEXT,
MicromapUsageEXT,
StructureType
Constructors
| AccelerationStructureTrianglesDisplacementMicromapNV | |
Fields
| |
Instances
newtype DisplacementMicromapFormatNV Source #
VkDisplacementMicromapFormatNV - Format enum for displacement micromaps
Description
DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NVspecifies that the given micromap format encodes 64 micro-triangles worth of displacements in 64 bytes as described in Displacement Micromap Encoding.
DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NVspecifies that the given micromap format encodes 256 micro-triangles worth of displacements in 128 bytes as described in Displacement Micromap Encoding.DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NVspecifies that the given micromap format encodes 1024 micro-triangles worth of displacements in 128 bytes as described in Displacement Micromap Encoding.
For compactness, these values are stored as 16-bit in some structures.
See Also
Constructors
| DisplacementMicromapFormatNV Int32 |
Bundled Patterns
Instances
type NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 2 Source #
pattern NV_DISPLACEMENT_MICROMAP_SPEC_VERSION :: Integral a => a Source #
type NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap" Source #
pattern NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
newtype MicromapEXT Source #
VkMicromapEXT - Opaque handle to a micromap object
See Also
VK_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_EXT_opacity_micromap,
AccelerationStructureTrianglesDisplacementMicromapNV,
AccelerationStructureTrianglesOpacityMicromapEXT,
CopyMemoryToMicromapInfoEXT,
CopyMicromapInfoEXT,
CopyMicromapToMemoryInfoEXT,
MicromapBuildInfoEXT,
cmdWriteMicromapsPropertiesEXT,
createMicromapEXT,
destroyMicromapEXT,
writeMicromapsPropertiesEXT
Constructors
| MicromapEXT Word64 |
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 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 BuildAccelerationStructureFlagBitsKHR Source #
VkBuildAccelerationStructureFlagBitsKHR - Bitmask specifying additional parameters for acceleration structure builds
Description
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHRspecifies that the specified acceleration structure can be updated with amodeofBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRinAccelerationStructureBuildGeometryInfoKHRor anupdateofTRUEincmdBuildAccelerationStructureNV. For sphere and LSS primitives, only positions and radii may be updated, the provided index buffers and flags must remain unchanged from the initial build.
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRspecifies that the specified acceleration structure can act as the source for a copy acceleration structure command withmodeofCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHRto produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHRspecifies that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHRspecifies that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHRspecifies that this acceleration structure should minimize the size of the scratch memory and the final result acceleration structure, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXTspecifies that the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXTspecifies that the data of the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXTspecifies that the specified acceleration structure may be referenced in an instance withGEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXTset.- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV specifies that opacity micromaps may be associated with the given cluster acceleration structure.
BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHRspecifies that the specified acceleration structure can be used when fetching the vertex and radius positions of a hit LSS or sphere primitive, or vertex positions of a hit triangle.BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NVspecifies that the displacement micromaps associated with the specified acceleration structure may change with an acceleration structure update.
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.
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR are allowed to
be used together. In that case, the result of the compaction copy is
used as the source of a build with mode of
BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR to perform the compacted
update.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
BuildAccelerationStructureFlagsKHR
Constructors
| BuildAccelerationStructureFlagBitsKHR Flags |
Bundled Patterns
Instances
newtype MicromapTypeEXT Source #
VkMicromapTypeEXT - Type of micromap
Description
MICROMAP_TYPE_OPACITY_MICROMAP_EXTis a micromap containing data to control the opacity of a triangle.
MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NVis a micromap containing data to control the displacement of subtriangles within a triangle.
See Also
VK_EXT_opacity_micromap,
MicromapBuildInfoEXT, MicromapCreateInfoEXT
Constructors
| MicromapTypeEXT Int32 |
Bundled Patterns
| pattern MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV :: MicromapTypeEXT | |
| pattern MICROMAP_TYPE_OPACITY_MICROMAP_EXT :: MicromapTypeEXT |