Name Strings
SPV_NV_displacement_micromap
Contact
See Issues list in the Khronos SPIRV-Registry repository: https://github.com/KhronosGroup/SPIRV-Registry
Contributors
-
Eric Werness, NVIDIA
-
Ashwin Lele, NVIDIA
-
Pyarelal Knowles, NVIDIA
-
Christoph Kubisch, NVIDIA
Status
-
Provisional
Version
Last Modified Date |
2023-08-01 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.5 Revision 1.
This extension requires SPIR-V 1.4.
This extension interacts with SPV_KHR_ray_tracing, SPV_NV_mesh_shader, SPV_EXT_mesh_shader.
Overview
This extension adds new functionality to support the Vulkan VK_NV_displacement_micromap extension in SPIR-V.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_NV_displacement_micromap"
New Capabilities
This extension introduces new capabilities:
DisplacementMicromapNV RayTracingDisplacementMicromapNV
New Builtins
Builtins added under the RayTracingDisplacementMicromapNV capability
HitMicroTriangleVertexPositionsNV HitMicroTriangleVertexBarycentricsNV HitKindFrontFacingMicroTriangleNV HitKindBackFacingMicroTriangleNV
New Instructions
Instructions added under the DisplacementMicromapNV capability
OpFetchMicroTriangleVertexPositionNV OpFetchMicroTriangleVertexBarycentricNV
Modifications to the SPIR-V Specification, Version 1.1
- (Modify Section 2.2.2, Types )
-
add OpTypeAccelerationStructureNV to list of opaque types
- (Modify Section 3.21, Builtin, adding rows to the Builtin table)
-
Decoration Enabling Capabilities Extra Operands 5337
HitMicroTriangleVertexPositionsNV
The vertex positions for a hit with a microtriangle for the ray being traced.Allowed in AnyHitKHR and ClosestHitKHR stages.
RayTracingDisplacementMicromapNV
5344
HitMicroTriangleVertexBarycentricsNV
The barycentric coordinates for vertices of a microtriangle hit for the ray being traced relative to the base triangle’s vertices.Allowed in AnyHitKHR and ClosestHitKHR stages.
Refer to the Ray Tracing chapter of Vulkan API specification for more details.
RayTracingDisplacementMicromapNV
5405
HitKindFrontFacingMicroTriangleNV
A link-time constant that HitKindKHR will return when OpTraceRayKHR intersects a front facing microtriangle.Allowed in all stages.
RayTracingDisplacementMicromapNV
5406
HitKindBackFacingMicroTriangleNV
A link-time constant that HitKindKHR will return when OpTraceRayKHR intersects a back facing microtriangle.Allowed in all stages.
RayTracingDisplacementMicromapNV
- (Modify Section 3.HK, Hit Kinds, adding rows to the table)
-
3.HK, Hit Kinds
Values returned in the variable decorated as HitKindKHR from built-in intersections with triangle geometry.
Hit Kind Enabling Capabilities builtin
HitKindFrontFacingMicroTriangleNV
The intersection was with front-facing displacement micromap geometry.RayTracingDisplacementMicromapNV
builtin
HitKindBackFacingMicroTriangleKHR
The intersection was with back-facing displacement micromap geometry.RayTracingDisplacementMicromapNV
- (Modify Section 3.31, Capability, adding a row to the Capability table)
-
Capability Implicitly declares 5380
DisplacementMicromapNV
Uses the OpFetchMicroTriangleVertexPositionNV or OpFetchMicroTriangleVertexBarycentricNV instructionsShader
5409
RayTracingDisplacementMicromapNV
Uses either of HitMicroTriangleVertexPositionsNV, HitMicroTriangleVertexBarycentricsNV, HitKindFrontFacingMicroTriangleNV, HitKindBackFacingMicroTriangleNV , HitKindFrontFacingMicroTriangleNV or HitKindBackFacingMicroTriangleKHR builtinsShader
- (Modify Section 3.32.6, Type-Declaration Instructions, adding a new table)
-
OpTypeAccelerationStructureKHR
Declares an acceleration structure type which is an opaque reference to acceleration structure handle as defined in the client API specification.Consumed by OpFetchMicroTriangleVertexPositionNV and OpFetchMicroTriangleVertexBarycentricNV
This type is opaque: values of this type have no defined physical size or bit pattern.
Capability:
DisplacementMicromapNV2
5341
<id> Result
Instructions
- (Add the new instruction)
Validation Rules
An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:
OpExtension "SPV_NV_displacement_micromap"
Issues
None yet!
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2023-08-01 |
Pyarelal Knowles |
Internal revisions |