[Piglit] [PATCH 10/13] nv_shader_atomic_float: Compile tests for all imageAtomic variants

Ian Romanick idr at freedesktop.org
Fri Jun 1 22:43:15 UTC 2018


From: Ian Romanick <ian.d.romanick at intel.com>

Verify all versions of imageAtomicAdd and imageAtomicExchnage exist.
"Positive" compile testing for all the other functions will be handled
by the execution tests.  I'm much too lazy to write execution tests for
all the variants of imageAtomicAdd and imageAtomicExchange.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../compiler/imageAtomicAdd-float-image1D.frag         | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image1DArray.frag    | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image2D.frag         | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image2DArray.frag    | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image2DMS.frag       | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image2DMSArray.frag  | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image2DRect.frag     | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-image3D.frag         | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-imageBuffer.frag     | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-imageCube.frag       | 18 ++++++++++++++++++
 .../compiler/imageAtomicAdd-float-imageCubeArray.frag  | 18 ++++++++++++++++++
 .../compiler/imageAtomicExchange-float-image1D.frag    | 18 ++++++++++++++++++
 .../imageAtomicExchange-float-image1DArray.frag        | 18 ++++++++++++++++++
 .../compiler/imageAtomicExchange-float-image2D.frag    | 18 ++++++++++++++++++
 .../imageAtomicExchange-float-image2DArray.frag        | 18 ++++++++++++++++++
 .../compiler/imageAtomicExchange-float-image2DMS.frag  | 18 ++++++++++++++++++
 .../imageAtomicExchange-float-image2DMSArray.frag      | 18 ++++++++++++++++++
 .../imageAtomicExchange-float-image2DRect.frag         | 18 ++++++++++++++++++
 .../compiler/imageAtomicExchange-float-image3D.frag    | 18 ++++++++++++++++++
 .../imageAtomicExchange-float-imageBuffer.frag         | 18 ++++++++++++++++++
 .../compiler/imageAtomicExchange-float-imageCube.frag  | 18 ++++++++++++++++++
 .../imageAtomicExchange-float-imageCubeArray.frag      | 18 ++++++++++++++++++
 22 files changed, 396 insertions(+)
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1D.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1DArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2D.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMS.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMSArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DRect.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image3D.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageBuffer.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCube.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCubeArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1D.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1DArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2D.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMS.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMSArray.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DRect.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image3D.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageBuffer.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCube.frag
 create mode 100644 tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCubeArray.frag

diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1D.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1D.frag
new file mode 100644
index 000000000..82db0d993
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1D.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image1D img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, int(gl_FragCoord.x), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1DArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1DArray.frag
new file mode 100644
index 000000000..673ba02c6
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image1DArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image1DArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec2(gl_FragCoord.xy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2D.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2D.frag
new file mode 100644
index 000000000..0a0d2f93a
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2D.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2D img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec2(gl_FragCoord.xy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DArray.frag
new file mode 100644
index 000000000..2de8a33ec
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec3(gl_FragCoord.xyy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMS.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMS.frag
new file mode 100644
index 000000000..06d2c5a1f
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMS.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DMS img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec2(gl_FragCoord.xy), int(gl_FragCoord.y), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMSArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMSArray.frag
new file mode 100644
index 000000000..773cee74b
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DMSArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DMSArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec3(gl_FragCoord.xyx), int(gl_FragCoord.y), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DRect.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DRect.frag
new file mode 100644
index 000000000..383890309
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image2DRect.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DRect img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec2(gl_FragCoord.xy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image3D.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image3D.frag
new file mode 100644
index 000000000..a21c69699
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-image3D.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image3D img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec3(gl_FragCoord.xyx), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageBuffer.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageBuffer.frag
new file mode 100644
index 000000000..5b7e97760
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageBuffer.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform imageBuffer img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, int(gl_FragCoord.y), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCube.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCube.frag
new file mode 100644
index 000000000..49e27349b
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCube.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform imageCube img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec3(gl_FragCoord.xyx), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCubeArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCubeArray.frag
new file mode 100644
index 000000000..7d627f24e
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicAdd-float-imageCubeArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform imageCubeArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicAdd(img, ivec3(gl_FragCoord.xyx), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1D.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1D.frag
new file mode 100644
index 000000000..741af46b6
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1D.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image1D img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, int(gl_FragCoord.x), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1DArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1DArray.frag
new file mode 100644
index 000000000..b28f3bead
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image1DArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image1DArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec2(gl_FragCoord.xy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2D.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2D.frag
new file mode 100644
index 000000000..f378c21eb
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2D.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2D img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec2(gl_FragCoord.xy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DArray.frag
new file mode 100644
index 000000000..1aab4de37
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec3(gl_FragCoord.xyy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMS.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMS.frag
new file mode 100644
index 000000000..678a85bb9
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMS.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DMS img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec2(gl_FragCoord.xy), int(gl_FragCoord.y), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMSArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMSArray.frag
new file mode 100644
index 000000000..d7377731d
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DMSArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DMSArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec3(gl_FragCoord.xyx), int(gl_FragCoord.y), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DRect.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DRect.frag
new file mode 100644
index 000000000..eb6ffd056
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image2DRect.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image2DRect img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec2(gl_FragCoord.xy), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image3D.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image3D.frag
new file mode 100644
index 000000000..65a69b022
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-image3D.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform image3D img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec3(gl_FragCoord.xyx), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageBuffer.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageBuffer.frag
new file mode 100644
index 000000000..584477f2a
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageBuffer.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform imageBuffer img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, int(gl_FragCoord.y), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCube.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCube.frag
new file mode 100644
index 000000000..043db638e
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCube.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform imageCube img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec3(gl_FragCoord.xyx), v));
+}
diff --git a/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCubeArray.frag b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCubeArray.frag
new file mode 100644
index 000000000..d873fbbef
--- /dev/null
+++ b/tests/spec/nv_shader_atomic_float/compiler/imageAtomicExchange-float-imageCubeArray.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_NV_shader_atomic_float GL_ARB_shader_image_load_store
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_NV_shader_atomic_float: require
+
+layout(r32f) uniform imageCubeArray img;
+uniform float v;
+out vec4 color;
+
+void main()
+{
+        color = vec4(imageAtomicExchange(img, ivec3(gl_FragCoord.xyx), v));
+}
-- 
2.14.4



More information about the Piglit mailing list