[Piglit] [PATCH] built-in-constants: check required GLSL versions for #extensions
Juan A. Suarez Romero
jasuarez at igalia.com
Mon Nov 13 17:48:27 UTC 2017
GL_OES_geometry_shader and GL_OES_tessellation_shader specifications
require OpenGL ES Shading Language 3.10.
GL_ARB_tessellation_shader specification requires GLSL 1.50.
---
tests/shaders/built-in-constants.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
index d470fe1bf..6ad26dccf 100644
--- a/tests/shaders/built-in-constants.c
+++ b/tests/shaders/built-in-constants.c
@@ -386,7 +386,7 @@ create_shader(GLenum type)
return 0;
} else {
if (is_tessellation_type(type) &&
- (required_glsl_version < 400 &&
+ (required_glsl_version < 150 ||
!piglit_is_extension_supported("GL_ARB_tessellation_shader")))
return 0;
@@ -461,7 +461,7 @@ piglit_init(int argc, char **argv)
/* Geometry shaders must use the #extension directive in GLSL ES
* before version 3.20.
*/
- if (es_shader && required_glsl_version < 320 &&
+ if (es_shader && required_glsl_version == 310 &&
piglit_is_extension_supported("GL_OES_geometry_shader")) {
assert(num_required_extensions < ARRAY_SIZE(required_extensions));
required_extensions[num_required_extensions] =
@@ -473,7 +473,9 @@ piglit_init(int argc, char **argv)
const char *const tess_ext_name = es_shader
? "GL_OES_tessellation_shader"
: "GL_ARB_tessellation_shader";
- if (piglit_is_extension_supported(tess_ext_name)) {
+ if (((es_shader && required_glsl_version == 310) ||
+ (!es_shader && required_glsl_version >= 150)) &&
+ piglit_is_extension_supported(tess_ext_name)) {
assert(num_required_extensions < ARRAY_SIZE(required_extensions));
required_extensions[num_required_extensions] =
strdup(tess_ext_name);
--
2.13.6
More information about the Piglit
mailing list