[Piglit] [PATCH 8/9] piglit_util: allow calling piglit_draw_rect with separate shader objects

Marek Olšák maraeo at gmail.com
Tue Jun 16 13:57:41 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

---
 tests/util/piglit-util-gl.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 0ffb82c..04915be 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -672,6 +672,17 @@ piglit_draw_rect_from_arrays(const void *verts, const void *tex,
 
 		glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *) &prog);
 
+		if (!prog &&
+		    piglit_is_extension_supported("GL_ARB_separate_shader_objects")) {
+			GLuint pipeline;
+
+			glGetIntegerv(GL_PROGRAM_PIPELINE_BINDING,
+				      (GLint*)&pipeline);
+			if (pipeline)
+				glGetProgramPipelineiv(pipeline, GL_VERTEX_SHADER,
+						       (GLint*)&prog);
+		}
+
 		/* If there is a current program and that program has an
 		 * active attribute named piglit_vertex, don't use the fixed
 		 * function inputs.
-- 
2.1.0



More information about the Piglit mailing list