spirv: Lower BaseVertex to FIRST_VERTEX instead of BASE_VERTEX
authorNeil Roberts <nroberts@igalia.com>
Thu, 25 Jan 2018 18:15:41 +0000 (19:15 +0100)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Apr 2018 22:57:45 +0000 (15:57 -0700)
commitc4f30a9100bfba7800162bdef267743a2419ec19
tree876a7bb8b042cdee72951a051d8589065fa86e81
parentc32e1035cb4f1e0c2c1bd45611e3a35e7caf57b6
spirv: Lower BaseVertex to FIRST_VERTEX instead of BASE_VERTEX

The base vertex in Vulkan is different from GL in that for non-indexed
primitives the value is taken from the firstVertex parameter instead
of being set to zero. This coincides with the new SYSTEM_VALUE_FIRST_VERTEX
instead of BASE_VERTEX.

v2 (idr): Add comment describing why SYSTEM_VALUE_FIRST_VERTEX is used
for SpvBuiltInBaseVertex.  Suggested by Jason.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/vtn_variables.c
src/intel/vulkan/genX_cmd_buffer.c
src/intel/vulkan/genX_pipeline.c