summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-bug-22603.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2019-03-08 17:25:05 -0800
committerIan Romanick <ian.d.romanick@intel.com>2019-06-26 08:31:49 -0700
commit9ad62be49e8de054539d303b5640a53984575fe7 (patch)
tree8959f5c2945a61116ef62e1afbc8340efabc4e16 /tests/shaders/glsl-bug-22603.c
parent9f1aa3953a8bd526a04af70c656974f5365b216a (diff)
Fix many incorrect GLSL checks
piglit_require_GLSL() only checks that shader objects and the shading language exist. It does *NOT* check that any particular shader stage exists. It is perfectly valid to have an OpenGL 1.5 implementation that has only vertex shaders or only fragment shaders. piglit_require_GLSL_version(110) and piglit_require_GLSL_version(120) have the same failings as piglit_require_GLSL() and more. GLSL 1.10 is the minimum GLSL version that actually exists, so anything that has GLSL has version 1.10. GLSL 1.20 can be exposed by an implementation, so checking that version doesn't guarantee anything either. GLSL 1.30 implicitly requires OpenGL 3.0, so that is a strong check. All of the non-shader drivers in Mesa advertise shader objects and GLSL 1.20 and NEITHER vertex nor fragment stages. This fixes these tests to just skip on those drivers.
Diffstat (limited to 'tests/shaders/glsl-bug-22603.c')
-rw-r--r--tests/shaders/glsl-bug-22603.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/shaders/glsl-bug-22603.c b/tests/shaders/glsl-bug-22603.c
index 74aeb7be5..8f995aa64 100644
--- a/tests/shaders/glsl-bug-22603.c
+++ b/tests/shaders/glsl-bug-22603.c
@@ -200,7 +200,8 @@ piglit_init(int argc, char **argv)
"}";
piglit_require_extension("GL_EXT_framebuffer_object");
- piglit_require_GLSL();
+ piglit_require_vertex_shader();
+ piglit_require_fragment_shader();
vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source);
fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_source);