Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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.__
- 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
MicromapTypeEXT
format for the displacement micromap, - a structure to extend
AccelerationStructureGeometryTrianglesDataKHR
to attach a displacement micromap to the geometry of the acceleration structure, - enums extending
BuildAccelerationStructureFlagBitsKHR
to allow for updates.
New Structures
Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:
New Enums
New Enum Constants
NV_DISPLACEMENT_MICROMAP_SPEC_VERSION
Extending
BuildAccelerationStructureFlagBitsKHR
:Extending
MicromapTypeEXT
:Extending
PipelineCreateFlagBits
:Extending
StructureType
:
Issues
- What is the status of this extension?
- Provisional and expected to change. The broad structure and encoding format are stable, but there will likely be changes to the structures, enumerant values, and shader interface.
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
AccelerationStructureTrianglesDisplacementMicromapNV
,
DisplacementMicromapFormatNV
,
PhysicalDeviceDisplacementMicromapFeaturesNV
,
PhysicalDeviceDisplacementMicromapPropertiesNV
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
- 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 :: forall a. Integral a => a
- type NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap"
- pattern NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype MicromapEXT = MicromapEXT Word64
- data MicromapUsageEXT = MicromapUsageEXT {}
- data DeviceOrHostAddressConstKHR
- 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 MicromapTypeEXT where
Documentation
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. PhysicalDeviceDisplacementMicromapFeaturesNV
can also be
used in the pNext
chain of DeviceCreateInfo
to
selectively enable these features.
Valid Usage (Implicit)
See Also
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
PhysicalDeviceDisplacementMicromapPropertiesNV | |
|
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
Valid Usage (Implicit)
-
displacementBiasAndScaleFormat
must be a validFormat
value -
displacementVectorFormat
must be a validFormat
value -
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_NV_displacement_micromap,
DeviceOrHostAddressConstKHR
,
DeviceSize
,
Format
,
IndexType
,
MicromapEXT
,
MicromapUsageEXT
,
StructureType
AccelerationStructureTrianglesDisplacementMicromapNV | |
|
Instances
newtype DisplacementMicromapFormatNV Source #
VkDisplacementMicromapFormatNV - Format enum for displacement micromaps
Description
Note
For compactness, these values are stored as 16-bit in some structures.
See Also
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 |
|
Instances
type NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 2 Source #
pattern NV_DISPLACEMENT_MICROMAP_SPEC_VERSION :: forall a. Integral a => a Source #
type NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap" Source #
pattern NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
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 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 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 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 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 |
|