Name Strings
SPV_NV_bindless_texture
Contact
See Issues list in the Khronos SPIRV-Headers repository: https://github.com/KhronosGroup/SPIRV-Headers
Contributors
-
Jeff Bolz, NVIDIA
-
Pankaj Mistry, NVIDIA
-
Ashwin Lele, NVIDIA
Status
-
Completed
Version
Last Modified Date |
2021-05-26 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.5 Revision 2.
This extension requires SPIR-V 1.0.
Overview
This extension adds new capabilities to support the GL_NV_bindless_texture extensions 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_bindless_texture"
New Capabilities
This extension introduces a new capability:
BindlessTextureNV
New Instructions
Instructions added under the BindlessTextureNV capability:
OpConvertUToImageNV OpConvertUToSamplerNV OpConvertUToSampledImageNV OpConvertImageToUNV OpConvertSamplerToUNV OpConvertSampledImageToUNV OpSamplerImageAddressingModeNV
Token Number Assignments
BindlessTextureNV |
5390 |
OpConvertUToImageNV |
5391 |
OpConvertUToSamplerNV |
5392 |
OpConvertImageToUNV |
5393 |
OpConvertSamplerToUNV |
5394 |
OpConvertUToSampledImageNV |
5395 |
OpConvertSampledImageToUNV |
5396 |
OpSamplerImageAddressingModeNV |
5397 |
BindlessSamplerNV |
5398 |
BindlessImageNV |
5399 |
BoundSamplerNV |
5400 |
BoundImageNV |
5401 |
Modifications to the SPIR-V Specification, Version 1.3
Capability | Implicitly Declares | |
---|---|---|
5390 |
BindlessTextureNV |
- (Modify Section 2.2.2, Types)
-
Update concrete type definition to include OpTypeSampledImage, OpTypeImage and OpTypeSampler:
Concrete Type: A numerical scalar, vector, or matrix type, or physical pointer type, or an image type, or sampler type or sampled image type, or any aggregate containing only these types.
- (Modify Section 2.4, Logical layout of a Module)
-
Modify the layout and insert after OpMemoryModel the address mode of sampler/image type variables. Below is the new fifth entry in the SPIRV layout. Everything gets moved below by a number. Below text shows the 4th, 5th and 6th elements of the updated layout
-
The single required OpMemoryModel instruction
-
Sampler/Image type variable addressing mode defined with OpSamplerImageAddressingModeNV
-
All entry point declarations, using OpEntryPoint.
-
- (Modify Section 2.16.1, Universal Validation Rules)
-
Update the ninth bullet under "Data rules" to relax the restriction on OpSampledImage instructions such that, it can appear as an operand of OpPhi and OpSelect instructions.
Removes the statement: All OpSampledImage instructions must be in the same block in which their Result <id> are consumed. Result <id> from OpSampledImage instructions must not appear as operands to OpPhi instructions or OpSelect instructions
Rephrases the validation rule as follows:
-
OpSampledImage instructions must not appear as operands to any instructions other than:
-
the image lookup and image query instructions specified to take an operand whose type is OpTypeSampledImage
-
OpPhi and OpSelect instructions whose operand and result type can be one of OpTypeSampledImage, OpTypeImage or OpTypeSampler. Result and operand type must be same.
-
Update the tenth bullet under "Data rules" to relax the restriction on image or sampler type data in a composite, to be allowed as operands to OpPhi instructions or OpSelect instructions
Rephrases the validation rule as follows:
– Instructions for extracting a scalar image or scalar sampler out of a composite must only use dynamically-uniform indexes. Result <id> extracted from these composite of type OpTypeImage, OpTypeSampler or OpTypeSampledImage can appear as operands to OpPhi instructions or OpSelect instructions or other image instructions. Such Result <id> must not appear as operands to any other instructions specified to operate on them.
-
- (Add New Subsection 3.32.<TBD>, Bindless Texture cast Instructions)
-
- (Modify Subsection 3.32.15, OpSelect Instruction)
-
As part of the extension, Update OpSelect instruction to accept OpTypeSampledImage as operand and result
- (Add to Decorations: list in Section 3.20)
DecorationBindlessSamplerNV DecorationBindlessImageNV DecorationBoundSamplerNV DecorationBoundImageNV
Decoration |
Extra Operands |
Enabling Capabilities |
|
5398 |
BindlessSamplerNV |
Also see SPV_NV_bindless_texture |
|
5399 |
BindlessImageNV |
Also see SPV_NV_bindless_texture |
|
5400 |
BoundSamplerNV |
Also see SPV_NV_bindless_texture |
|
5401 |
BoundImageNV |
Also see SPV_NV_bindless_texture |
Validation Rules
An OpExtension must be added to SPIR-V for validation layers to check legal use of this extension:
OpExtension "SPV_NV_bindless_texture"
Issues
-
How does this extension interact with GL_NV_bindless_texture ?
RESOLVED: This extension defines the SPIRV instructions and decorations needed to implement GL_NV_bindless_texture.
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2021-05-26 |
Pankaj Mistry |
Initial version |