return nir_intrinsic_load_base_instance;
case SYSTEM_VALUE_VERTEX_ID_ZERO_BASE:
return nir_intrinsic_load_vertex_id_zero_base;
+ case SYSTEM_VALUE_FIRST_VERTEX:
+ return nir_intrinsic_load_first_vertex;
case SYSTEM_VALUE_BASE_VERTEX:
return nir_intrinsic_load_base_vertex;
case SYSTEM_VALUE_INVOCATION_ID:
return SYSTEM_VALUE_BASE_INSTANCE;
case nir_intrinsic_load_vertex_id_zero_base:
return SYSTEM_VALUE_VERTEX_ID_ZERO_BASE;
+ case nir_intrinsic_load_first_vertex:
+ return SYSTEM_VALUE_FIRST_VERTEX;
case nir_intrinsic_load_base_vertex:
return SYSTEM_VALUE_BASE_VERTEX;
case nir_intrinsic_load_invocation_id:
case nir_intrinsic_load_vertex_id:
case nir_intrinsic_load_vertex_id_zero_base:
case nir_intrinsic_load_base_vertex:
+ case nir_intrinsic_load_first_vertex:
case nir_intrinsic_load_base_instance:
case nir_intrinsic_load_instance_id:
case nir_intrinsic_load_sample_id:
system_value("front_face", 1)
system_value("vertex_id", 1)
system_value("vertex_id_zero_base", 1)
+system_value("first_vertex", 1)
system_value("base_vertex", 1)
system_value("instance_id", 1)
system_value("base_instance", 1)
ENUM(SYSTEM_VALUE_INSTANCE_ID),
ENUM(SYSTEM_VALUE_INSTANCE_INDEX),
ENUM(SYSTEM_VALUE_VERTEX_ID_ZERO_BASE),
+ ENUM(SYSTEM_VALUE_FIRST_VERTEX),
ENUM(SYSTEM_VALUE_BASE_VERTEX),
ENUM(SYSTEM_VALUE_BASE_INSTANCE),
ENUM(SYSTEM_VALUE_DRAW_ID),
*/
SYSTEM_VALUE_BASE_VERTEX,
+ /**
+ * Depending on the type of the draw call (indexed or non-indexed),
+ * is the value of \c basevertex passed to \c glDrawElementsBaseVertex and
+ * similar, or is the value of \c first passed to \c glDrawArrays and
+ * similar.
+ *
+ * \note
+ * It can be used to calculate the \c SYSTEM_VALUE_VERTEX_ID as
+ * \c SYSTEM_VALUE_VERTEX_ID_ZERO_BASE plus \c SYSTEM_VALUE_FIRST_VERTEX.
+ *
+ * \sa SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, SYSTEM_VALUE_VERTEX_ID
+ */
+ SYSTEM_VALUE_FIRST_VERTEX,
+
/**
* Value of \c baseinstance passed to instanced draw entry points
*