Name Strings
SPV_NV_fragment_shader_barycentric
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Daniel Koch, NVIDIA
Status
-
Complete
Version
Last Modified Date |
2018-08-14 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.3 Revision 2.
This extension requires SPIR-V 1.0.
Overview
This extension provides SPIR-V support for the GLSL GL_NV_fragment_shader_barycentric extension which provides fragment shaders with access to barycentric weights vectors and enables fragment inputs to read the raw per-vertex outputs from the last vertex processing stage.
The extension adds the following functionality under the new FragmentBarycentricNV capability:
-
adds the PerVertexNV decorations for input and/or output variables
-
adds BaryCoordNV and BaryCoordNoPerspNV builtins in fragment shaders
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_NV_fragment_shader_barycentric"
Modifications to the SPIR-V Specification, Version 1.3
- (Modify Section 3.20, Decoration, add a new row to the Decoration table)
-
Decoration Enabling Capabilities Extra Operands 5285
PerVertexNV
Must only be used on a memory object declaration or a member of a structure type. No interpolation. Values are accessed by vertex number in the fragment input. Only valid for the Input and Output Storage Classes.FragmentBarycentricNV
- (Modify Section 3.21, BuiltIn)
-
(add new rows to the Builtin table)
BuiltIn Enabling Capabilities 5286
BaryCoordNV
Input barycentric coordinates in the Fragment Execution Model. These values are perspective-corrected versions of the barycentric weights. See the Vulkan API specification for more detail.FragmentBarycentricNV
5287
BaryCoordNoPerspNV
Input barycentric coordinates in the Fragment Execution Model. These values vary linearly in screenspace. See the Vulkan API specification for more detail.FragmentBarycentricNV
- (Modify Section 3.31, Capability, adding a new row to the Capability table)
-
Capability Depends On Enabled by Extension 5284
FragmentBarycentricNV
Shader
SPV_NV_fragment_shader_barycentric
Validation Rules
An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:
OpExtension "SPV_NV_fragment_shader_barycentric"
Issues
None yet!
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2018-08-14 |
Daniel Koch |
Internal revisions |