[Piglit] [PATCH 4/8] glslparsertest: Add tessellation shader support
Jordan Justen
jordan.l.justen at intel.com
Mon Jun 2 15:44:05 PDT 2014
.tessc: Tessellation Control shader test
.tesse: Tessellation Evaluation shader test
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
tests/glslparsertest/glslparsertest.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c
index edce51a..d27ce4d 100644
--- a/tests/glslparsertest/glslparsertest.c
+++ b/tests/glslparsertest/glslparsertest.c
@@ -128,6 +128,10 @@ get_shader_name(GLenum type)
switch(type) {
case GL_VERTEX_SHADER:
return "vertex";
+ case GL_TESS_CONTROL_SHADER:
+ return "tessellation control";
+ case GL_TESS_EVALUATION_SHADER:
+ return "tessellation evaluation";
case GL_GEOMETRY_SHADER:
return "geometry";
case GL_FRAGMENT_SHADER:
@@ -223,6 +227,10 @@ test(void)
else if (strcmp(filename + strlen(filename) - 4, "vert") == 0)
type = GL_VERTEX_SHADER;
#ifdef PIGLIT_USE_OPENGL
+ else if (strcmp(filename + strlen(filename) - 5, "tessc") == 0)
+ type = GL_TESS_CONTROL_SHADER;
+ else if (strcmp(filename + strlen(filename) - 5, "tesse") == 0)
+ type = GL_TESS_EVALUATION_SHADER;
else if (strcmp(filename + strlen(filename) - 4, "geom") == 0)
type = GL_GEOMETRY_SHADER;
else if (strcmp(filename + strlen(filename) - 4, "comp") == 0)
@@ -238,6 +246,16 @@ test(void)
piglit_require_vertex_shader();
piglit_require_fragment_shader();
+ if (type == GL_TESS_CONTROL_SHADER ||
+ type == GL_TESS_EVALUATION_SHADER) {
+ if (!piglit_is_extension_supported("GL_ARB_tessellation_shader") &&
+ (piglit_is_gles() || piglit_get_gl_version() < 40)) {
+ printf("Test requires GL version 4.0 or "
+ "GL_ARB_tessellation_shader\n");
+ piglit_report_result(PIGLIT_SKIP);
+ }
+ }
+
if (type == GL_COMPUTE_SHADER) {
if (!piglit_is_extension_supported("GL_ARB_compute_shader") &&
(piglit_is_gles() || piglit_get_gl_version() < 43)) {
--
2.0.0.rc4
More information about the Piglit
mailing list