Class EXTOpacityMicromap
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
VkMicromapEXTstructure to store the micromap, - functions similar to acceleration structure build functions to build the opacity micromap array, and
- a structure to extend
VkAccelerationStructureGeometryTrianglesDataKHRto attach a micromap to the geometry of the acceleration structure.
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);
}
- Name String
VK_EXT_opacity_micromap- Extension Type
- Device extension
- Registered Extension Number
- 397
- Revision
- 2
- Extension and Version Dependencies
VK_KHR_acceleration_structureandVK_KHR_synchronization2or Version 1.3- SPIR-V Dependencies
- Contact
- Christoph Kubisch pixeljetstream
- Eric Werness
- Extension Proposal
- VK_EXT_opacity_micromap
Other Extension Metadata
- Last Modified Date
- 2022-08-24
- Interactions and External Dependencies
- This extension provides API support for
GLSL_EXT_opacity_micromap
- This extension provides API support for
- Contributors
- Christoph Kubisch, NVIDIA
- Eric Werness, NVIDIA
- Josh Barczak, Intel
- Stu Smith, AMD
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longExtendsVkAccessFlagBits2.static final longExtendsVkAccessFlagBits2.static final intExtendsVkBufferUsageFlagBits.static final intExtendsVkBufferUsageFlagBits.static final intExtendsVkBuildAccelerationStructureFlagBitsKHR.static final intExtendsVkBuildAccelerationStructureFlagBitsKHR.static final intExtendsVkBuildAccelerationStructureFlagBitsKHR.static final intVkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap buildsstatic final intVkBuildMicromapModeEXT - Enum specifying the type of build operation to performstatic final intVkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap buildsstatic final intVkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap buildsstatic final intVkCopyMicromapModeEXT - Micromap copy modestatic final intVkCopyMicromapModeEXT - Micromap copy modestatic final intVkCopyMicromapModeEXT - Micromap copy modestatic final intVkCopyMicromapModeEXT - Micromap copy modestatic final StringThe extension name.static final intThe extension specification version.static final intExtendsVkGeometryInstanceFlagBitsKHR.static final intExtendsVkGeometryInstanceFlagBitsKHR.static final intVkMicromapCreateFlagBitsEXT - Bitmask specifying additional creation parameters for micromapstatic final intVkMicromapTypeEXT - Type of micromapstatic final intExtendsVkObjectType.static final intVkOpacityMicromapFormatEXT - Format enum for opacity micromapsstatic final intVkOpacityMicromapFormatEXT - Format enum for opacity micromapsstatic final intVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapstatic final intVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapstatic final intVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapstatic final intVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapstatic final intExtendsVkPipelineCreateFlagBits.static final longExtendsVkPipelineStageFlagBits2.static final intExtendsVkQueryType.static final intExtendsVkQueryType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnvkBuildMicromapsEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, int infoCount, long pInfos) Unsafe version of:BuildMicromapsEXTstatic voidnvkCmdBuildMicromapsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int infoCount, long pInfos) Unsafe version of:CmdBuildMicromapsEXTstatic voidnvkCmdCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pInfo) Unsafe version of:CmdCopyMemoryToMicromapEXTstatic voidnvkCmdCopyMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pInfo) Unsafe version of:CmdCopyMicromapEXTstatic voidnvkCmdCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pInfo) Unsafe version of:CmdCopyMicromapToMemoryEXTstatic voidnvkCmdWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int micromapCount, long pMicromaps, int queryType, long queryPool, int firstQuery) Unsafe version of:CmdWriteMicromapsPropertiesEXTstatic intnvkCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pInfo) Unsafe version of:CopyMemoryToMicromapEXTstatic intnvkCopyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pInfo) Unsafe version of:CopyMicromapEXTstatic intnvkCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pInfo) Unsafe version of:CopyMicromapToMemoryEXTstatic intnvkCreateMicromapEXT(org.lwjgl.vulkan.VkDevice device, long pCreateInfo, long pAllocator, long pMicromap) Unsafe version of:CreateMicromapEXTstatic voidnvkDestroyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long micromap, long pAllocator) Unsafe version of:DestroyMicromapEXTstatic voidnvkGetDeviceMicromapCompatibilityEXT(org.lwjgl.vulkan.VkDevice device, long pVersionInfo, long pCompatibility) Unsafe version of:GetDeviceMicromapCompatibilityEXTstatic voidnvkGetMicromapBuildSizesEXT(org.lwjgl.vulkan.VkDevice device, int buildType, long pBuildInfo, long pSizeInfo) Unsafe version of:GetMicromapBuildSizesEXTstatic intnvkWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkDevice device, int micromapCount, long pMicromaps, int queryType, long dataSize, long pData, long stride) Unsafe version of:WriteMicromapsPropertiesEXTstatic intvkBuildMicromapsEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkMicromapBuildInfoEXT.Buffer pInfos) Build a micromap on the host.static voidvkCmdBuildMicromapsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkMicromapBuildInfoEXT.Buffer pInfos) Build a micromap.static voidvkCmdCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkCopyMemoryToMicromapInfoEXT pInfo) Copy device memory to a micromap.static voidvkCmdCopyMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkCopyMicromapInfoEXT pInfo) Copy a micromap.static voidvkCmdCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkCopyMicromapToMemoryInfoEXT pInfo) Copy a micromap to device memory.static voidvkCmdWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long[] pMicromaps, int queryType, long queryPool, int firstQuery) Array version of:CmdWriteMicromapsPropertiesEXTstatic voidvkCmdWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, LongBuffer pMicromaps, int queryType, long queryPool, int firstQuery) Write micromap result parameters to query results.static intvkCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkCopyMemoryToMicromapInfoEXT pInfo) Deserialize a micromap on the host.static intvkCopyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkCopyMicromapInfoEXT pInfo) Copy a micromap on the host.static intvkCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkCopyMicromapToMemoryInfoEXT pInfo) Serialize a micromap on the host.static intvkCreateMicromapEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapCreateInfoEXT pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pMicromap) Array version of:CreateMicromapEXTstatic intvkCreateMicromapEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapCreateInfoEXT pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, LongBuffer pMicromap) Create a new micromap object.static voidvkDestroyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long micromap, @Nullable VkAllocationCallbacks pAllocator) Destroy a micromap object.static voidvkGetDeviceMicromapCompatibilityEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapVersionInfoEXT pVersionInfo, int[] pCompatibility) Array version of:GetDeviceMicromapCompatibilityEXTstatic voidvkGetDeviceMicromapCompatibilityEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapVersionInfoEXT pVersionInfo, IntBuffer pCompatibility) Check if a serialized micromap is compatible with the current device.static voidvkGetMicromapBuildSizesEXT(org.lwjgl.vulkan.VkDevice device, int buildType, VkMicromapBuildInfoEXT pBuildInfo, VkMicromapBuildSizesInfoEXT pSizeInfo) Retrieve the required size for a micromap.static intvkWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkDevice device, long[] pMicromaps, int queryType, ByteBuffer pData, long stride) Array version of:WriteMicromapsPropertiesEXTstatic intvkWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkDevice device, LongBuffer pMicromaps, int queryType, ByteBuffer pData, long stride) Query micromap meta-data on the host.
-
Field Details
-
VK_EXT_OPACITY_MICROMAP_SPEC_VERSION
public static final int VK_EXT_OPACITY_MICROMAP_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_EXT_OPACITY_MICROMAP_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT
public static final int VK_STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXT
public static final int VK_STRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXT
public static final int VK_STRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXT
public static final int VK_STRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXT
public static final int VK_STRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT
public static final int VK_STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXT
public static final int VK_STRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
public static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXTExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTSTRUCTURE_TYPE_MICROMAP_VERSION_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_INFO_EXTSTRUCTURE_TYPE_COPY_MICROMAP_TO_MEMORY_INFO_EXTSTRUCTURE_TYPE_COPY_MEMORY_TO_MICROMAP_INFO_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXTSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXTSTRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXTSTRUCTURE_TYPE_MICROMAP_BUILD_SIZES_INFO_EXTSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT
- See Also:
-
VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT
public static final long VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTExtendsVkPipelineStageFlagBits2.- See Also:
-
VK_ACCESS_2_MICROMAP_READ_BIT_EXT
public static final long VK_ACCESS_2_MICROMAP_READ_BIT_EXTExtendsVkAccessFlagBits2.Enum values:
- See Also:
-
VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT
public static final long VK_ACCESS_2_MICROMAP_WRITE_BIT_EXTExtendsVkAccessFlagBits2.Enum values:
- See Also:
-
VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT
public static final int VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXTExtendsVkQueryType.Enum values:
- See Also:
-
VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT
public static final int VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXTExtendsVkQueryType.Enum values:
- See Also:
-
VK_OBJECT_TYPE_MICROMAP_EXT
public static final int VK_OBJECT_TYPE_MICROMAP_EXTExtendsVkObjectType.- See Also:
-
VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT
public static final int VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXTExtendsVkBufferUsageFlagBits.Enum values:
- See Also:
-
VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXT
public static final int VK_BUFFER_USAGE_MICROMAP_STORAGE_BIT_EXTExtendsVkBufferUsageFlagBits.Enum values:
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT
public static final int VK_PIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXTExtendsVkPipelineCreateFlagBits.- See Also:
-
VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT
public static final int VK_GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXTExtendsVkGeometryInstanceFlagBitsKHR.Enum values:
- See Also:
-
VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT
public static final int VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXTExtendsVkGeometryInstanceFlagBitsKHR.Enum values:
- See Also:
-
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT
public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXTExtendsVkBuildAccelerationStructureFlagBitsKHR.Enum values:
- See Also:
-
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT
public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXTExtendsVkBuildAccelerationStructureFlagBitsKHR.Enum values:
- See Also:
-
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT
public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXTExtendsVkBuildAccelerationStructureFlagBitsKHR.Enum values:
- See Also:
-
VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT
public static final int VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXTVkMicromapTypeEXT - Type of micromapDescription
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
- See Also:
-
VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT
public static final int VK_BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXTVkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap buildsDescription
BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXTspecifies that the given micromap build should prioritize trace performance over build time.BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXTspecifies that the given micromap build should prioritize build time over trace performance.
Enum values:
- See Also:
-
VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT
public static final int VK_BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXTVkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap buildsDescription
BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXTspecifies that the given micromap build should prioritize trace performance over build time.BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXTspecifies that the given micromap build should prioritize build time over trace performance.
Enum values:
- See Also:
-
VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT
public static final int VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXTVkBuildMicromapFlagBitsEXT - Bitmask specifying additional parameters for micromap buildsDescription
BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXTspecifies that the given micromap build should prioritize trace performance over build time.BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXTspecifies that the given micromap build should prioritize build time over trace performance.
Enum values:
- See Also:
-
VK_BUILD_MICROMAP_MODE_BUILD_EXT
public static final int VK_BUILD_MICROMAP_MODE_BUILD_EXTVkBuildMicromapModeEXT - Enum specifying the type of build operation to performDescription
BUILD_MICROMAP_MODE_BUILD_EXTspecifies that the destination micromap will be built using the specified data.
See Also
- See Also:
-
VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
public static final int VK_MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXTVkMicromapCreateFlagBitsEXT - Bitmask specifying additional creation parameters for micromapDescription
MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXTspecifies that the micromap’s address can be saved and reused on a subsequent run.
- See Also:
-
VK_COPY_MICROMAP_MODE_CLONE_EXT
public static final int VK_COPY_MICROMAP_MODE_CLONE_EXTVkCopyMicromapModeEXT - Micromap copy modeDescription
COPY_MICROMAP_MODE_CLONE_EXTcreates a direct copy of the micromap specified insrcinto the one specified bydst. Thedstmicromap must have been created with the same parameters assrc.COPY_MICROMAP_MODE_SERIALIZE_EXTserializes the micromap to a semi-opaque format which can be reloaded on a compatible implementation.COPY_MICROMAP_MODE_DESERIALIZE_EXTdeserializes the semi-opaque serialization format in the buffer to the micromap.COPY_MICROMAP_MODE_COMPACT_EXTcreates a more compact version of a micromapsrcintodst. The micromapdstmust have been created with a size at least as large as that returned byCmdWriteMicromapsPropertiesEXTafter the build of the micromap specified bysrc.
See Also
VkCopyMemoryToMicromapInfoEXT,VkCopyMicromapInfoEXT,VkCopyMicromapToMemoryInfoEXT- See Also:
-
VK_COPY_MICROMAP_MODE_SERIALIZE_EXT
public static final int VK_COPY_MICROMAP_MODE_SERIALIZE_EXTVkCopyMicromapModeEXT - Micromap copy modeDescription
COPY_MICROMAP_MODE_CLONE_EXTcreates a direct copy of the micromap specified insrcinto the one specified bydst. Thedstmicromap must have been created with the same parameters assrc.COPY_MICROMAP_MODE_SERIALIZE_EXTserializes the micromap to a semi-opaque format which can be reloaded on a compatible implementation.COPY_MICROMAP_MODE_DESERIALIZE_EXTdeserializes the semi-opaque serialization format in the buffer to the micromap.COPY_MICROMAP_MODE_COMPACT_EXTcreates a more compact version of a micromapsrcintodst. The micromapdstmust have been created with a size at least as large as that returned byCmdWriteMicromapsPropertiesEXTafter the build of the micromap specified bysrc.
See Also
VkCopyMemoryToMicromapInfoEXT,VkCopyMicromapInfoEXT,VkCopyMicromapToMemoryInfoEXT- See Also:
-
VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT
public static final int VK_COPY_MICROMAP_MODE_DESERIALIZE_EXTVkCopyMicromapModeEXT - Micromap copy modeDescription
COPY_MICROMAP_MODE_CLONE_EXTcreates a direct copy of the micromap specified insrcinto the one specified bydst. Thedstmicromap must have been created with the same parameters assrc.COPY_MICROMAP_MODE_SERIALIZE_EXTserializes the micromap to a semi-opaque format which can be reloaded on a compatible implementation.COPY_MICROMAP_MODE_DESERIALIZE_EXTdeserializes the semi-opaque serialization format in the buffer to the micromap.COPY_MICROMAP_MODE_COMPACT_EXTcreates a more compact version of a micromapsrcintodst. The micromapdstmust have been created with a size at least as large as that returned byCmdWriteMicromapsPropertiesEXTafter the build of the micromap specified bysrc.
See Also
VkCopyMemoryToMicromapInfoEXT,VkCopyMicromapInfoEXT,VkCopyMicromapToMemoryInfoEXT- See Also:
-
VK_COPY_MICROMAP_MODE_COMPACT_EXT
public static final int VK_COPY_MICROMAP_MODE_COMPACT_EXTVkCopyMicromapModeEXT - Micromap copy modeDescription
COPY_MICROMAP_MODE_CLONE_EXTcreates a direct copy of the micromap specified insrcinto the one specified bydst. Thedstmicromap must have been created with the same parameters assrc.COPY_MICROMAP_MODE_SERIALIZE_EXTserializes the micromap to a semi-opaque format which can be reloaded on a compatible implementation.COPY_MICROMAP_MODE_DESERIALIZE_EXTdeserializes the semi-opaque serialization format in the buffer to the micromap.COPY_MICROMAP_MODE_COMPACT_EXTcreates a more compact version of a micromapsrcintodst. The micromapdstmust have been created with a size at least as large as that returned byCmdWriteMicromapsPropertiesEXTafter the build of the micromap specified bysrc.
See Also
VkCopyMemoryToMicromapInfoEXT,VkCopyMicromapInfoEXT,VkCopyMicromapToMemoryInfoEXT- See Also:
-
VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT
public static final int VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXTVkOpacityMicromapFormatEXT - Format enum for opacity micromapsDescription
OPACITY_MICROMAP_FORMAT_2_STATE_EXTspecifies that the given micromap format has one bit per subtriangle encoding either fully opaque or fully transparent.OPACITY_MICROMAP_FORMAT_4_STATE_EXTspecifies that the given micromap format has two bits per subtriangle encoding four modes which can be interpreted as described in ray traversal.
Note
For compactness, these values are stored as 16-bit in some structures.
- See Also:
-
VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT
public static final int VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXTVkOpacityMicromapFormatEXT - Format enum for opacity micromapsDescription
OPACITY_MICROMAP_FORMAT_2_STATE_EXTspecifies that the given micromap format has one bit per subtriangle encoding either fully opaque or fully transparent.OPACITY_MICROMAP_FORMAT_4_STATE_EXTspecifies that the given micromap format has two bits per subtriangle encoding four modes which can be interpreted as described in ray traversal.
Note
For compactness, these values are stored as 16-bit in some structures.
- See Also:
-
VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT
public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXTVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapDescription
OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXTspecifies that the entire triangle is fully transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXTspecifies that the entire triangle is fully opaque.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXTspecifies that the entire triangle is unknown-transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXTspecifies that the entire triangle is unknown-opaque.
- See Also:
-
VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT
public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXTVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapDescription
OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXTspecifies that the entire triangle is fully transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXTspecifies that the entire triangle is fully opaque.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXTspecifies that the entire triangle is unknown-transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXTspecifies that the entire triangle is unknown-opaque.
- See Also:
-
VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT
public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXTVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapDescription
OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXTspecifies that the entire triangle is fully transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXTspecifies that the entire triangle is fully opaque.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXTspecifies that the entire triangle is unknown-transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXTspecifies that the entire triangle is unknown-opaque.
- See Also:
-
VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT
public static final int VK_OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXTVkOpacityMicromapSpecialIndexEXT - Enum for special indices in the opacity micromapDescription
OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXTspecifies that the entire triangle is fully transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXTspecifies that the entire triangle is fully opaque.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXTspecifies that the entire triangle is unknown-transparent.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXTspecifies that the entire triangle is unknown-opaque.
- See Also:
-
-
Method Details
-
nvkCreateMicromapEXT
public static int nvkCreateMicromapEXT(org.lwjgl.vulkan.VkDevice device, long pCreateInfo, long pAllocator, long pMicromap) Unsafe version of:CreateMicromapEXT -
vkCreateMicromapEXT
public static int vkCreateMicromapEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapCreateInfoEXT pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, LongBuffer pMicromap) Create a new micromap object.C Specification
To create a micromap, call:
VkResult vkCreateMicromapEXT( VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap);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 ofVkMicromapCreateInfoEXT.The micromap data is stored in the object referred to by
VkMicromapCreateInfoEXT::buffer. Once memory has been bound to that buffer, it must be populated by micromap build or micromap copy commands such asCmdBuildMicromapsEXT,BuildMicromapsEXT,CmdCopyMicromapEXT, andCopyMicromapEXT.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
CopyMicromapToMemoryEXTorCmdCopyMicromapToMemoryEXTwith amodeofCOPY_MICROMAP_MODE_SERIALIZE_EXT, andCopyMemoryToMicromapEXTorCmdCopyMemoryToMicromapEXTwith amodeofCOPY_MICROMAP_MODE_DESERIALIZE_EXTduring 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
micromapfeature must be enabled - If
VkMicromapCreateInfoEXT::deviceAddressis not zero, themicromapCaptureReplayfeature must be enabled - If
devicewas created with multiple physical devices, then thebufferDeviceAddressMultiDevicefeature must be enabled
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepCreateInfomust be a valid pointer to a validVkMicromapCreateInfoEXTstructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pMicromapmust be a valid pointer to aVkMicromapEXThandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that creates the acceleration structure object.pCreateInfo- a pointer to aVkMicromapCreateInfoEXTstructure containing parameters affecting creation of the micromap.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.pMicromap- a pointer to aVkMicromapEXThandle in which the resulting micromap object is returned.
- The
-
nvkDestroyMicromapEXT
public static void nvkDestroyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long micromap, long pAllocator) Unsafe version of:DestroyMicromapEXT -
vkDestroyMicromapEXT
public static void vkDestroyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long micromap, @Nullable VkAllocationCallbacks pAllocator) Destroy a micromap object.C Specification
To destroy a micromap, call:
void vkDestroyMicromapEXT( VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator);Valid Usage
- The
micromapfeature must be enabled - All submitted commands that refer to
micromapmust have completed execution - If
VkAllocationCallbackswere provided whenmicromapwas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenmicromapwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle- If
micromapis notNULL_HANDLE,micromapmust be a validVkMicromapEXThandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - 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
- Parameters:
device- the logical device that destroys the micromap.micromap- the micromap to destroy.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.
- The
-
nvkCmdBuildMicromapsEXT
public static void nvkCmdBuildMicromapsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int infoCount, long pInfos) Unsafe version of:CmdBuildMicromapsEXT- Parameters:
infoCount- the number of micromaps to build. It specifies the number of thepInfosstructures that must be provided.
-
vkCmdBuildMicromapsEXT
public static void vkCmdBuildMicromapsEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkMicromapBuildInfoEXT.Buffer pInfos) Build a micromap.C Specification
To build micromaps call:
void vkCmdBuildMicromapsEXT( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos);Description
The
vkCmdBuildMicromapsEXTcommand 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
VkMicromapBuildInfoEXT::scratchDatabuffer device addresses must be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type of (ACCESS_2_MICROMAP_READ_BIT_EXT|ACCESS_2_MICROMAP_WRITE_BIT_EXT). Accesses toVkMicromapBuildInfoEXT::dstMicromapmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_2_MICROMAP_WRITE_BIT_EXT.Accesses to other input buffers as identified by any used values of
VkMicromapBuildInfoEXT::dataorVkMicromapBuildInfoEXT::triangleArraymust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_SHADER_READ_BIT.Valid Usage
- For each
pInfos[i],dstMicromapmust have been created with a value ofVkMicromapCreateInfoEXT::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 validVkBuildMicromapModeEXTvalue - The
dstMicromapmember of any element ofpInfosmust be a validVkMicromapEXThandle - For each element of
pInfositstypemember must match the value ofVkMicromapCreateInfoEXT::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 theVkMicromapBuildSizesInfoEXTstructure returned from a call toGetMicromapBuildSizesEXTwith an identicalVkMicromapBuildInfoEXTstructure 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 singleVkDeviceMemoryobject - For each element of
pInfos, itsscratchData.deviceAddressmember must be a multiple ofVkPhysicalDeviceAccelerationStructurePropertiesKHR::minAccelerationStructureScratchOffsetAlignment - For each element of
pInfos, itstriangleArray.deviceAddressanddata.deviceAddressmembers must be a multiple of 256
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepInfosmust be a valid pointer to an array ofinfoCountvalidVkMicromapBuildInfoEXTstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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 than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pInfos- a pointer to an array ofinfoCountVkMicromapBuildInfoEXTstructures defining the data used to build each micromap.
- For each
-
nvkBuildMicromapsEXT
public static int nvkBuildMicromapsEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, int infoCount, long pInfos) Unsafe version of:BuildMicromapsEXT- Parameters:
infoCount- the number of micromaps to build. It specifies the number of thepInfosthat must be provided.
-
vkBuildMicromapsEXT
public static int vkBuildMicromapsEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkMicromapBuildInfoEXT.Buffer pInfos) Build a micromap on the host.C Specification
To build micromaps on the host, call:
VkResult vkBuildMicromapsEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos);Description
This command fulfills the same task as
CmdBuildMicromapsEXTbut is executed by the host.The
vkBuildMicromapsEXTcommand 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 ofVkMicromapCreateInfoEXT::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 validVkBuildMicromapModeEXTvalue - The
dstMicromapmember of any element ofpInfosmust be a validVkMicromapEXThandle - For each element of
pInfositstypemember must match the value ofVkMicromapCreateInfoEXT::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
VkPhysicalDeviceOpacityMicromapFeaturesEXT::micromapHostCommandsfeature 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 theVkMicromapBuildSizesInfoEXTstructure returned from a call toGetMicromapBuildSizesEXTwith an identicalVkMicromapBuildInfoEXTstructure 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 validVkDevicehandle- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validVkDeferredOperationKHRhandle pInfosmust be a valid pointer to an array ofinfoCountvalidVkMicromapBuildInfoEXTstructuresinfoCountmust be greater than 0- If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- theVkDevicefor which the micromaps are being built.deferredOperation- an optionalVkDeferredOperationKHRto request deferral for this command.pInfos- a pointer to an array ofinfoCountVkMicromapBuildInfoEXTstructures defining the geometry used to build each micromap.
- For each
-
nvkCopyMicromapEXT
public static int nvkCopyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pInfo) Unsafe version of:CopyMicromapEXT -
vkCopyMicromapEXT
public static int vkCopyMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkCopyMicromapInfoEXT pInfo) Copy a micromap on the host.C Specification
To copy or compact a micromap on the host, call:
VkResult vkCopyMicromapEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo);Description
This command fulfills the same task as
CmdCopyMicromapEXTbut is executed by the host.Valid Usage
- 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
VkPhysicalDeviceOpacityMicromapFeaturesEXT::micromapHostCommandsfeature 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 validVkDevicehandle- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validVkDeferredOperationKHRhandle pInfomust be a valid pointer to a validVkCopyMicromapInfoEXTstructure- If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the device which owns the micromaps.deferredOperation- an optionalVkDeferredOperationKHRto request deferral for this command.pInfo- a pointer to aVkCopyMicromapInfoEXTstructure defining the copy operation.
- Any previous deferred operation that was associated with
-
nvkCopyMicromapToMemoryEXT
public static int nvkCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pInfo) Unsafe version of:CopyMicromapToMemoryEXT -
vkCopyMicromapToMemoryEXT
public static int vkCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkCopyMicromapToMemoryInfoEXT pInfo) Serialize a micromap on the host.C Specification
To copy a micromap to host accessible memory, call:
VkResult vkCopyMicromapToMemoryEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo);Description
This command fulfills the same task as
CmdCopyMicromapToMemoryEXTbut 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 eitherCmdCopyMemoryToMicromapEXTorCopyMemoryToMicromapEXT.Valid Usage
- 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 pointerpInfo→dst.hostAddressmust be aligned to 16 bytes- The
VkPhysicalDeviceOpacityMicromapFeaturesEXT::micromapHostCommandsfeature 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 validVkDevicehandle- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validVkDeferredOperationKHRhandle pInfomust be a valid pointer to a validVkCopyMicromapToMemoryInfoEXTstructure- If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the device which ownspInfo→src.deferredOperation- an optionalVkDeferredOperationKHRto request deferral for this command.pInfo- a pointer to aVkCopyMicromapToMemoryInfoEXTstructure defining the copy operation.
- Any previous deferred operation that was associated with
-
nvkCopyMemoryToMicromapEXT
public static int nvkCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pInfo) Unsafe version of:CopyMemoryToMicromapEXT -
vkCopyMemoryToMicromapEXT
public static int vkCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkDevice device, long deferredOperation, VkCopyMemoryToMicromapInfoEXT pInfo) Deserialize a micromap on the host.C Specification
To copy host accessible memory to a micromap, call:
VkResult vkCopyMemoryToMicromapEXT( VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo);Description
This command fulfills the same task as
CmdCopyMemoryToMicromapEXTbut is executed by the host.This command can accept micromaps produced by either
CmdCopyMicromapToMemoryEXTorCopyMicromapToMemoryEXT.Valid Usage
- Any previous deferred operation that was associated with
deferredOperationmust be complete pInfo→src.hostAddressmust be a valid host pointerpInfo→src.hostAddressmust be aligned to 16 bytes- The
bufferused to createpInfo→dstmust be bound to host-visible device memory - The
VkPhysicalDeviceOpacityMicromapFeaturesEXT::micromapHostCommandsfeature 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 validVkDevicehandle- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validVkDeferredOperationKHRhandle pInfomust be a valid pointer to a validVkCopyMemoryToMicromapInfoEXTstructure- If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the device which ownspInfo→dst.deferredOperation- an optionalVkDeferredOperationKHRto request deferral for this command.pInfo- a pointer to aVkCopyMemoryToMicromapInfoEXTstructure defining the copy operation.
- Any previous deferred operation that was associated with
-
nvkWriteMicromapsPropertiesEXT
public static int nvkWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkDevice device, int micromapCount, long pMicromaps, int queryType, long dataSize, long pData, long stride) Unsafe version of:WriteMicromapsPropertiesEXT- Parameters:
micromapCount- the count of micromaps for which to query the property.dataSize- the size in bytes of the buffer pointed to bypData.
-
vkWriteMicromapsPropertiesEXT
public static int vkWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkDevice device, LongBuffer pMicromaps, int queryType, ByteBuffer pData, long stride) Query micromap meta-data on the host.C Specification
To query micromap size parameters on the host, call:
VkResult vkWriteMicromapsPropertiesEXT( VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride);Description
This command fulfills the same task as
CmdWriteMicromapsPropertiesEXTbut is executed by the host.Valid Usage
- 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- If
queryTypeisQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXTorQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXTthenstridemust be a multiple of the size ofVkDeviceSize - If
queryTypeisQUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXTorQUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXTthenpDatamust point to aVkDeviceSize dataSizemust be greater than or equal tomicromapCount*stride- The
bufferused to create each micromap inpMicromapsmust be bound to host-visible device memory - The
VkPhysicalDeviceOpacityMicromapFeaturesEXT::micromapHostCommandsfeature 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 validVkDevicehandlepMicromapsmust be a valid pointer to an array ofmicromapCountvalidVkMicromapEXThandlesqueryTypemust be a validVkQueryTypevaluepDatamust be a valid pointer to an array ofdataSizebytesmicromapCountmust be greater than 0dataSizemust be greater than 0- Each element of
pMicromapsmust have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the device which owns the micromaps inpMicromaps.pMicromaps- a pointer to an array of existing previously built micromaps.queryType- aVkQueryTypevalue specifying the property to be queried.pData- a pointer to an application-allocated buffer where the results will be written.stride- the stride in bytes between results for individual queries withinpData.
- All micromaps in
-
nvkCmdCopyMicromapEXT
public static void nvkCmdCopyMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pInfo) Unsafe version of:CmdCopyMicromapEXT -
vkCmdCopyMicromapEXT
public static void vkCmdCopyMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkCopyMicromapInfoEXT pInfo) Copy a micromap.C Specification
To copy a micromap call:
void vkCmdCopyMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo);Description
This command copies the
pInfo→srcmicromap to thepInfo→dstmicromap in the manner specified bypInfo→mode.Accesses to
pInfo→srcandpInfo→dstmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_2_MICROMAP_READ_BIT_EXTorACCESS_2_MICROMAP_WRITE_BIT_EXTas appropriate.Valid Usage
- The
bufferused to createpInfo→srcmust be bound to device memory - The
bufferused to createpInfo→dstmust be bound to device memory
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepInfomust be a valid pointer to a validVkCopyMicromapInfoEXTstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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
VkCommandPoolthatcommandBufferwas 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
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pInfo- a pointer to aVkCopyMicromapInfoEXTstructure defining the copy operation.
- The
-
nvkCmdCopyMicromapToMemoryEXT
public static void nvkCmdCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pInfo) Unsafe version of:CmdCopyMicromapToMemoryEXT -
vkCmdCopyMicromapToMemoryEXT
public static void vkCmdCopyMicromapToMemoryEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkCopyMicromapToMemoryInfoEXT pInfo) Copy a micromap to device memory.C Specification
To copy a micromap to device memory call:
void vkCmdCopyMicromapToMemoryEXT( VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo);Description
Accesses to
pInfo→srcmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_2_MICROMAP_READ_BIT_EXT. Accesses to the buffer indicated bypInfo→dst.deviceAddressmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_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 eitherCmdCopyMemoryToMicromapEXTorCopyMemoryToMicromapEXT.The defined header structure for the serialized data consists of:
UUID_SIZEbytes of data matchingVkPhysicalDeviceIDProperties::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 a valid device address for a buffer bound to device memorypInfo→dst.deviceAddressmust be aligned to 256 bytes- If the buffer pointed to by
pInfo→dst.deviceAddressis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The
bufferused to createpInfo→srcmust be bound to device memory
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepInfomust be a valid pointer to a validVkCopyMicromapToMemoryInfoEXTstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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
VkCommandPoolthatcommandBufferwas 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
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pInfo- an a pointer to aVkCopyMicromapToMemoryInfoEXTstructure defining the copy operation.
-
nvkCmdCopyMemoryToMicromapEXT
public static void nvkCmdCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pInfo) Unsafe version of:CmdCopyMemoryToMicromapEXT -
vkCmdCopyMemoryToMicromapEXT
public static void vkCmdCopyMemoryToMicromapEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkCopyMemoryToMicromapInfoEXT pInfo) Copy device memory to a micromap.C Specification
To copy device memory to a micromap call:
void vkCmdCopyMemoryToMicromapEXT( VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo);Description
Accesses to
pInfo→dstmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_2_MICROMAP_READ_BIT_EXT. Accesses to the buffer indicated bypInfo→src.deviceAddressmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_TRANSFER_READ_BIT.This command can accept micromaps produced by either
CmdCopyMicromapToMemoryEXTorCopyMicromapToMemoryEXT.Valid Usage
pInfo→src.deviceAddressmust be a valid device address for a buffer bound to device memorypInfo→src.deviceAddressmust be aligned to 256 bytes- If the buffer pointed to by
pInfo→src.deviceAddressis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The
bufferused to createpInfo→dstmust be bound to device memory
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepInfomust be a valid pointer to a validVkCopyMemoryToMicromapInfoEXTstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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
VkCommandPoolthatcommandBufferwas 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
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pInfo- a pointer to aVkCopyMemoryToMicromapInfoEXTstructure defining the copy operation.
-
nvkCmdWriteMicromapsPropertiesEXT
public static void nvkCmdWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int micromapCount, long pMicromaps, int queryType, long queryPool, int firstQuery) Unsafe version of:CmdWriteMicromapsPropertiesEXT- Parameters:
micromapCount- the count of micromaps for which to query the property.
-
vkCmdWriteMicromapsPropertiesEXT
public static void vkCmdWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, LongBuffer pMicromaps, int queryType, long queryPool, int firstQuery) Write micromap result parameters to query results.C Specification
To query micromap size parameters call:
void vkCmdWriteMicromapsPropertiesEXT( VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery);Description
Accesses to any of the micromaps listed in
pMicromapsmust be synchronized with thePIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXTpipeline stage and an access type ofACCESS_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
queryPoolmust have been created with aqueryTypematchingqueryType- 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 validVkCommandBufferhandlepMicromapsmust be a valid pointer to an array ofmicromapCountvalidVkMicromapEXThandlesqueryTypemust be a validVkQueryTypevaluequeryPoolmust be a validVkQueryPoolhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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 than 0- Each of
commandBuffer,queryPool, and the elements ofpMicromapsmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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 - Parameters:
commandBuffer- the command buffer into which the command will be recorded.pMicromaps- a pointer to an array of existing previously built micromaps.queryType- aVkQueryTypevalue specifying the type of queries managed by the pool.queryPool- the query pool that will manage the results of the query.firstQuery- the first query index within the query pool that will contain themicromapCountnumber of results.
- If
-
nvkGetDeviceMicromapCompatibilityEXT
public static void nvkGetDeviceMicromapCompatibilityEXT(org.lwjgl.vulkan.VkDevice device, long pVersionInfo, long pCompatibility) Unsafe version of:GetDeviceMicromapCompatibilityEXT -
vkGetDeviceMicromapCompatibilityEXT
public static void vkGetDeviceMicromapCompatibilityEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapVersionInfoEXT pVersionInfo, IntBuffer pCompatibility) Check if a serialized micromap is compatible with the current device.C Specification
To check if a serialized micromap is compatible with the current device call:
void vkGetDeviceMicromapCompatibilityEXT( VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility);Valid Usage
- The
micromapfeature must be enabled
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepVersionInfomust be a valid pointer to a validVkMicromapVersionInfoEXTstructurepCompatibilitymust be a valid pointer to aVkAccelerationStructureCompatibilityKHRvalue
See Also
- Parameters:
device- the device to check the version against.pVersionInfo- a pointer to aVkMicromapVersionInfoEXTstructure specifying version information to check against the device.pCompatibility- a pointer to aVkAccelerationStructureCompatibilityKHRvalue in which compatibility information is returned.
- The
-
nvkGetMicromapBuildSizesEXT
public static void nvkGetMicromapBuildSizesEXT(org.lwjgl.vulkan.VkDevice device, int buildType, long pBuildInfo, long pSizeInfo) Unsafe version of:GetMicromapBuildSizesEXT -
vkGetMicromapBuildSizesEXT
public static void vkGetMicromapBuildSizesEXT(org.lwjgl.vulkan.VkDevice device, int buildType, VkMicromapBuildInfoEXT pBuildInfo, VkMicromapBuildSizesInfoEXT pSizeInfo) Retrieve the required size for a micromap.C Specification
To get the build sizes for a micromap, call:
void vkGetMicromapBuildSizesEXT( VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo);Description
The
dstMicromapandmodemembers ofpBuildInfoare ignored. AnyVkDeviceOrHostAddressKHRmembers ofpBuildInfoare ignored by this command.A micromap created with the
micromapSizereturned by this command supports any build with aVkMicromapBuildInfoEXTstructure 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
VkMicromapBuildInfoEXT:- 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
buildScratchSizevalue will support any build command specifying theBUILD_MICROMAP_MODE_BUILD_EXTmodeunder the above conditions.Valid Usage
VkMicromapBuildInfoEXT::dstMicromapmust have been created fromdevice- The
micromapfeature must be enabled - If
devicewas created with multiple physical devices, then thebufferDeviceAddressMultiDevicefeature must be enabled
Valid Usage (Implicit)
devicemust be a validVkDevicehandlebuildTypemust be a validVkAccelerationStructureBuildTypeKHRvaluepBuildInfomust be a valid pointer to a validVkMicromapBuildInfoEXTstructurepSizeInfomust be a valid pointer to aVkMicromapBuildSizesInfoEXTstructure
See Also
- Parameters:
device- the logical device that will be used for creating the micromap.buildType- defines whether host or device operations (or both) are being queried for.pBuildInfo- a pointer to aVkMicromapBuildInfoEXTstructure describing parameters of a build operation.pSizeInfo- a pointer to aVkMicromapBuildSizesInfoEXTstructure which returns the size required for a micromap and the sizes required for the scratch buffers, given the build parameters.
- The build command is a host build command, and
-
vkCreateMicromapEXT
public static int vkCreateMicromapEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapCreateInfoEXT pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pMicromap) Array version of:CreateMicromapEXT -
vkWriteMicromapsPropertiesEXT
public static int vkWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkDevice device, long[] pMicromaps, int queryType, ByteBuffer pData, long stride) Array version of:WriteMicromapsPropertiesEXT -
vkCmdWriteMicromapsPropertiesEXT
public static void vkCmdWriteMicromapsPropertiesEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long[] pMicromaps, int queryType, long queryPool, int firstQuery) Array version of:CmdWriteMicromapsPropertiesEXT -
vkGetDeviceMicromapCompatibilityEXT
public static void vkGetDeviceMicromapCompatibilityEXT(org.lwjgl.vulkan.VkDevice device, VkMicromapVersionInfoEXT pVersionInfo, int[] pCompatibility) Array version of:GetDeviceMicromapCompatibilityEXT
-