summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-01-04 16:21:50 -0800
committerEric Anholt <eric@anholt.net>2015-03-25 12:46:18 -0700
commit32134bdaea05b73077cad64e36cf2cd88baa9b10 (patch)
treea6b3cc1c7c76cc217bab6d115a7fd62bbf9192cc
parent4a260f9a72d9fd5ccc57e9584d86d1a67d548124 (diff)
shader_runner: Add support for checking for max varying components.
-rw-r--r--tests/shaders/shader_runner.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 89425c5ea..20eb26c6b 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -88,6 +88,7 @@ static struct component_version glsl_version;
static struct component_version glsl_req_version;
static int gl_max_fragment_uniform_components;
static int gl_max_vertex_uniform_components;
+static int gl_max_varying_components;
static int gl_max_clip_planes;
const char *path = NULL;
@@ -567,6 +568,11 @@ process_requirement(const char *line)
&gl_max_vertex_uniform_components,
"vertex uniform components",
},
+ {
+ "GL_MAX_VARYING_COMPONENTS",
+ &gl_max_varying_components,
+ "varying components",
+ },
};
unsigned i;
@@ -2676,14 +2682,19 @@ piglit_init(int argc, char **argv)
&gl_max_fragment_uniform_components);
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS,
&gl_max_vertex_uniform_components);
+ glGetIntegerv(GL_MAX_VARYING_COMPONENTS,
+ &gl_max_varying_components);
glGetIntegerv(GL_MAX_CLIP_PLANES, &gl_max_clip_planes);
#else
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS,
&gl_max_fragment_uniform_components);
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS,
&gl_max_vertex_uniform_components);
+ glGetIntegerv(GL_MAX_VARYING_VECTORS,
+ &gl_max_varying_components);
gl_max_fragment_uniform_components *= 4;
gl_max_vertex_uniform_components *= 4;
+ gl_max_varying_components *= 4;
gl_max_clip_planes = 0;
#endif
if (argc < 2) {