In Vulkan, VertexId and InstanceId will be zero-based and new intrinsics,
VertexIndex and InstanceIndex, will be added for non-zer-based. See also,
Khronos bug #14255
/* XXX figure this out */
unreachable("unhandled builtin");
case SpvBuiltInVertexId:
- *location = SYSTEM_VALUE_VERTEX_ID;
+ /* Vulkan defines VertexID to be zero-based and reserves the new
+ * builtin keyword VertexIndex to indicate the non-zero-based value.
+ */
+ *location = SYSTEM_VALUE_VERTEX_ID_ZERO_BASE;
*mode = nir_var_system_value;
break;
case SpvBuiltInInstanceId: