[Mesa-dev] [PATCH 02/17] mesa: Track per-stage shader input and output limits independently
Ian Romanick
idr at freedesktop.org
Tue Sep 10 12:10:49 PDT 2013
From: Ian Romanick <ian.d.romanick at intel.com>
In OpenGL 3.2 these are independently queryable. In addition, the spec
has different minimum-maximums for various values.
GL_MAX_VERTEX_OUTPUT_COMPONENTS is 64, but
GL_MAX_GEOMETRY_OUTPUT_COMPONENTS (and GL_MAX_FRAGMENT_INPUT_COMPONENTS)
is 128.
In OpenGL ES 3.0 these are also independently queryable. The spec has
different minimum-maximums for various values.
GL_MAX_VERTEX_OUTPUT_VECTORS is 16, but GL_MAX_FRAGMENT_INTPUT_VECTORS
is 15.
None of these values are used yet. I have just added space to the
structures. Future patches will add users and eventually remove some
old fields.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Paul Berry <stereotype441 at gmail.com>
Cc: Marek Olšák <maraeo at gmail.com>
Cc: Brian Paul <brianp at vmware.com>
Cc: Zack Rusin <zackr at vmware.com>
---
src/mesa/main/mtypes.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ca7111e..17bc31d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2824,6 +2824,30 @@ struct gl_program_constants
GLuint MaxNativeParameters;
/* For shaders */
GLuint MaxUniformComponents; /**< Usually == MaxParameters * 4 */
+
+ /**
+ * \name Per-stage input / output limits
+ *
+ * Previous to OpenGL 3.2, the intrastage data limits were advertised with
+ * a single value: GL_MAX_VARYING_COMPONENTS (GL_MAX_VARYING_VECTORS in
+ * ES). This is stored as \c gl_constants::MaxVarying.
+ *
+ * Starting with OpenGL 3.2, the limits are advertised with per-stage
+ * variables. Each stage as a certain number of outputs that it can feed
+ * to the next stage and a certain number inputs that it can consume from
+ * the previous stage.
+ *
+ * Vertex shader inputs do not participate this in this accounting.
+ * These are tracked exclusively by \c gl_program_constants::MaxAttribs.
+ *
+ * Fragment shader outputs do not participate this in this accounting.
+ * These are tracked exclusively by \c gl_constants::MaxDrawBuffers.
+ */
+ /*@{*/
+ GLuint MaxInputComponents;
+ GLuint MaxOutputComponents;
+ /*@}*/
+
/* ES 2.0 and GL_ARB_ES2_compatibility */
struct gl_precision LowFloat, MediumFloat, HighFloat;
struct gl_precision LowInt, MediumInt, HighInt;
--
1.8.1.4
More information about the mesa-dev
mailing list