diff options
author | Tom Gall <tom.gall@linaro.org> | 2013-01-16 16:01:58 -0600 |
---|---|---|
committer | Tom Gall <tom.gall@linaro.org> | 2013-01-16 16:01:58 -0600 |
commit | 0ced6ad90cf653790012a6fc1442f2f7763442d4 (patch) | |
tree | dba47f637f2560d0800e20ac5f7dbba258888d9e | |
parent | 5dfa64425c0b0ca1e0eba64edea4d31f8d8903ea (diff) | |
parent | dadf56dad25730556e36e9446aabfc80458cc12f (diff) |
Merge branch 'master' of git://anongit.freedesktop.org/git/piglit
-rw-r--r-- | tests/shaders/shader_runner.c | 24 | ||||
-rw-r--r-- | tests/spec/glsl-es-1.00/execution/sanity.shader_test | 7 | ||||
-rw-r--r-- | tests/spec/glsl-es-3.00/execution/sanity.shader_test | 8 | ||||
-rw-r--r-- | tests/texturing/shaders/texelFetch.c | 2 |
4 files changed, 16 insertions, 25 deletions
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index db92b8f8..8dfeb2a8 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -459,15 +459,8 @@ process_comparison(const char *src, enum comparison *cmp) /** - * To specify an ES version, append "es" to the version. For example: - * GL >= 3.0 es - * GLSL >= 3.00 es - * - * GLSL ES 1.00 is a special case. Despite being an ES shading language, - * the #version directive lacks "es"; that is, the directive is - * `#version 100` rather than `#version 100 es`. Therefore be lenient in - * parsing that version. Interpret `GLSL >= 100` and `GLSL >= 100 es` - * identically. + * " ES" before the comparison operator indicates the version + * pertains to GL ES. */ void parse_version_comparison(const char *line, enum comparison *cmp, @@ -476,8 +469,12 @@ parse_version_comparison(const char *line, enum comparison *cmp, unsigned major; unsigned minor; unsigned full_num; - bool es; + bool es = false; + if (string_match(" ES", line)) { + es = true; + line += 3; + } line = eat_whitespace(line); line = process_comparison(line, cmp); @@ -486,7 +483,10 @@ parse_version_comparison(const char *line, enum comparison *cmp, line = eat_text(line); line = eat_whitespace(line); - es = string_match("es", line); + if (*line != '\n') { + printf("Unexpected characters following version comparison\n"); + piglit_report_result(PIGLIT_FAIL); + } /* This hack is so that we can tell the difference between GL versions * and GLSL versions. All GL versions look like 3.2, and we want the @@ -495,8 +495,6 @@ parse_version_comparison(const char *line, enum comparison *cmp, */ if (tag == VERSION_GLSL) { full_num = (major * 100) + minor; - if (full_num == 100) - es = true; } else { full_num = (major * 10) + minor; } diff --git a/tests/spec/glsl-es-1.00/execution/sanity.shader_test b/tests/spec/glsl-es-1.00/execution/sanity.shader_test index a1dc07a0..0884e2c6 100644 --- a/tests/spec/glsl-es-1.00/execution/sanity.shader_test +++ b/tests/spec/glsl-es-1.00/execution/sanity.shader_test @@ -1,11 +1,10 @@ # Fill the window with red, then green, then blue. [require] -GL >= 2.0 es +GL ES >= 2.0 +GLSL ES >= 1.00 [vertex shader] -#version 100 - attribute vec4 vertex; void main() { @@ -13,8 +12,6 @@ void main() { } [fragment shader] -#version 100 - uniform vec4 u_color; void main() { diff --git a/tests/spec/glsl-es-3.00/execution/sanity.shader_test b/tests/spec/glsl-es-3.00/execution/sanity.shader_test index e7e6dedf..1709d78e 100644 --- a/tests/spec/glsl-es-3.00/execution/sanity.shader_test +++ b/tests/spec/glsl-es-3.00/execution/sanity.shader_test @@ -1,12 +1,10 @@ # Fill the window with red, then green, then blue. [require] -GL >= 3.0 es -GLSL >= 3.00 es +GL ES >= 3.0 +GLSL ES >= 3.00 [vertex shader] -#version 300 es - in vec4 vertex; void main() { @@ -14,8 +12,6 @@ void main() { } [fragment shader] -#version 300 es - uniform vec4 u_color; out vec4 color; diff --git a/tests/texturing/shaders/texelFetch.c b/tests/texturing/shaders/texelFetch.c index 78a4162a..50e91a6a 100644 --- a/tests/texturing/shaders/texelFetch.c +++ b/tests/texturing/shaders/texelFetch.c @@ -297,7 +297,7 @@ generate_texture() expected_colors = calloc(miplevels, sizeof(float **)); for (l = 0; l < miplevels; l++) { - expected_colors[l] = calloc(level_size[l][2], sizeof(float **)); + expected_colors[l] = calloc(level_size[l][2], sizeof(float *)); i_ptr = i_level = malloc(level_size[l][0] * level_size[l][1] * |