[Piglit] [PATCH 2/7] glsl-fs-shadow2d*: move the tests into spec/glsl-1.10
Marek Olšák
maraeo at gmail.com
Mon Sep 5 14:49:02 PDT 2011
Also consolidate some of the shader code.
---
tests/shaders/glsl-fs-shadow2d-01.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-02.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-03.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-04.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-05.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-06.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-07.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-08.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-09.shader_test | 28 -----------------
tests/shaders/glsl-fs-shadow2d-bias.shader_test | 32 --------------------
tests/shaders/glsl-fs-shadow2d.frag | 8 -----
tests/shaders/glsl-fs-shadow2d.shader_test | 32 --------------------
tests/shaders/glsl-fs-shadow2d.vert | 8 -----
.../shaders/glsl-fs-shadow2dproj-bias.shader_test | 32 --------------------
tests/shaders/glsl-fs-shadow2dproj.shader_test | 32 --------------------
.../execution/samplers/glsl-fs-shadow.vert | 8 +++++
.../samplers/glsl-fs-shadow2D-01.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-02.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-03.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-04.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-05.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-06.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-07.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-08.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-09.shader_test | 28 +++++++++++++++++
.../samplers/glsl-fs-shadow2D-bias.shader_test | 26 ++++++++++++++++
.../execution/samplers/glsl-fs-shadow2D.frag | 8 +++++
.../samplers/glsl-fs-shadow2D.shader_test | 26 ++++++++++++++++
.../samplers/glsl-fs-shadow2DProj-bias.shader_test | 32 ++++++++++++++++++++
.../samplers/glsl-fs-shadow2DProj.shader_test | 32 ++++++++++++++++++++
30 files changed, 384 insertions(+), 396 deletions(-)
delete mode 100644 tests/shaders/glsl-fs-shadow2d-01.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-02.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-03.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-04.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-05.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-06.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-07.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-08.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-09.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d-bias.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d.frag
delete mode 100644 tests/shaders/glsl-fs-shadow2d.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2d.vert
delete mode 100644 tests/shaders/glsl-fs-shadow2dproj-bias.shader_test
delete mode 100644 tests/shaders/glsl-fs-shadow2dproj.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow.vert
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-01.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-02.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-03.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-04.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-05.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-06.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-07.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-08.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-09.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-bias.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.frag
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj-bias.shader_test
create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj.shader_test
diff --git a/tests/shaders/glsl-fs-shadow2d-01.shader_test b/tests/shaders/glsl-fs-shadow2d-01.shader_test
deleted file mode 100644
index f676e5d..0000000
--- a/tests/shaders/glsl-fs-shadow2d-01.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = luminance
-# - texture compare func = greater
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode luminance
-texparameter compare_func greater
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 1.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 1.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-02.shader_test b/tests/shaders/glsl-fs-shadow2d-02.shader_test
deleted file mode 100644
index 74bdd5f..0000000
--- a/tests/shaders/glsl-fs-shadow2d-02.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = luminance
-# - texture compare func = always
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode luminance
-texparameter compare_func always
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (1.0, 0.9) (1.0, 1.0, 1.0, 1.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-03.shader_test b/tests/shaders/glsl-fs-shadow2d-03.shader_test
deleted file mode 100644
index e43fa2a..0000000
--- a/tests/shaders/glsl-fs-shadow2d-03.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = luminance
-# - texture compare func = never
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode luminance
-texparameter compare_func never
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 1.0)
-relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 1.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 1.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-04.shader_test b/tests/shaders/glsl-fs-shadow2d-04.shader_test
deleted file mode 100644
index bebfa36..0000000
--- a/tests/shaders/glsl-fs-shadow2d-04.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = intensity
-# - texture compare func = greater
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode intensity
-texparameter compare_func greater
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-05.shader_test b/tests/shaders/glsl-fs-shadow2d-05.shader_test
deleted file mode 100644
index d8e1736..0000000
--- a/tests/shaders/glsl-fs-shadow2d-05.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = intensity
-# - texture compare func = always
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode intensity
-texparameter compare_func always
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (1.0, 0.9) (1.0, 1.0, 1.0, 1.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-06.shader_test b/tests/shaders/glsl-fs-shadow2d-06.shader_test
deleted file mode 100644
index d22c19d..0000000
--- a/tests/shaders/glsl-fs-shadow2d-06.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = intensity
-# - texture compare func = never
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode intensity
-texparameter compare_func never
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 0.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-07.shader_test b/tests/shaders/glsl-fs-shadow2d-07.shader_test
deleted file mode 100644
index c75e354..0000000
--- a/tests/shaders/glsl-fs-shadow2d-07.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = alpha
-# - texture compare func = greater
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode alpha
-texparameter compare_func greater
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 1.0)
-relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-08.shader_test b/tests/shaders/glsl-fs-shadow2d-08.shader_test
deleted file mode 100644
index 4918cc5..0000000
--- a/tests/shaders/glsl-fs-shadow2d-08.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = alpha
-# - texture compare func = always
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode alpha
-texparameter compare_func always
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 1.0)
-relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 1.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 1.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 1.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-09.shader_test b/tests/shaders/glsl-fs-shadow2d-09.shader_test
deleted file mode 100644
index d1c36c7..0000000
--- a/tests/shaders/glsl-fs-shadow2d-09.shader_test
+++ /dev/null
@@ -1,28 +0,0 @@
-# [description]
-# Test shadow2D(sampler2DShadow, vec3) with
-# - depth texture mode = alpha
-# - texture compare func = never
-
-[require]
-GLSL >= 1.10
-
-[vertex shader file]
-glsl-fs-shadow2d.vert
-
-[fragment shader file]
-glsl-fs-shadow2d.frag
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-texparameter depth_mode alpha
-texparameter compare_func never
-draw rect -1 -1 2 2
-
-# depth comparison pass
-relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 0.0)
-
-# depth comparison fail
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2d-bias.shader_test b/tests/shaders/glsl-fs-shadow2d-bias.shader_test
deleted file mode 100644
index e29fd58..0000000
--- a/tests/shaders/glsl-fs-shadow2d-bias.shader_test
+++ /dev/null
@@ -1,32 +0,0 @@
-[require]
-GLSL >= 1.10
-
-[vertex shader]
-varying vec4 texcoords;
-
-void main()
-{
- gl_Position = gl_Vertex;
- texcoords = (gl_Vertex + 1.0) / 2.0;
-}
-
-[fragment shader]
-varying vec4 texcoords;
-uniform sampler2DShadow tex;
-
-void main()
-{
- gl_FragColor = shadow2D(tex, texcoords.xyy, 1.0);
-}
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-draw rect -1 -1 2 2
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2d.frag b/tests/shaders/glsl-fs-shadow2d.frag
deleted file mode 100644
index 765f648..0000000
--- a/tests/shaders/glsl-fs-shadow2d.frag
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 110
-
-uniform sampler2DShadow tex;
-varying vec4 tex_coord;
-
-void main() {
- gl_FragColor = shadow2D(tex, tex_coord.xyy);
-}
diff --git a/tests/shaders/glsl-fs-shadow2d.shader_test b/tests/shaders/glsl-fs-shadow2d.shader_test
deleted file mode 100644
index 1706021..0000000
--- a/tests/shaders/glsl-fs-shadow2d.shader_test
+++ /dev/null
@@ -1,32 +0,0 @@
-[require]
-GLSL >= 1.10
-
-[vertex shader]
-varying vec4 texcoords;
-
-void main()
-{
- gl_Position = gl_Vertex;
- texcoords = (gl_Vertex + 1.0) / 2.0;
-}
-
-[fragment shader]
-varying vec4 texcoords;
-uniform sampler2DShadow tex;
-
-void main()
-{
- gl_FragColor = shadow2D(tex, texcoords.xyy);
-}
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-draw rect -1 -1 2 2
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2d.vert b/tests/shaders/glsl-fs-shadow2d.vert
deleted file mode 100644
index 426e7b7..0000000
--- a/tests/shaders/glsl-fs-shadow2d.vert
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 110
-
-varying vec4 tex_coord;
-
-void main() {
- gl_Position = gl_Vertex;
- tex_coord = (gl_Vertex + 1.0) / 2.0;
-}
diff --git a/tests/shaders/glsl-fs-shadow2dproj-bias.shader_test b/tests/shaders/glsl-fs-shadow2dproj-bias.shader_test
deleted file mode 100644
index 170cb94..0000000
--- a/tests/shaders/glsl-fs-shadow2dproj-bias.shader_test
+++ /dev/null
@@ -1,32 +0,0 @@
-[require]
-GLSL >= 1.10
-
-[vertex shader]
-varying vec4 texcoords;
-
-void main()
-{
- gl_Position = gl_Vertex;
- texcoords = gl_Vertex + 1.0;
-}
-
-[fragment shader]
-varying vec4 texcoords;
-uniform sampler2DShadow tex;
-
-void main()
-{
- gl_FragColor = shadow2DProj(tex, vec4(texcoords.xyy, 2.0), 1.0);
-}
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-draw rect -1 -1 2 2
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/shaders/glsl-fs-shadow2dproj.shader_test b/tests/shaders/glsl-fs-shadow2dproj.shader_test
deleted file mode 100644
index c84f372..0000000
--- a/tests/shaders/glsl-fs-shadow2dproj.shader_test
+++ /dev/null
@@ -1,32 +0,0 @@
-[require]
-GLSL >= 1.10
-
-[vertex shader]
-varying vec4 texcoords;
-
-void main()
-{
- gl_Position = gl_Vertex;
- texcoords = gl_Vertex + 1.0;
-}
-
-[fragment shader]
-varying vec4 texcoords;
-uniform sampler2DShadow tex;
-
-void main()
-{
- gl_FragColor = shadow2DProj(tex, vec4(texcoords.xyy, 2.0));
-}
-
-[test]
-uniform int tex 0
-texture shadow2D 0 (32, 32)
-draw rect -1 -1 2 2
-relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
-relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
-
-relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
-relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow.vert b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow.vert
new file mode 100644
index 0000000..49de642
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow.vert
@@ -0,0 +1,8 @@
+#version 110
+
+varying vec4 texcoords;
+
+void main() {
+ gl_Position = gl_Vertex;
+ texcoords = (gl_Vertex + 1.0) / 2.0;
+}
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-01.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-01.shader_test
new file mode 100644
index 0000000..c52d67f
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-01.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = luminance
+# - texture compare func = greater
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode luminance
+texparameter compare_func greater
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 1.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 1.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-02.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-02.shader_test
new file mode 100644
index 0000000..6a181d0
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-02.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = luminance
+# - texture compare func = always
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode luminance
+texparameter compare_func always
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (1.0, 0.9) (1.0, 1.0, 1.0, 1.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-03.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-03.shader_test
new file mode 100644
index 0000000..d386006
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-03.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = luminance
+# - texture compare func = never
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode luminance
+texparameter compare_func never
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 1.0)
+relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 1.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 1.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-04.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-04.shader_test
new file mode 100644
index 0000000..10c734c
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-04.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = intensity
+# - texture compare func = greater
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode intensity
+texparameter compare_func greater
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-05.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-05.shader_test
new file mode 100644
index 0000000..b1076e0
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-05.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = intensity
+# - texture compare func = always
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode intensity
+texparameter compare_func always
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (1.0, 0.9) (1.0, 1.0, 1.0, 1.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-06.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-06.shader_test
new file mode 100644
index 0000000..cc669b9
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-06.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = intensity
+# - texture compare func = never
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode intensity
+texparameter compare_func never
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 0.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-07.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-07.shader_test
new file mode 100644
index 0000000..1dab5af
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-07.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = alpha
+# - texture compare func = greater
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode alpha
+texparameter compare_func greater
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 1.0)
+relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-08.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-08.shader_test
new file mode 100644
index 0000000..5ec453a
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-08.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = alpha
+# - texture compare func = always
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode alpha
+texparameter compare_func always
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 1.0)
+relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 1.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 1.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 1.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-09.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-09.shader_test
new file mode 100644
index 0000000..2b70af8
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-09.shader_test
@@ -0,0 +1,28 @@
+# [description]
+# Test shadow2D(sampler2DShadow, vec3) with
+# - depth texture mode = alpha
+# - texture compare func = never
+
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader file]
+glsl-fs-shadow2D.frag
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+texparameter depth_mode alpha
+texparameter compare_func never
+draw rect -1 -1 2 2
+
+# depth comparison pass
+relative probe rgba (0.0, 0.1) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (0.9, 1.0) (0.0, 0.0, 0.0, 0.0)
+
+# depth comparison fail
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-bias.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-bias.shader_test
new file mode 100644
index 0000000..572f4d5
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-bias.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader]
+varying vec4 texcoords;
+uniform sampler2DShadow tex;
+
+void main()
+{
+ gl_FragColor = shadow2D(tex, texcoords.xyy, 1.0);
+}
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+draw rect -1 -1 2 2
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.frag b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.frag
new file mode 100644
index 0000000..ab1babe
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.frag
@@ -0,0 +1,8 @@
+#version 110
+
+uniform sampler2DShadow tex;
+varying vec4 texcoords;
+
+void main() {
+ gl_FragColor = shadow2D(tex, texcoords.xyy);
+}
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.shader_test
new file mode 100644
index 0000000..cf35406
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader file]
+glsl-fs-shadow.vert
+
+[fragment shader]
+varying vec4 texcoords;
+uniform sampler2DShadow tex;
+
+void main()
+{
+ gl_FragColor = shadow2D(tex, texcoords.xyy);
+}
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+draw rect -1 -1 2 2
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj-bias.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj-bias.shader_test
new file mode 100644
index 0000000..170cb94
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj-bias.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+varying vec4 texcoords;
+
+void main()
+{
+ gl_Position = gl_Vertex;
+ texcoords = gl_Vertex + 1.0;
+}
+
+[fragment shader]
+varying vec4 texcoords;
+uniform sampler2DShadow tex;
+
+void main()
+{
+ gl_FragColor = shadow2DProj(tex, vec4(texcoords.xyy, 2.0), 1.0);
+}
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+draw rect -1 -1 2 2
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj.shader_test
new file mode 100644
index 0000000..c84f372
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2DProj.shader_test
@@ -0,0 +1,32 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+varying vec4 texcoords;
+
+void main()
+{
+ gl_Position = gl_Vertex;
+ texcoords = gl_Vertex + 1.0;
+}
+
+[fragment shader]
+varying vec4 texcoords;
+uniform sampler2DShadow tex;
+
+void main()
+{
+ gl_FragColor = shadow2DProj(tex, vec4(texcoords.xyy, 2.0));
+}
+
+[test]
+uniform int tex 0
+texture shadow2D 0 (32, 32)
+draw rect -1 -1 2 2
+relative probe rgba (0.0, 0.1) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.0, 1.0) (1.0, 1.0, 1.0, 1.0)
+relative probe rgba (0.9, 1.0) (1.0, 1.0, 1.0, 1.0)
+
+relative probe rgba (0.1, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.0) (0.0, 0.0, 0.0, 0.0)
+relative probe rgba (1.0, 0.9) (0.0, 0.0, 0.0, 0.0)
--
1.7.4.1
More information about the Piglit
mailing list