summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c6
-rw-r--r--src/mesa/main/mtypes.h9
2 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 8b5693e3771..8208a50b3e6 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -622,6 +622,12 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
consts->MaxProgramMatrices = MAX_PROGRAM_MATRICES;
consts->MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
+ /* Assume that if GLSL 1.30+ (or GLSL ES 3.00+) is supported that
+ * gl_VertexID is implemented using a native hardware register with OpenGL
+ * semantics.
+ */
+ consts->VertexID_is_zero_based = false;
+
/* CheckArrayBounds is overriden by drivers/x11 for X server */
consts->CheckArrayBounds = GL_FALSE;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 05534dba288..0d50be842fb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3488,6 +3488,15 @@ struct gl_constants
GLboolean NativeIntegers;
/**
+ * Does VertexID count from zero or from base vertex?
+ *
+ * \note
+ * If desktop GLSL 1.30 or GLSL ES 3.00 are not supported, this field is
+ * ignored and need not be set.
+ */
+ bool VertexID_is_zero_based;
+
+ /**
* If the driver supports real 32-bit integers, what integer value should be
* used for boolean true in uniform uploads? (Usually 1 or ~0.)
*/