[2/2] arb_bindless_texture: Add multisampled image load/store test

Submitted by Rhys Perry on July 20, 2018, 3:36 p.m.

Details

Message ID 94f63b5b755ba6837e4fd12c968b6d73bf6a9d23.1532100854.git.pendingchaos02@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Rhys Perry July 20, 2018, 3:36 p.m.
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

Patch hide | download patch | download mbox

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

Comments

MS images may not be supported. You should add a check in the
[require] section that checks that the MAX_IMAGE_SAMPLES >= 2

On Fri, Jul 20, 2018 at 11:36 AM, Rhys Perry <pendingchaos02@gmail.com> wrote:
> 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