[Piglit] [PATCH 5/6] built-in-constants: Fix up tessellation shader #extension work-around for ES

Ian Romanick idr at freedesktop.org
Thu Jul 21 19:04:22 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/shaders/built-in-constants.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
index be4eb64..16bba8a 100644
--- a/tests/shaders/built-in-constants.c
+++ b/tests/shaders/built-in-constants.c
@@ -463,11 +463,20 @@ piglit_init(int argc, char **argv)
 		piglit_report_result(PIGLIT_SKIP);
 
 	/* Tessellation shaders must use the #extension directive. */
-	if (piglit_is_extension_supported("GL_ARB_tessellation_shader")) {
-		assert(num_required_extensions < ARRAY_SIZE(required_extensions));
-		required_extensions[num_required_extensions] =
-			strdup("GL_ARB_tessellation_shader");
-		num_required_extensions++;
+	if (!es_shader) {
+		if (piglit_is_extension_supported("GL_ARB_tessellation_shader")) {
+			assert(num_required_extensions < ARRAY_SIZE(required_extensions));
+			required_extensions[num_required_extensions] =
+				strdup("GL_ARB_tessellation_shader");
+			num_required_extensions++;
+		}
+	} else {
+		if (piglit_is_extension_supported("GL_OES_tessellation_shader")) {
+			assert(num_required_extensions < ARRAY_SIZE(required_extensions));
+			required_extensions[num_required_extensions] =
+				strdup("GL_OES_tessellation_shader");
+			num_required_extensions++;
+		}
 	}
 
 	/* Process the list of required extensions.  While doing this,
-- 
2.5.5



More information about the Piglit mailing list