diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2012-07-16 10:51:42 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2012-07-27 11:09:46 -0700 |
commit | eca893d6b991c83280365dcd36e126337c835611 (patch) | |
tree | 0f2b27d01bb2c82278aa3634faf223def836092c | |
parent | 518d217b045e847d19ac6d9223b3cd489648d8fc (diff) |
oes_standard_derivatives: Add touch tests for the extension
Make sure that all the functions are available when they should be.
This is currently broken in Mesa.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52003
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
25 files changed, 341 insertions, 0 deletions
diff --git a/tests/all.tests b/tests/all.tests index f9a09c5a5..a1a93d791 100644 --- a/tests/all.tests +++ b/tests/all.tests @@ -1973,6 +1973,11 @@ spec['OES_compressed_paletted_texture'] = oes_compressed_paletted_texture oes_compressed_paletted_texture['invalid formats'] = PlainExecTest(['arb_texture_compression-invalid-formats', 'paletted']) oes_compressed_paletted_texture['invalid formats'].runConcurrent = True +spec['OES_standard_derivatives'] = Group() +import_glsl_parser_tests(spec['OES_standard_derivatives'], + os.path.join(testsDir, 'spec', 'oes_standard_derivatives'), + ['compiler']) + arb_copy_buffer = Group() spec['ARB_copy_buffer'] = arb_copy_buffer add_plain_test(arb_copy_buffer, 'copy_buffer_coherency') diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-float.frag b/tests/spec/oes_standard_derivatives/compiler/dFdx-float.frag new file mode 100644 index 000000000..ce8adab41 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-float.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying float x; +void main() +{ + gl_FragColor = vec4(dFdx(x)); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-float.vert b/tests/spec/oes_standard_derivatives/compiler/dFdx-float.vert new file mode 100644 index 000000000..db7901b7a --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-float.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute float x; +void main() +{ + gl_Position = vec4(dFdx(x)); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-vec2.frag b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec2.frag new file mode 100644 index 000000000..17b0cce01 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec2.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec2 x; +void main() +{ + gl_FragColor = dFdx(x).xyxy; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-vec2.vert b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec2.vert new file mode 100644 index 000000000..999b8a314 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec2.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec2 x; +void main() +{ + gl_Position = dFdx(x).xyxy; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-vec3.frag b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec3.frag new file mode 100644 index 000000000..db99ed731 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec3.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec3 x; +void main() +{ + gl_FragColor = dFdx(x).xyzx; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-vec3.vert b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec3.vert new file mode 100644 index 000000000..ea7c2de97 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec3.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec3 x; +void main() +{ + gl_Position = dFdx(x).xyzx; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-vec4.frag b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec4.frag new file mode 100644 index 000000000..5bd0f2736 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec4.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec4 x; +void main() +{ + gl_FragColor = dFdx(x); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdx-vec4.vert b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec4.vert new file mode 100644 index 000000000..7872c7f79 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdx-vec4.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec4 x; +void main() +{ + gl_Position = dFdx(x); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-float.frag b/tests/spec/oes_standard_derivatives/compiler/dFdy-float.frag new file mode 100644 index 000000000..da058aaa3 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-float.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying float x; +void main() +{ + gl_FragColor = vec4(dFdy(x)); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-float.vert b/tests/spec/oes_standard_derivatives/compiler/dFdy-float.vert new file mode 100644 index 000000000..19a6668fc --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-float.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute float x; +void main() +{ + gl_Position = vec4(dFdy(x)); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-vec2.frag b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec2.frag new file mode 100644 index 000000000..9e0bc7148 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec2.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec2 x; +void main() +{ + gl_FragColor = dFdy(x).xyxy; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-vec2.vert b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec2.vert new file mode 100644 index 000000000..a1a698a75 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec2.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec2 x; +void main() +{ + gl_Position = dFdy(x).xyxy; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-vec3.frag b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec3.frag new file mode 100644 index 000000000..9062cd533 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec3.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec3 x; +void main() +{ + gl_FragColor = dFdy(x).xyzx; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-vec3.vert b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec3.vert new file mode 100644 index 000000000..98c5f175f --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec3.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec3 x; +void main() +{ + gl_Position = dFdy(x).xyzx; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-vec4.frag b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec4.frag new file mode 100644 index 000000000..4648b88af --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec4.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec4 x; +void main() +{ + gl_FragColor = dFdy(x); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/dFdy-vec4.vert b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec4.vert new file mode 100644 index 000000000..d39c06ab4 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/dFdy-vec4.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec4 x; +void main() +{ + gl_Position = dFdy(x); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-float.frag b/tests/spec/oes_standard_derivatives/compiler/fwidth-float.frag new file mode 100644 index 000000000..94f550588 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-float.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying float x; +void main() +{ + gl_FragColor = vec4(fwidth(x)); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-float.vert b/tests/spec/oes_standard_derivatives/compiler/fwidth-float.vert new file mode 100644 index 000000000..4b29ca92c --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-float.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute float x; +void main() +{ + gl_Position = vec4(fwidth(x)); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-vec2.frag b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec2.frag new file mode 100644 index 000000000..99ca181e9 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec2.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec2 x; +void main() +{ + gl_FragColor = fwidth(x).xyxy; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-vec2.vert b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec2.vert new file mode 100644 index 000000000..18c139cb8 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec2.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec2 x; +void main() +{ + gl_Position = fwidth(x).xyxy; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-vec3.frag b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec3.frag new file mode 100644 index 000000000..307e73d91 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec3.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec3 x; +void main() +{ + gl_FragColor = fwidth(x).xyzx; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-vec3.vert b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec3.vert new file mode 100644 index 000000000..d9afd1a42 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec3.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec3 x; +void main() +{ + gl_Position = fwidth(x).xyzx; +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-vec4.frag b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec4.frag new file mode 100644 index 000000000..12fe97132 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec4.frag @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +varying vec4 x; +void main() +{ + gl_FragColor = fwidth(x); +} diff --git a/tests/spec/oes_standard_derivatives/compiler/fwidth-vec4.vert b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec4.vert new file mode 100644 index 000000000..a646ebfc7 --- /dev/null +++ b/tests/spec/oes_standard_derivatives/compiler/fwidth-vec4.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * require_extensions: GL_OES_standard_derivatives + * [end config] + */ +#version 100 +#extension GL_OES_standard_derivatives: require + +attribute vec4 x; +void main() +{ + gl_Position = fwidth(x); +} |