Re: [Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points

2017-03-13 Thread Andres Gomez
On Tue, 2017-03-07 at 13:20 -0800, Francisco Jerez wrote:
> Andres Gomez  writes:
> 
> > This adds a test to check that a link error is expected when
> > specifying different binding points among compilation units for atomic
> > counters with the same name.
> > 
> > From the ARB_shader_atomic_counters spec:
> > 
> >   " It is legal for some shaders to provide a layout qualifier for a
> > uniform variable of the same name, while another shader does not
> > provide a layout qualifier for a uniform variable of the same
> > name, but if provided, all provided layout qualifiers must be
> > equal for a uniform variable of the same name, and if not
> > provided, all implicitly provided layout qualifiers must be equal
> > for a uniform variable of the same name."
> > 
> > v2: Added GL minimum version restriction.
> > 
> > Signed-off-by: Andres Gomez 
> > Cc: Francisco Jerez 
> > Cc: Ian Romanick 
> > ---
> >  .../different-bindings-atomic-counter.shader_test  | 51 
> > ++
> >  1 file changed, 51 insertions(+)
> >  create mode 100644 
> > tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
> > 
> > diff --git 
> > a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
> >  
> > b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
> > new file mode 100644
> > index 0..b331650cc
> > --- /dev/null
> > +++ 
> > b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
> > @@ -0,0 +1,51 @@
> > +/* The ARB_shader_atomic_counters says:
> > + *
> > + * "It is legal for some shaders to provide a layout qualifier for
> > + *  a uniform variable of the same name, while another shader does
> > + *  not provide a layout qualifier for a uniform variable of the
> > + *  same name, but if provided, all provided layout qualifiers
> > + *  must be equal for a uniform variable of the same name, and if
> > + *  not provided, all implicitly provided layout qualifiers must
> > + *  be equal for a uniform variable of the same name."
> > + *
> > + * Verify that a link error happens when using different binding
> > + * points for an atomic counter with the same name in different
> > + * compilation units.
> > + */
> > +
> > +[require]
> > +GL >= 3.00
> 
> The GL version specification seems inconsistent with the GLSL version
> specified below, I think you want to ask for 3.1 here, with that fixed:

Thanks!

Updated and pushed ☺

-- 
Br,

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


Re: [Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points

2017-03-07 Thread Francisco Jerez
Andres Gomez  writes:

> This adds a test to check that a link error is expected when
> specifying different binding points among compilation units for atomic
> counters with the same name.
>
> From the ARB_shader_atomic_counters spec:
>
>   " It is legal for some shaders to provide a layout qualifier for a
> uniform variable of the same name, while another shader does not
> provide a layout qualifier for a uniform variable of the same
> name, but if provided, all provided layout qualifiers must be
> equal for a uniform variable of the same name, and if not
> provided, all implicitly provided layout qualifiers must be equal
> for a uniform variable of the same name."
>
> v2: Added GL minimum version restriction.
>
> Signed-off-by: Andres Gomez 
> Cc: Francisco Jerez 
> Cc: Ian Romanick 
> ---
>  .../different-bindings-atomic-counter.shader_test  | 51 
> ++
>  1 file changed, 51 insertions(+)
>  create mode 100644 
> tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
>
> diff --git 
> a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
>  
> b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
> new file mode 100644
> index 0..b331650cc
> --- /dev/null
> +++ 
> b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
> @@ -0,0 +1,51 @@
> +/* The ARB_shader_atomic_counters says:
> + *
> + * "It is legal for some shaders to provide a layout qualifier for
> + *  a uniform variable of the same name, while another shader does
> + *  not provide a layout qualifier for a uniform variable of the
> + *  same name, but if provided, all provided layout qualifiers
> + *  must be equal for a uniform variable of the same name, and if
> + *  not provided, all implicitly provided layout qualifiers must
> + *  be equal for a uniform variable of the same name."
> + *
> + * Verify that a link error happens when using different binding
> + * points for an atomic counter with the same name in different
> + * compilation units.
> + */
> +
> +[require]
> +GL >= 3.00

The GL version specification seems inconsistent with the GLSL version
specified below, I think you want to ask for 3.1 here, with that fixed:

Reviewed-by: Francisco Jerez 

> +GLSL >= 1.40
> +GL_ARB_shader_atomic_counters
> +
> +[vertex shader]
> +#version 140
> +#extension GL_ARB_shader_atomic_counters: require
> +
> +layout (binding = 0) uniform atomic_uint x;
> +
> +in vec4 piglit_vertex;
> +out vec4 vs_fs;
> +
> +void main()
> +{
> + vs_fs = vec4(atomicCounter(x));
> + gl_Position = piglit_vertex;
> +}
> +
> +[fragment shader]
> +#version 140
> +#extension GL_ARB_shader_atomic_counters: require
> +
> +layout (binding = 1) uniform atomic_uint x;
> +
> +in  vec4 vs_fs;
> +out vec4 fs_out;
> +
> +void main()
> +{
> + fs_out = vs_fs * atomicCounter(x);
> +}
> +
> +[test]
> +link error
> -- 
> 2.11.0


signature.asc
Description: PGP signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points

2017-02-23 Thread Andres Gomez
This adds a test to check that a link error is expected when
specifying different binding points among compilation units for atomic
counters with the same name.

From the ARB_shader_atomic_counters spec:

  " It is legal for some shaders to provide a layout qualifier for a
uniform variable of the same name, while another shader does not
provide a layout qualifier for a uniform variable of the same
name, but if provided, all provided layout qualifiers must be
equal for a uniform variable of the same name, and if not
provided, all implicitly provided layout qualifiers must be equal
for a uniform variable of the same name."

v2: Added GL minimum version restriction.

Signed-off-by: Andres Gomez 
Cc: Francisco Jerez 
Cc: Ian Romanick 
---
 .../different-bindings-atomic-counter.shader_test  | 51 ++
 1 file changed, 51 insertions(+)
 create mode 100644 
tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test

diff --git 
a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
 
b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
new file mode 100644
index 0..b331650cc
--- /dev/null
+++ 
b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
@@ -0,0 +1,51 @@
+/* The ARB_shader_atomic_counters says:
+ *
+ * "It is legal for some shaders to provide a layout qualifier for
+ *  a uniform variable of the same name, while another shader does
+ *  not provide a layout qualifier for a uniform variable of the
+ *  same name, but if provided, all provided layout qualifiers
+ *  must be equal for a uniform variable of the same name, and if
+ *  not provided, all implicitly provided layout qualifiers must
+ *  be equal for a uniform variable of the same name."
+ *
+ * Verify that a link error happens when using different binding
+ * points for an atomic counter with the same name in different
+ * compilation units.
+ */
+
+[require]
+GL >= 3.00
+GLSL >= 1.40
+GL_ARB_shader_atomic_counters
+
+[vertex shader]
+#version 140
+#extension GL_ARB_shader_atomic_counters: require
+
+layout (binding = 0) uniform atomic_uint x;
+
+in vec4 piglit_vertex;
+out vec4 vs_fs;
+
+void main()
+{
+   vs_fs = vec4(atomicCounter(x));
+   gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_shader_atomic_counters: require
+
+layout (binding = 1) uniform atomic_uint x;
+
+in  vec4 vs_fs;
+out vec4 fs_out;
+
+void main()
+{
+   fs_out = vs_fs * atomicCounter(x);
+}
+
+[test]
+link error
-- 
2.11.0

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


[Piglit] [PATCH 2/2] arb_shader_atomic_counters: check different binding points

2017-02-08 Thread Andres Gomez
This adds a test to check that a link error is expected when
specifying different binding points among compilation units for atomic
counters with the same name.

From the ARB_shader_atomic_counters spec:

  " It is legal for some shaders to provide a layout qualifier for a
uniform variable of the same name, while another shader does not
provide a layout qualifier for a uniform variable of the same
name, but if provided, all provided layout qualifiers must be
equal for a uniform variable of the same name, and if not
provided, all implicitly provided layout qualifiers must be equal
for a uniform variable of the same name."

Signed-off-by: Andres Gomez 
Cc: Francisco Jerez 
Cc: Kenneth Graunke 
---
 .../different-bindings-atomic-counter.shader_test  | 50 ++
 1 file changed, 50 insertions(+)
 create mode 100644 
tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test

diff --git 
a/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
 
b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
new file mode 100644
index 0..6e7c77488
--- /dev/null
+++ 
b/tests/spec/arb_shader_atomic_counters/linker/different-bindings-atomic-counter.shader_test
@@ -0,0 +1,50 @@
+/* The ARB_shader_atomic_counters says:
+ *
+ * "It is legal for some shaders to provide a layout qualifier for
+ *  a uniform variable of the same name, while another shader does
+ *  not provide a layout qualifier for a uniform variable of the
+ *  same name, but if provided, all provided layout qualifiers
+ *  must be equal for a uniform variable of the same name, and if
+ *  not provided, all implicitly provided layout qualifiers must
+ *  be equal for a uniform variable of the same name."
+ *
+ * Verify that a link error happens when using different binding
+ * points for an atomic counter with the same name in different
+ * compilation units.
+ */
+
+[require]
+GLSL >= 1.40
+GL_ARB_shader_atomic_counters
+
+[vertex shader]
+#version 140
+#extension GL_ARB_shader_atomic_counters: require
+
+layout (binding = 0) uniform atomic_uint x;
+
+in vec4 piglit_vertex;
+out vec4 vs_fs;
+
+void main()
+{
+   vs_fs = vec4(atomicCounter(x));
+   gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_shader_atomic_counters: require
+
+layout (binding = 1) uniform atomic_uint x;
+
+in  vec4 vs_fs;
+out vec4 fs_out;
+
+void main()
+{
+   fs_out = vs_fs * atomicCounter(x);
+}
+
+[test]
+link error
-- 
2.11.0

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