VK_EXT_legacy_vertex_attributes
This document proposes adding legacy features for vertex attributes as found in OpenGL.
1. Problem Statement
OpenGL allows three features that Vulkan explicitly prohibits:
-
Vertex attributes loaded from arbitrary buffer alignments
-
Vertex attributes using arbitrary strides
-
Vertex attributes where the component data type of the binding does not match the component numeric type of the shader input
This proposal aims to provide this legacy functionality for non-64-bit attributes.
2. Solution Space
These legacy features can be emulated by rewriting vertex buffers and generating shader variants. Neither option is as optimal as having the underlying driver handle the functionality, where it may be a no-op.
3. Proposal
3.1. API Features
The following features are exposed by this extension:
typedef struct VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT {
VkStructureType sType;
void* pNext;
VkBool32 legacyVertexAttributes;
} VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT;
legacyVertexAttributes
is the core feature enabling this extension’s functionality.
The following properties are exposed by this extension:
typedef struct VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT {
VkStructureType sType;
void* pNext;
VkBool32 nativeUnalignedPerformance;
} VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT;
nativeUnalignedPerformance
indicates that using unaligned vertex fetches on this implementation will not incur significant performance penalties.