Name Strings
SPV_NV_linear_swept_spheres
Contact
See Issues list in the Khronos SPIRV-Registry repository: https://github.com/KhronosGroup/SPIRV-Registry
Contributors
-
Ashwin Lele, NVIDIA
-
Eric Werness, NVIDIA
-
Vikram Kushwaha, NVIDIA
Status
-
Complete
Version
Last Modified Date |
2025-01-01 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.6 Revision 1.
This extension requires SPIR-V 1.4.
This extension interacts with SPV_KHR_ray_tracing.
This extension interacts with SPV_KHR_ray_query.
This extension interacts with SPV_NV_shader_invocation_reorder.
Overview
This extension adds new functionality to support the Vulkan VK_NV_ray_tracing_linear_swept_spheres 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_linear_swept_spheres"
New Capabilities
This extension introduces new capabilities:
RayTracingSpheresGeometryNV RayTracingLinearSweptSpheresGeometryNV
New Builtins
Builtins added under the RayTracingLinearSweptSpheresGeometryNV capability
HitIsLSSNV HitLSSPositionsNV HitLSSRadiiNV
Builtins added under the RayTracingSpheresGeometryNV capability
HitIsSphereNV HitSpherePositionNV HitSphereRadiusNV
New Instructions
Instructions added under the RayTracingSpheresGeometryNV capability
OpHitObjectGetSpherePositionNV OpHitObjectGetSphereRadiusNV OpHitObjectIsSphereHitNV OpRayQueryGetIntersectionSpherePositionNV OpRayQueryGetIntersectionSphereRadiusNV OpRayQueryIsSphereHitNV
Instructions added under the RayTracingLinearSweptSpheresGeometryNV capability
OpHitObjectGetLSSPositionsNV OpHitObjectGetLSSRadiiNV OpHitObjectIsLSSHitNV OpRayQueryGetIntersectionLSSPositionsNV OpRayQueryGetIntersectionLSSRadiiNV OpRayQueryGetIntersectionLSSHitValueNV OpRayQueryIsLSSHitNV
Modifications to the SPIR-V Specification
- (Modify Section 3.21, Builtin, adding rows to the Builtin table)
-
Decoration Enabling Capabilities 5359
HitIsSphereNV
Indicates if current ray hit a sphere primitive. OpConstantTrue if hit is with a sphere primitive , OpConstantFalse otherwise.
Allowed in AnyHitKHR and ClosestHitKHR ray tracing execution models.RayTracingSpheresGeometryNV
5360
HitIsLSSNV
Indicates if current ray hit a LSS primitive, OpConstantTrue if hit is with a LSS primitive , OpConstantFalse otherwise.
Allowed in AnyHitKHR and ClosestHitKHR ray tracing execution models.RayTracingLinearSweptSpheresGeometryNV
5361
HitSpherePositionNV
The position of sphere primitive intersected by current ray.
Allowed in AnyHitKHR and ClosestHitKHR ray tracing execution models.RayTracingSpheresGeometryNV
5396
HitLSSPositionsNV
The positions of two endcaps of LSS primitive intersected by current ray.
Allowed in AnyHitKHR and ClosestHitKHR ray tracing execution models.RayTracingLinearSweptSpheresGeometryNV
5420
HitSphereRadiusNV
The radius of sphere primitive intersected by current ray.
Allowed in AnyHitKHR and ClosestHitKHR ray tracing execution models.RayTracingSpheresGeometryNV
5421
HitLSSRadiiNV
The radii of two endcaps of LSS primitive intersected by current ray.
Allowed in AnyHitKHR and ClosestHitKHR ray tracing execution models.RayTracingLinearSweptSpheresGeometryNV
- (Modify Section 3.31, Capability, adding a row to the Capability table)
-
Capability Implicitly Declares 5418
RayTracingSpheresGeometryNV
5419
RayTracingLinearSweptSpheresGeometryNV
- (Modify sub-section 3.RF, Ray Flags, add a new row)
-
3.RF, Ray Flags
Ray Flags Enabling Capabilities 256
SkipBuiltinPrimitivesNV
Alias for SkipTrianglesKHR. See the Ray Primitive Culling section in the Vulkan API specification.RayTracingSpheresGeometryNV or RayTracingLinearSweptSpheresGeometryNV
- (Add a new sub section 3.36.Hit Object Instructions)
-
- (Add a new sub section 3.36.RQInstructions, Ray Query Instructions)
OpRayQueryGetIntersectionSpherePositionNV |
Capability: |
||||
5 |
5427 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
OpRayQueryGetIntersectionSphereRadiusNV |
Capability: |
||||
5 |
5428 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
OpRayQueryGetIntersectionLSSPositionsNV |
Capability: |
||||
5 |
5429 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
OpRayQueryGetIntersectionLSSRadiiNV |
Capability: |
||||
5 |
5430 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
OpRayQueryGetIntersectionLSSHitValueNV |
Capability: |
||||
5 |
5431 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
OpRayQueryIsSphereHitNV |
Capability: |
||||
5 |
5438 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
OpRayQueryIsLSSHitNV |
Capability: |
||||
5 |
5439 |
<id> Result Type |
<id> Result |
<id> Ray Query |
<id> Intersection |
Validation Rules
An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:
OpExtension "SPV_NV_linear_swept_spheres"
Interactions with SPV_KHR_ray_tracing
Builtins HitIsSphereNV, HitIsLSSNV, HitSpherePositionNV HitSphereRadiusNV, HitLSSPositionsNV, HitLSSRadiiNV are supported only if SPV_KHR_ray_tracing is supported.
Interactions with SPV_KHR_ray_query
OpRayQueryGetIntersectionSpherePositionNV, OpRayQueryGetIntersectionSphereRadiusNV, OpRayQueryGetIntersectionLSSPositionsNV, OpRayQueryGetIntersectionLSSRadiiNV, OpRayQueryGetIntersectionLSSHitValueNV,OpRayQueryIsSphereHitNV, OpRayQueryIsLSSHitNV are supported only if SPV_KHR_ray_query is supported.
Interactions with SPV_NV_shader_invocation_reorder
OpHitObjectGetSpherePositionNV, OpHitObjectGetSphereRadiusNV,OpHitObjectGetLSSPositionsNV, OpHitObjectGetLSSRadiiNV, OpHitObjectIsSphereHitNV, OpHitObjectIsLSSHitNV are supported only if SPV_NV_shader_invocation_reorder is supported.
Issues
None
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2025-01-01 |
Ashwin Lele |
Internal revisions. |