mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
spirv: Use VERTEX_ID_ZERO_BASE for vertex id
This commit is contained in:
parent
dbc3eb5bb4
commit
98abed2441
1 changed files with 4 additions and 1 deletions
|
|
@ -644,7 +644,10 @@ vtn_get_builtin_location(SpvBuiltIn builtin, int *location,
|
|||
/* 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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue