[Piglit] [PATCH 2/5] shader_runner: Add support for checking for max varying components.

Eric Anholt eric at anholt.net
Mon Jan 5 12:22:43 PST 2015


---
 tests/shaders/shader_runner.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 4f0bcba..9da6e04 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;
 
@@ -2652,14 +2658,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_varyomg_components *= 4;
 	gl_max_clip_planes = 0;
 #endif
 	if (argc < 2) {
-- 
2.1.3



More information about the Piglit mailing list