arb_shader_texture_image_samples: add tests for all variants

Submitted by Ilia Mirkin on Aug. 31, 2015, 10:06 p.m.

Details

Message ID 1441058792-28936-1-git-send-email-imirkin@alum.mit.edu
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Ilia Mirkin Aug. 31, 2015, 10:06 p.m.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
 .../compiler/fs-image-samples.frag                 | 30 ++++++++++++++++++++++
 .../compiler/fs-texture-samples.frag               | 29 +++++++++++++++++++++
 .../compiler/vs-texture-samples.vert               | 29 +++++++++++++++++++++
 3 files changed, 88 insertions(+)
 create mode 100644 tests/spec/arb_shader_texture_image_samples/compiler/fs-image-samples.frag
 create mode 100644 tests/spec/arb_shader_texture_image_samples/compiler/fs-texture-samples.frag
 create mode 100644 tests/spec/arb_shader_texture_image_samples/compiler/vs-texture-samples.vert

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_shader_texture_image_samples/compiler/fs-image-samples.frag b/tests/spec/arb_shader_texture_image_samples/compiler/fs-image-samples.frag
new file mode 100644
index 0000000..620183f
--- /dev/null
+++ b/tests/spec/arb_shader_texture_image_samples/compiler/fs-image-samples.frag
@@ -0,0 +1,30 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_image_load_store GL_ARB_shader_texture_image_samples
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_image_load_store: require
+#extension GL_ARB_shader_texture_image_samples: require
+
+writeonly uniform image2DMS i2D;
+writeonly uniform image2DMSArray i2DArray;
+writeonly uniform iimage2DMS ii2D;
+writeonly uniform iimage2DMSArray ii2DArray;
+writeonly uniform uimage2DMS ui2D;
+writeonly uniform uimage2DMSArray ui2DArray;
+
+void main()
+{
+	int res = 0;
+
+	res += imageSamples(i2D);
+	res += imageSamples(i2DArray);
+	res += imageSamples(ii2D);
+	res += imageSamples(ii2DArray);
+	res += imageSamples(ui2D);
+	res += imageSamples(ui2DArray);
+
+	gl_FragColor = vec4(float(res) / 256.0);
+}
diff --git a/tests/spec/arb_shader_texture_image_samples/compiler/fs-texture-samples.frag b/tests/spec/arb_shader_texture_image_samples/compiler/fs-texture-samples.frag
new file mode 100644
index 0000000..8ec179a
--- /dev/null
+++ b/tests/spec/arb_shader_texture_image_samples/compiler/fs-texture-samples.frag
@@ -0,0 +1,29 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_texture_image_samples
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_texture_image_samples: require
+
+uniform sampler2DMS s2D;
+uniform sampler2DMSArray s2DArray;
+uniform isampler2DMS is2D;
+uniform isampler2DMSArray is2DArray;
+uniform usampler2DMS us2D;
+uniform usampler2DMSArray us2DArray;
+
+void main()
+{
+	int res = 0;
+
+	res += textureSamples(s2D);
+	res += textureSamples(s2DArray);
+	res += textureSamples(is2D);
+	res += textureSamples(is2DArray);
+	res += textureSamples(us2D);
+	res += textureSamples(us2DArray);
+
+	gl_FragColor = vec4(float(res) / 256.0);
+}
diff --git a/tests/spec/arb_shader_texture_image_samples/compiler/vs-texture-samples.vert b/tests/spec/arb_shader_texture_image_samples/compiler/vs-texture-samples.vert
new file mode 100644
index 0000000..fb2e746
--- /dev/null
+++ b/tests/spec/arb_shader_texture_image_samples/compiler/vs-texture-samples.vert
@@ -0,0 +1,29 @@ 
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_texture_image_samples
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_texture_image_samples: require
+
+uniform sampler2DMS s2D;
+uniform sampler2DMSArray s2DArray;
+uniform isampler2DMS is2D;
+uniform isampler2DMSArray is2DArray;
+uniform usampler2DMS us2D;
+uniform usampler2DMSArray us2DArray;
+
+void main()
+{
+	int res = 0;
+
+	res += textureSamples(s2D);
+	res += textureSamples(s2DArray);
+	res += textureSamples(is2D);
+	res += textureSamples(is2DArray);
+	res += textureSamples(us2D);
+	res += textureSamples(us2DArray);
+
+	gl_Position = vec4(float(res) / 256.0);
+}