diff options
author | Marek Olšák <maraeo@gmail.com> | 2013-01-06 05:32:52 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2013-01-15 17:22:50 +0100 |
commit | b8ca04e0caa92a04f911f4d50d78aa5c7c785dde (patch) | |
tree | a48860cb1e9df8746348c965526ec1407fc87e08 /tests/spec/ext_framebuffer_multisample/formats.cpp | |
parent | 5b751a43c8892e51d956da0eeefb434589c2dec4 (diff) |
ext_framebuffer_multisample/formats: only create GLSL 1.30 shaders with GL3
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'tests/spec/ext_framebuffer_multisample/formats.cpp')
-rw-r--r-- | tests/spec/ext_framebuffer_multisample/formats.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/spec/ext_framebuffer_multisample/formats.cpp b/tests/spec/ext_framebuffer_multisample/formats.cpp index 1947c483..13840e1d 100644 --- a/tests/spec/ext_framebuffer_multisample/formats.cpp +++ b/tests/spec/ext_framebuffer_multisample/formats.cpp @@ -169,11 +169,13 @@ PatternRenderer::try_setup(GLenum internalformat) color_clamping_mode = GL_FIXED_ONLY; switch (component_type) { case GL_INT: + assert(test_pattern_ivec4); test_pattern = test_pattern_ivec4; color_offset = 1.0 - pow(2.0, color_bits[0] - 1); color_scale = -2.0 * color_offset; break; case GL_UNSIGNED_INT: + assert(test_pattern_uvec4); test_pattern = test_pattern_uvec4; color_scale = pow(2.0, color_bits[0]) - 1.0; color_offset = 0.0; @@ -586,10 +588,12 @@ piglit_init(int argc, char **argv) GL_TRUE /* print_options */); test_pattern_vec4 = new ColorGradientSunburst(GL_UNSIGNED_NORMALIZED); test_pattern_vec4->compile(); - test_pattern_ivec4 = new ColorGradientSunburst(GL_INT); - test_pattern_ivec4->compile(); - test_pattern_uvec4 = new ColorGradientSunburst(GL_UNSIGNED_INT); - test_pattern_uvec4->compile(); + if (piglit_get_gl_version() >= 30) { + test_pattern_ivec4 = new ColorGradientSunburst(GL_INT); + test_pattern_ivec4->compile(); + test_pattern_uvec4 = new ColorGradientSunburst(GL_UNSIGNED_INT); + test_pattern_uvec4->compile(); + } } extern "C" enum piglit_result |