Exercises a nouveau bug on Maxwell+.
---
 .../images/basic-imageStore-ms.shader_test         | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 
tests/spec/arb_bindless_texture/execution/images/basic-imageStore-ms.shader_test

diff --git 
a/tests/spec/arb_bindless_texture/execution/images/basic-imageStore-ms.shader_test
 
b/tests/spec/arb_bindless_texture/execution/images/basic-imageStore-ms.shader_test
new file mode 100644
index 000000000..8d0f0e40d
--- /dev/null
+++ 
b/tests/spec/arb_bindless_texture/execution/images/basic-imageStore-ms.shader_test
@@ -0,0 +1,50 @@
+# In this test, just perform an image store with a multisampled resident
+# texture image.
+# Based on arb_shader_image_load_store/execution/basic-imageStore.shader_test
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+GL_ARB_shader_image_load_store
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+uniform vec4 color;
+layout (bindless_image) writeonly uniform image2DMS tex;
+out vec4 outcolor;
+
+void main()
+{
+       imageStore(tex, ivec2(gl_FragCoord.xy), 0, color);
+       imageStore(tex, ivec2(gl_FragCoord.xy), 1, color);
+       outcolor = vec4(0.0, 0.0, 0.0, 1.0);
+}
+
+[test]
+# Texture 0 is the imageStore output.
+texture junk 2DMS 0 (16, 16, 2)
+resident image texture 0 GL_RGBA8
+uniform handle tex 0
+
+# Texture 1 is the rendering output and blit destination.
+texture rgbw 1 (16, 16) GL_RGBA8
+
+# Store red using imageStore
+uniform vec4 color 1.0 0.0 0.0 1.0
+fb tex 2d 1
+draw rect -1 -1 2 2
+
+# Resolve the result of imageStore into a probeable texture
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
+fb read tex 2d ms 0
+fb draw tex 2d 1
+blit color linear
+
+# Test the result of the blit
+fb tex 2d 1
+probe all rgba 1.0 0.0 0.0 1.0
-- 
2.14.4

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to