summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-08-10 21:07:33 +1200
committerDave Airlie <[email protected]>2015-07-23 17:25:14 +1000
commit25d6f56c08801909e784f81e9b9ced48977630f4 (patch)
tree2a36d76746496302c3e14150fcfc89c617be46eb
parent4c7b007104c63475ec080d0777a41603c78786f6 (diff)
mesa: Add glGet support for ARB_shader_subroutine implementation limits
Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/mesa/main/config.h6
-rw-r--r--src/mesa/main/get.c1
-rw-r--r--src/mesa/main/get_hash_params.py4
-rw-r--r--src/mesa/main/tests/enum_strings.cpp9
4 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 66eb6cb206d..b35031db3c9 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -274,6 +274,12 @@
#define MAX_VERTEX_STREAMS 4
/*@}*/
+/** For GL_ARB_shader_subroutine */
+/*@{*/
+#define MAX_SUBROUTINES 256
+#define MAX_SUBROUTINE_UNIFORM_LOCATIONS 1024
+/*@}*/
+
/** For GL_INTEL_performance_query */
/*@{*/
#define MAX_PERFQUERY_QUERY_NAME_LENGTH 256
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 590fe284f4e..ce786915508 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -414,6 +414,7 @@ EXTRA_EXT(ARB_clip_control);
EXTRA_EXT(EXT_polygon_offset_clamp);
EXTRA_EXT(ARB_framebuffer_no_attachments);
EXTRA_EXT(ARB_tessellation_shader);
+EXTRA_EXT(ARB_shader_subroutine);
static const int
extra_ARB_color_buffer_float_or_glcore[] = {
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 2cf06d64c9f..4137e7f33c5 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -852,6 +852,10 @@ descriptor=[
[ "MAX_TESS_EVALUATION_ATOMIC_COUNTERS", "CONTEXT_INT(Const.Program[MESA_SHADER_TESS_EVAL].MaxAtomicCounters), extra_ARB_shader_atomic_counters_and_tessellation" ],
[ "MAX_TESS_CONTROL_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_TESS_CTRL].MaxImageUniforms), extra_ARB_shader_image_load_store_and_tessellation"],
[ "MAX_TESS_EVALUATION_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_TESS_EVAL].MaxImageUniforms), extra_ARB_shader_image_load_store_and_tessellation"],
+
+# GL_ARB_shader_subroutine
+ [ "MAX_SUBROUTINES", "CONST(MAX_SUBROUTINES), extra_ARB_shader_subroutine" ],
+ [ "MAX_SUBROUTINE_UNIFORM_LOCATIONS", "CONST(MAX_SUBROUTINE_UNIFORM_LOCATIONS), extra_ARB_shader_subroutine" ],
]}
]
diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp
index 84c11954f44..8218cc9a685 100644
--- a/src/mesa/main/tests/enum_strings.cpp
+++ b/src/mesa/main/tests/enum_strings.cpp
@@ -1731,6 +1731,10 @@ const struct enum_info everything[] = {
{ 0x8DDF, "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS" },
{ 0x8DE0, "GL_MAX_GEOMETRY_OUTPUT_VERTICES" },
{ 0x8DE1, "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS" },
+ { 0x8DE5, "GL_ACTIVE_SUBROUTINES" },
+ { 0x8DE6, "GL_ACTIVE_SUBROUTINE_UNIFORMS" },
+ { 0x8DE7, "GL_MAX_SUBROUTINES" },
+ { 0x8DE8, "GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS" },
{ 0x8DF0, "GL_LOW_FLOAT" },
{ 0x8DF1, "GL_MEDIUM_FLOAT" },
{ 0x8DF2, "GL_HIGH_FLOAT" },
@@ -1759,6 +1763,11 @@ const struct enum_info everything[] = {
{ 0x8E44, "GL_TEXTURE_SWIZZLE_B" },
{ 0x8E45, "GL_TEXTURE_SWIZZLE_A" },
{ 0x8E46, "GL_TEXTURE_SWIZZLE_RGBA" },
+ { 0x8E47, "GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS" },
+ { 0x8E48, "GL_ACTIVE_SUBROUTINE_MAX_LENGTH" },
+ { 0x8E49, "GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH" },
+ { 0x8E4A, "GL_NUM_COMPATIBLE_SUBROUTINES" },
+ { 0x8E4B, "GL_COMPATIBLE_SUBROUTINES" },
{ 0x8E4C, "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION" },
{ 0x8E4D, "GL_FIRST_VERTEX_CONVENTION" },
{ 0x8E4E, "GL_LAST_VERTEX_CONVENTION" },