summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-08-06 08:09:12 -0400
committerMarek Olšák <[email protected]>2018-08-23 16:56:17 -0400
commita8b71f2db86d63fb1dbc2da88b7e1e326b1b90b2 (patch)
treee8d680ca68fa0726d42a59ea9401c0d971f15a43 /src/mesa/main
parent45f87a48f94148b484961f18a4f1ccf86f066b1c (diff)
mesa: add ctx->Const.MaxGeometryShaderInvocations
radeonsi wants to report a different value Reviewed-by: Ian Romanick <[email protected]> Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c1
-rw-r--r--src/mesa/main/get_hash_params.py2
-rw-r--r--src/mesa/main/mtypes.h3
3 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7eea60f12a0..d82015dc936 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -633,6 +633,7 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
consts->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
consts->MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
consts->MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
+ consts->MaxGeometryShaderInvocations = MAX_GEOMETRY_SHADER_INVOCATIONS;
#ifdef DEBUG
consts->GenerateTemporaryNames = true;
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 03409daa8e7..50046e4064e 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -642,7 +642,7 @@ descriptor=[
[ "LAYER_PROVOKING_VERTEX", "CONTEXT_ENUM16(Const.LayerAndVPIndexProvokingVertex), extra_ARB_viewport_array_or_oes_geometry_shader" ],
# GL_ARB_gpu_shader5 / GL_OES_geometry_shader
- [ "MAX_GEOMETRY_SHADER_INVOCATIONS", "CONST(MAX_GEOMETRY_SHADER_INVOCATIONS), extra_ARB_gpu_shader5_or_oes_geometry_shader" ],
+ [ "MAX_GEOMETRY_SHADER_INVOCATIONS", "CONTEXT_INT(Const.MaxGeometryShaderInvocations), extra_ARB_gpu_shader5_or_oes_geometry_shader" ],
# GL_OES_primitive_bounding_box
[ "PRIMITIVE_BOUNDING_BOX_ARB", "CONTEXT_FLOAT8(PrimitiveBoundingBox), extra_OES_primitive_bounding_box" ],
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 9fd577d9990..084510b2a24 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2451,7 +2451,7 @@ struct gl_shader_info
GLint VerticesOut;
/**
* 0 - Invocations count not declared in shader, or
- * 1 .. MAX_GEOMETRY_SHADER_INVOCATIONS
+ * 1 .. Const.MaxGeometryShaderInvocations
*/
GLint Invocations;
/**
@@ -3713,6 +3713,7 @@ struct gl_constants
/** geometry shader */
GLuint MaxGeometryOutputVertices;
GLuint MaxGeometryTotalOutputComponents;
+ GLuint MaxGeometryShaderInvocations;
GLuint GLSLVersion; /**< Desktop GLSL version supported (ex: 120 = 1.20) */
GLuint GLSLVersionCompat; /**< Desktop compat GLSL version supported */