Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_KHR_fragment_shader_barycentric - device extension
VK_KHR_fragment_shader_barycentric
- Name String
VK_KHR_fragment_shader_barycentric
- Extension Type
- Device extension
- Registered Extension Number
- 323
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2
- Contact
- Stu Smith
- Extension Proposal
- VK_KHR_fragment_shader_barycentric
Other Extension Metadata
- Last Modified Date
- 2022-03-10
- IP Status
- No known IP claims.
- Interactions and External Dependencies
- This extension requires SPV_KHR_fragment_shader_barycentric
- This extension provides API support for GL_EXT_fragment_shader_barycentric
- Contributors
- Stu Smith, AMD
- Tobias Hector, AMD
- Graeme Leese, Broadcom
- Jan-Harald Fredriksen, Arm
- Slawek Grajewski, Intel
- Pat Brown, NVIDIA
- Hans-Kristian Arntzen, Valve
- Contributors to the VK_NV_fragment_shader_barycentric specification
Description
This extension is based on the VK_NV_fragment_shader_barycentric
extension, and adds support for the following SPIR-V extension in
Vulkan:
The extension provides access to three additional fragment shader variable decorations in SPIR-V:
PerVertexKHR
, which indicates that a fragment shader input will not have interpolated values, but instead must be accessed with an extra array index that identifies one of the vertices of the primitive producing the fragmentBaryCoordKHR
, which indicates that the variable is a three-component floating-point vector holding barycentric weights for the fragment produced using perspective interpolationBaryCoordNoPerspKHR
, which indicates that the variable is a three-component floating-point vector holding barycentric weights for the fragment produced using linear interpolation
When using GLSL source-based shader languages, the following variables
from GL_EXT_fragment_shader_barycentric
map to these SPIR-V built-in
decorations:
in vec3 gl_BaryCoordEXT;
→BaryCoordKHR
in vec3 gl_BaryCoordNoPerspEXT;
→BaryCoordNoPerspKHR
GLSL variables declared using the pervertexEXT
GLSL qualifier are
expected to be decorated with PerVertexKHR
in SPIR-V.
New Structures
Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:
New Enum Constants
New Built-In Variables
New SPIR-V Decorations
New SPIR-V Capabilities
Issues
1) What are the interactions with MSAA and how are BaryCoordKHR
and
BaryCoordNoPerspKHR
interpolated?
RESOLVED: The inputs decorated with BaryCoordKHR
or
BaryCoordNoPerspKHR
may also be decorated with the Centroid
or
Sample
qualifiers to specify interpolation, like any other fragment
shader input. If
shaderSampleRateInterpolationFunctions
is enabled, the extended instructions InterpolateAtCentroid,
InterpolateAtOffset, and InterpolateAtSample from the GLSL.std.450 may
also be used with inputs decorated with BaryCoordKHR
or
BaryCoordNoPerspKHR
.
Version History
Revision 1, 2022-03-10 (Stu Smith)
- Initial revision
See Also
PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
,
PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- data PhysicalDeviceFragmentShaderBarycentricFeaturesKHR = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR {}
- data PhysicalDeviceFragmentShaderBarycentricPropertiesKHR = PhysicalDeviceFragmentShaderBarycentricPropertiesKHR {}
- type KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION = 1
- pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION :: forall a. Integral a => a
- type KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"
- pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
data PhysicalDeviceFragmentShaderBarycentricFeaturesKHR Source #
VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR - Structure describing barycentric support in fragment shaders that can be supported by an implementation
Members
This structure describes the following feature:
Description
See Barycentric Interpolation for more information.
If the PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
structure is
included in the pNext
chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2
,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
can
also be used in the pNext
chain of
DeviceCreateInfo
to selectively enable these
features.
Valid Usage (Implicit)
See Also
Instances
data PhysicalDeviceFragmentShaderBarycentricPropertiesKHR Source #
VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR - Structure describing fragment shader barycentric limits of an implementation
Members
- When the
provoking vertex mode
is
PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT
, and the primitive order is odd in a triangle strip, the ordering of vertices is defined in last vertex table.triStripVertexOrderIndependentOfProvokingVertex
equal toTRUE
indicates that the implementation ignores this and uses the vertex order defined byPROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT
instead.
Description
If the PhysicalDeviceFragmentShaderBarycentricPropertiesKHR
structure
is included in the pNext
chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2
,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
Instances
pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric" Source #
pattern KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #