Re: [Piglit] [PATCH v2] winsys-framework Default to showing window

2015-11-19 Thread Martin Peres


On 17/11/15 22:01, Dave Airlie wrote:

On 18 November 2015 at 05:49, Arthur Huillet  wrote:

Thanks :)

Reviewed by: Arthur Huillet 

Reviewed-by: Dave Airlie 


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


Re: [Piglit] [PATCH 4/4] ext_shader_samples_identical: Simple fragment shader rendering test

2015-11-19 Thread Neil Roberts
Ian Romanick  writes:

> +# Group EXT_shader_samples_identical
> +with profile.group_manager(
> +PiglitGLTest,
> +grouptools.join('spec', 'EXT_shader_samples_identical')) as g:
> +g(['ext_shader_samples_identical', '2'])
> +g(['ext_shader_samples_identical', '4'])
> +g(['ext_shader_samples_identical', '8'])
> +g(['ext_shader_samples_identical', '16'])

It might be nice to iterate over MSAA_SAMPLE_COUNTS instead of
hardcoding the sample counts.

> + glUseProgram(draw_prog);
> + glVertexAttribPointer(PIGLIT_ATTRIB_POS, 2, GL_FLOAT,
> +   GL_FALSE, 0, tri_verts);
> + glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
> + glDrawArrays(GL_TRIANGLES, 0, 3);
> + glDisableVertexAttribArray(PIGLIT_ATTRIB_POS);

It could be good to use piglit_draw_rect_from_arrays here and maybe draw
a diamond shape or something instead of a triangle. That way it would be
less code and it would be easier to port to a core profile because it
wouldn't rely on being able to skip using a VBO and VAO. It should just
work because you are using the standard Piglit names for your
attributes.

> + glVertexAttribPointer(PIGLIT_ATTRIB_POS, 2, GL_FLOAT,
> +   GL_FALSE, 0, quad_verts);
> + glVertexAttribPointer(PIGLIT_ATTRIB_TEX, 2, GL_FLOAT,
> +   GL_FALSE, 0, quad_texcoords);
> + glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
> + glEnableVertexAttribArray(PIGLIT_ATTRIB_TEX);
> + glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
> + glDisableVertexAttribArray(PIGLIT_ATTRIB_POS);
> + glDisableVertexAttribArray(PIGLIT_ATTRIB_TEX);

Same here, I think it could be good to use piglit_draw_rect_tex.

Otherwise seems like a neat test.

Regards,
- Neil
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] arb_shader_storage_buffer_object: Test copying a large SSBO item

2015-11-19 Thread Ian Romanick
On 11/19/2015 05:23 PM, Jordan Justen wrote:
> Signed-off-by: Jordan Justen 
> Cc: Kristian Høgsberg 
> Cc: Samuel Iglesias Gonsalvez 
> Cc: Iago Toral Quiroga 
> ---
>  This fails to link on i965.
> 
>  .../execution/large-field-copy.shader_test | 66 
> ++
>  1 file changed, 66 insertions(+)
>  create mode 100644 
> tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
> 
> diff --git 
> a/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
>  
> b/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
> new file mode 100644
> index 000..a949507
> --- /dev/null
> +++ 
> b/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
> @@ -0,0 +1,66 @@
> +# Test that a 'large' field of an SSBO can be copied.
> +
> +[require]
> +GL >= 3.3
> +GLSL >= 3.30
> +GL_ARB_shader_storage_buffer_object
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 330
> +#extension GL_ARB_shader_storage_buffer_object: require
> +
> +#define SIZE 16
> +
> +layout (std430) buffer SSBO {
> +mat4 m1[SIZE];
> +mat4 m2[SIZE];
> +};
> +
> +out vec4 color;
> +
> +uniform uint mode;
> +
> +void main() {
> +bool pass = true;
> +int i;
> +
> +switch (mode) {
> +case 0u:
> +for (i = 0; i < SIZE; i++) {
> + m1[i] = mat4(vec4(i + 0), vec4(i + 1),
> +  vec4(i + 2), vec4(i + 3));
> + }
> + break;
> +case 1u:
> +m2 = m1;

Weird indentation.  Actually... I think this is the only line that's
right.  Everywhere else mixes tabs and space.  What is the standard in
piglit shaders these days anyway?

> + break;
> +case 2u:
> +for (i = 0; i < SIZE; i++) {
> + pass = pass && (m2[i] == mat4(vec4(i + 0), vec4(i + 1),
> +   vec4(i + 2), vec4(i + 3)));
> + }
> + break;
> +}
> +
> +if (pass)
> +color = vec4(0.0, 1.0, 0.0, 1.0);
> +else
> +color = vec4(1.0, 0.0, 0.0, 1.0);
> +}
> +
> +[test]
> +ssbo 2048
> +
> +uniform uint mode 0
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
> +
> +uniform uint mode 1
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
> +
> +uniform uint mode 2
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0

I prefer it if all results are visible at once.  If there was a pixel
wrong in the first subtest, the other subtests overwrite it.  That makes
it more annoying to debug.

Uh... wait... hmm.  This is probably okay, but I think the first two
passes should write a different color.  There should also be some
comments that explain that the first two passes only exist to get data
in the SSBO.  Why bother probing their result?

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


[Piglit] [PATCH] arb_shader_storage_buffer_object: Test copying a large SSBO item

2015-11-19 Thread Jordan Justen
Signed-off-by: Jordan Justen 
Cc: Kristian Høgsberg 
Cc: Samuel Iglesias Gonsalvez 
Cc: Iago Toral Quiroga 
---
 This fails to link on i965.

 .../execution/large-field-copy.shader_test | 66 ++
 1 file changed, 66 insertions(+)
 create mode 100644 
tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test

diff --git 
a/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
new file mode 100644
index 000..a949507
--- /dev/null
+++ 
b/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
@@ -0,0 +1,66 @@
+# Test that a 'large' field of an SSBO can be copied.
+
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_shader_storage_buffer_object
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 330
+#extension GL_ARB_shader_storage_buffer_object: require
+
+#define SIZE 16
+
+layout (std430) buffer SSBO {
+mat4 m1[SIZE];
+mat4 m2[SIZE];
+};
+
+out vec4 color;
+
+uniform uint mode;
+
+void main() {
+bool pass = true;
+int i;
+
+switch (mode) {
+case 0u:
+for (i = 0; i < SIZE; i++) {
+   m1[i] = mat4(vec4(i + 0), vec4(i + 1),
+vec4(i + 2), vec4(i + 3));
+   }
+   break;
+case 1u:
+m2 = m1;
+   break;
+case 2u:
+for (i = 0; i < SIZE; i++) {
+   pass = pass && (m2[i] == mat4(vec4(i + 0), vec4(i + 1),
+ vec4(i + 2), vec4(i + 3)));
+   }
+   break;
+}
+
+if (pass)
+color = vec4(0.0, 1.0, 0.0, 1.0);
+else
+color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[test]
+ssbo 2048
+
+uniform uint mode 0
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uint mode 1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform uint mode 2
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.6.2

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


Re: [Piglit] [PATCH 4/4] ext_shader_samples_identical: Simple fragment shader rendering test

2015-11-19 Thread Ian Romanick
On 11/19/2015 09:59 AM, Neil Roberts wrote:
> Ian Romanick  writes:
> 
>> +# Group EXT_shader_samples_identical
>> +with profile.group_manager(
>> +PiglitGLTest,
>> +grouptools.join('spec', 'EXT_shader_samples_identical')) as g:
>> +g(['ext_shader_samples_identical', '2'])
>> +g(['ext_shader_samples_identical', '4'])
>> +g(['ext_shader_samples_identical', '8'])
>> +g(['ext_shader_samples_identical', '16'])
> 
> It might be nice to iterate over MSAA_SAMPLE_COUNTS instead of
> hardcoding the sample counts.

There are a couple other places in all.py that use a hardcoded list.
I'll change those two.

>> +glUseProgram(draw_prog);
>> +glVertexAttribPointer(PIGLIT_ATTRIB_POS, 2, GL_FLOAT,
>> +  GL_FALSE, 0, tri_verts);
>> +glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
>> +glDrawArrays(GL_TRIANGLES, 0, 3);
>> +glDisableVertexAttribArray(PIGLIT_ATTRIB_POS);
> 
> It could be good to use piglit_draw_rect_from_arrays here and maybe draw
> a diamond shape or something instead of a triangle. That way it would be
> less code and it would be easier to port to a core profile because it
> wouldn't rely on being able to skip using a VBO and VAO. It should just
> work because you are using the standard Piglit names for your
> attributes.

Yeah, that's a good suggestion.  This is part of the "Much code borrowed
from tests/spec/arb_texture_multisample/texelfetch.c." :)  I'll change
the arb_texture_multisample test too.

I'll have v2 out in a couple hours.

>> +glVertexAttribPointer(PIGLIT_ATTRIB_POS, 2, GL_FLOAT,
>> +  GL_FALSE, 0, quad_verts);
>> +glVertexAttribPointer(PIGLIT_ATTRIB_TEX, 2, GL_FLOAT,
>> +  GL_FALSE, 0, quad_texcoords);
>> +glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
>> +glEnableVertexAttribArray(PIGLIT_ATTRIB_TEX);
>> +glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
>> +glDisableVertexAttribArray(PIGLIT_ATTRIB_POS);
>> +glDisableVertexAttribArray(PIGLIT_ATTRIB_TEX);
> 
> Same here, I think it could be good to use piglit_draw_rect_tex.
> 
> Otherwise seems like a neat test.
> 
> Regards,
> - Neil
> 

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


[Piglit] [PATCH 8/9] ext_shader_samples_identical: Verify that every function overload exists

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

Signed-off-by: Ian Romanick 
---
 .../glsl-1.10/compiler/all-functions.frag  | 21 +
 .../glsl-1.10/compiler/all-functions.vert  | 21 +
 .../glsl-1.50/compiler/all-functions.frag  | 30 +++
 .../glsl-1.50/compiler/all-functions.geom  | 34 ++
 .../glsl-1.50/compiler/all-functions.vert  | 32 
 .../glsl-es-3.10/compiler/all-functions.frag   | 31 
 .../glsl-es-3.10/compiler/all-functions.vert   | 32 
 7 files changed, 201 insertions(+)
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.frag
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.vert
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.frag
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.geom
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.vert
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-es-3.10/compiler/all-functions.frag
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-es-3.10/compiler/all-functions.vert

diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.frag 
b/tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.frag
new file mode 100644
index 000..7b81832
--- /dev/null
+++ 
b/tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.frag
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_texture_multisample 
GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_ARB_texture_multisample: require
+#extension GL_EXT_shader_samples_identical: require
+
+uniform sampler2DMS s1;
+uniform sampler2DMSArray s4;
+
+void main()
+{
+   const ivec2 p2 = ivec2(10, 10);
+   const ivec3 p3 = ivec3(15, 11, 0);
+
+   gl_FragColor = vec4(float(textureSamplesIdenticalEXT(s1, p2)),
+   float(textureSamplesIdenticalEXT(s4, p3)),
+   0.0, 1.0);
+}
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.vert 
b/tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.vert
new file mode 100644
index 000..739a4df
--- /dev/null
+++ 
b/tests/spec/ext_shader_samples_identical/glsl-1.10/compiler/all-functions.vert
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_texture_multisample 
GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_ARB_texture_multisample: require
+#extension GL_EXT_shader_samples_identical: require
+
+uniform sampler2DMS s1;
+uniform sampler2DMSArray s4;
+
+void main()
+{
+   const ivec2 p2 = ivec2(10, 10);
+   const ivec3 p3 = ivec3(15, 11, 0);
+
+   gl_Position = vec4(float(textureSamplesIdenticalEXT(s1, p2)),
+  float(textureSamplesIdenticalEXT(s4, p3)),
+  0.0, 1.0);
+}
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.frag 
b/tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.frag
new file mode 100644
index 000..ede552c
--- /dev/null
+++ 
b/tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.frag
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_EXT_shader_samples_identical
+// [end config]
+
+#version 150
+#extension GL_EXT_shader_samples_identical: require
+
+uniform sampler2DMS s1;
+uniform isampler2DMS s2;
+uniform usampler2DMS s3;
+uniform sampler2DMSArray s4;
+uniform isampler2DMSArray s5;
+uniform usampler2DMSArray s6;
+
+out vec2 data;
+
+void main()
+{
+   const ivec2 p2 = ivec2(10, 10);
+   const ivec3 p3 = ivec3(15, 11, 0);
+
+   data = vec2(float(textureSamplesIdenticalEXT(s1, p2)) +
+   float(textureSamplesIdenticalEXT(s2, p2)) +
+   float(textureSamplesIdenticalEXT(s3, p2)),
+   float(textureSamplesIdenticalEXT(s4, p3)) +
+   float(textureSamplesIdenticalEXT(s5, p3)) +
+   float(textureSamplesIdenticalEXT(s6, p3)));
+}
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.geom 
b/tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.geom
new file mode 100644
index 000..8247e1d
--- /dev/null
+++ 
b/tests/spec/ext_shader_samples_identical/glsl-1.50/compiler/all-functions.geom
@@ -0,0 +1,34 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_texture_multisample 
GL_EXT_shader_samples_identical
+// [end config]
+
+#version 150
+#extension 

[Piglit] [PATCH 3/9] all.py: Everything in MSAA_SAMPLE_COUNTS is already even

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

If this test has problems with odd sample counts, the test should detect
that and SKIP.

Signed-off-by: Ian Romanick 
---
 tests/all.py | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 1038e07..abe7da2 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2758,12 +2758,10 @@ with profile.group_manager(
   'alpha-blending slow_cc')
 g(['ext_framebuffer_multisample-fast-clear'], 'fast-clear')
 
-for num_samples in MSAA_SAMPLE_COUNTS:
-if num_samples % 2 != 0:
-continue
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
 g(['ext_framebuffer_multisample-alpha-blending-after-rendering',
-   str(num_samples)],
-  'alpha-blending-after-rendering {}'.format(num_samples))
+   sample_count],
+  'alpha-blending-after-rendering {}'.format(sample_count))
 
 for num_samples in ('all_samples', ) + MSAA_SAMPLE_COUNTS:
 g(['ext_framebuffer_multisample-formats', str(num_samples)],
-- 
2.1.0

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


[Piglit] [PATCH 7/9] ext_shader_samples_identical: add test for preprocessor define

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

v2: Move the changes to tests/spec/CMakeLists.txt to a later patch.

Signed-off-by: Ian Romanick 
---
 tests/spec/CMakeLists.txt |  1 -
 .../glsl-1.10/preprocessor/define.frag| 19 +++
 .../glsl-1.10/preprocessor/define.vert| 19 +++
 .../glsl-1.50/preprocessor/define.geom| 18 ++
 .../glsl-es-3.10/preprocessor/define.frag | 19 +++
 .../glsl-es-3.10/preprocessor/define.vert | 19 +++
 6 files changed, 94 insertions(+), 1 deletion(-)
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag
 create mode 100644 
tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.vert

diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index 408649d..a5c42dc 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -76,7 +76,6 @@ add_subdirectory (ext_framebuffer_multisample)
 add_subdirectory (ext_framebuffer_multisample_blit_scaled)
 add_subdirectory (ext_packed_depth_stencil)
 add_subdirectory (ext_packed_float)
-add_subdirectory (ext_shader_samples_identical)
 add_subdirectory (ext_texture_swizzle)
 add_subdirectory (ext_timer_query)
 add_subdirectory (ext_transform_feedback)
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag 
b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag
new file mode 100644
index 000..c48232a
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_texture_multisample 
GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_ARB_texture_multisample: require
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical is not equal to 1
+#endif
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert 
b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert
new file mode 100644
index 000..c48232a
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-1.10/preprocessor/define.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.10
+// require_extensions: GL_ARB_texture_multisample 
GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_ARB_texture_multisample: require
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical is not equal to 1
+#endif
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom 
b/tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom
new file mode 100644
index 000..c7d677a
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/glsl-1.50/preprocessor/define.geom
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_EXT_shader_samples_identical
+// [end config]
+
+#extension GL_EXT_shader_samples_identical: require
+
+#if !defined GL_EXT_shader_samples_identical
+#  error GL_EXT_shader_samples_identical is not defined
+#elif GL_EXT_shader_samples_identical != 1
+#  error GL_EXT_shader_samples_identical is not equal to 1
+#endif
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }
diff --git 
a/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag 
b/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag
new file mode 100644
index 000..00a1d1c
--- /dev/null
+++ 
b/tests/spec/ext_shader_samples_identical/glsl-es-3.10/preprocessor/define.frag
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.10
+// require_extensions: GL_EXT_shader_samples_identical
+// [end config]
+
+#version 310 es
+#extension GL_EXT_shader_samples_identical: 

[Piglit] [PATCH 9/9] ext_shader_samples_identical: Simple fragment shader rendering test

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

Render a simple image.  Scan the image.  At each texel, render green if
textureSamplesIdenticalEXT returns false.  If textureSamplesIdenticalEXT
returns true, examine each sample.  If the samples are all the same
color, render blue.  Render red otherwise.  The test passes if there are
zero red pixels and non-zero green pixels.

Much code borrowed from tests/spec/arb_texture_multisample/texelfetch.c.

Note: This is a pretty weak test.  A stronger test would read back the
original multisampled image and verify the sample-indenticalness using
that.

v2: Use piglit_draw_rect_tex and piglit_draw_rect_from_arrays.  Use
MSAA_SAMPLE_COUNTS instead of open coding.  Suggested by Neil.

Signed-off-by: Ian Romanick 
---
 tests/all.py   |   7 +
 tests/spec/CMakeLists.txt  |   1 +
 .../ext_shader_samples_identical/CMakeLists.gl.txt |  13 ++
 .../ext_shader_samples_identical/CMakeLists.txt|   1 +
 .../spec/ext_shader_samples_identical/simple-fs.c  | 245 +
 5 files changed, 267 insertions(+)
 create mode 100644 tests/spec/ext_shader_samples_identical/CMakeLists.gl.txt
 create mode 100644 tests/spec/ext_shader_samples_identical/CMakeLists.txt
 create mode 100644 tests/spec/ext_shader_samples_identical/simple-fs.c

diff --git a/tests/all.py b/tests/all.py
index abe7da2..d9c 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4536,5 +4536,12 @@ with profile.group_manager(
 g(['oes_draw_elements_base_vertex-multidrawelements'],
   run_concurrent=False)
 
+# Group EXT_shader_samples_identical
+with profile.group_manager(
+PiglitGLTest,
+grouptools.join('spec', 'EXT_shader_samples_identical')) as g:
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
+g(['ext_shader_samples_identical', sample_count])
+
 if platform.system() is 'Windows':
 profile.filter_tests(lambda p, _: not p.startswith('glx'))
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index a5c42dc..408649d 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -76,6 +76,7 @@ add_subdirectory (ext_framebuffer_multisample)
 add_subdirectory (ext_framebuffer_multisample_blit_scaled)
 add_subdirectory (ext_packed_depth_stencil)
 add_subdirectory (ext_packed_float)
+add_subdirectory (ext_shader_samples_identical)
 add_subdirectory (ext_texture_swizzle)
 add_subdirectory (ext_timer_query)
 add_subdirectory (ext_transform_feedback)
diff --git a/tests/spec/ext_shader_samples_identical/CMakeLists.gl.txt 
b/tests/spec/ext_shader_samples_identical/CMakeLists.gl.txt
new file mode 100644
index 000..0752483
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/CMakeLists.gl.txt
@@ -0,0 +1,13 @@
+include_directories(
+   ${GLEXT_INCLUDE_DIR}
+   ${OPENGL_INCLUDE_PATH}
+   ${piglit_SOURCE_DIR}/tests/spec/arb_texture_multisample
+)
+
+link_libraries (
+   piglitutil_${piglit_target_api}
+   ${OPENGL_gl_LIBRARY}
+)
+
+piglit_add_executable (ext_shader_samples_identical-simple-fs simple-fs.c)
+# vim: ft=cmake:
diff --git a/tests/spec/ext_shader_samples_identical/CMakeLists.txt 
b/tests/spec/ext_shader_samples_identical/CMakeLists.txt
new file mode 100644
index 000..144a306
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/ext_shader_samples_identical/simple-fs.c 
b/tests/spec/ext_shader_samples_identical/simple-fs.c
new file mode 100644
index 000..e7de7b4
--- /dev/null
+++ b/tests/spec/ext_shader_samples_identical/simple-fs.c
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 2015 Intel Corporation
+ * Copyright 2014 VMware, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/** \file simple-fs.c
+ * Simple fragment shader test for textureSamplesIdenticalEXT.
+ 

[Piglit] [PATCH 6/9] arb_texture_multisample: Use piglit_draw_rect_from_arrays instead of open-coding it

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

This requires changing from drawing a triangle to drawing a diamond
(quadrilateral) shape.

Signed-off-by: Ian Romanick 
Suggested-by: Neil Roberts 
---
 tests/spec/arb_texture_multisample/texelfetch.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/tests/spec/arb_texture_multisample/texelfetch.c 
b/tests/spec/arb_texture_multisample/texelfetch.c
index b24ec95..981e3c6 100644
--- a/tests/spec/arb_texture_multisample/texelfetch.c
+++ b/tests/spec/arb_texture_multisample/texelfetch.c
@@ -104,10 +104,11 @@ static int num_samples = 0;
 enum piglit_result
 piglit_display(void)
 {
-   static const GLfloat tri_verts[3][2] = {
-   { -0.8, -1 },
-   { 0.8, -0.9 },
-   { 0.1, 1}
+   static const GLfloat quad_verts[4][4] = {
+   {  0.8,  0.1, 0, 1 },
+   {  0.1,  1.0, 0, 1 },
+   { -0.1, -1.0, 0, 1 },
+   { -0.8, -0.1, 0, 1 },
};
unsigned i, j, num_diffs;
GLfloat *images[MAX_SAMPLES], *average;
@@ -126,11 +127,7 @@ piglit_display(void)
piglit_check_gl_error(GL_NO_ERROR);
 
glUseProgram(draw_prog);
-   glVertexAttribPointer(PIGLIT_ATTRIB_POS, 2, GL_FLOAT,
- GL_FALSE, 0, tri_verts);
-   glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
-   glDrawArrays(GL_TRIANGLES, 0, 3);
-   glDisableVertexAttribArray(PIGLIT_ATTRIB_POS);
+   piglit_draw_rect_from_arrays(quad_verts, NULL, false);
 
piglit_check_gl_error(GL_NO_ERROR);
 
-- 
2.1.0

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


[Piglit] [PATCH 5/9] arb_texture_multisample: Use piglit_draw_rect_tex instead of open-coding it

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

Signed-off-by: Ian Romanick 
Suggested-by: Neil Roberts 
---
 tests/spec/arb_texture_multisample/texelfetch.c | 22 +-
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/tests/spec/arb_texture_multisample/texelfetch.c 
b/tests/spec/arb_texture_multisample/texelfetch.c
index 9e3d8ec..b24ec95 100644
--- a/tests/spec/arb_texture_multisample/texelfetch.c
+++ b/tests/spec/arb_texture_multisample/texelfetch.c
@@ -109,18 +109,6 @@ piglit_display(void)
{ 0.8, -0.9 },
{ 0.1, 1}
};
-   static const GLfloat quad_verts[4][2] = {
-   { -1, -1 },
-   {  1, -1 },
-   {  1,  1 },
-   { -1,  1 }
-   };
-   static const GLfloat quad_texcoords[4][2] = {
-   { 0, 0 },
-   { 31, 0 },
-   { 31, 31 },
-   { 0, 31 }
-   };
unsigned i, j, num_diffs;
GLfloat *images[MAX_SAMPLES], *average;
 
@@ -167,15 +155,7 @@ piglit_display(void)
/* fetch the i-th sample */
glUniform1i(sample_pos_uniform, i);
 
-   glVertexAttribPointer(PIGLIT_ATTRIB_POS, 2, GL_FLOAT,
- GL_FALSE, 0, quad_verts);
-   glVertexAttribPointer(PIGLIT_ATTRIB_TEX, 2, GL_FLOAT,
- GL_FALSE, 0, quad_texcoords);
-   glEnableVertexAttribArray(PIGLIT_ATTRIB_POS);
-   glEnableVertexAttribArray(PIGLIT_ATTRIB_TEX);
-   glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-   glDisableVertexAttribArray(PIGLIT_ATTRIB_POS);
-   glDisableVertexAttribArray(PIGLIT_ATTRIB_TEX);
+   piglit_draw_rect_tex(-1, -1, 2, 2, 0, 0, 31, 31);
 
glReadPixels(0, 0, 32, 32, GL_RGBA, GL_FLOAT, images[i]);
}
-- 
2.1.0

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


Re: [Piglit] [PATCH v2] Implement piglit tests for EXT_blend_func_extended

2015-11-19 Thread Ilia Mirkin
Pushed, thanks!

On Tue, Nov 17, 2015 at 6:57 PM, Ryan Houdek  wrote:
> ---
>  tests/all.py   |  13 +++
>  .../api/CMakeLists.gles2.txt   |   5 +
>  .../api/CMakeLists.gles3.txt   |   6 ++
>  .../api/bindfragdataindexed-invalid-parameters.c   |   8 ++
>  tests/spec/arb_blend_func_extended/api/blend-api.c |   8 ++
>  tests/spec/arb_blend_func_extended/api/builtins.c  | 111 
> +
>  .../arb_blend_func_extended/api/getfragdataindex.c |  38 ++-
>  .../arb_blend_func_extended/api/output-location.c  |  29 +-
>  .../execution/CMakeLists.gles2.txt |   4 +
>  .../execution/CMakeLists.gles3.txt |   6 ++
>  .../execution/fbo-extended-blend-explicit.c|  69 +++--
>  .../execution/fbo-extended-blend-pattern.c |  77 +-
>  .../execution/fbo-extended-blend.c |  69 +++--
>  13 files changed, 425 insertions(+), 18 deletions(-)
>  create mode 100644 
> tests/spec/arb_blend_func_extended/api/CMakeLists.gles2.txt
>  create mode 100644 
> tests/spec/arb_blend_func_extended/api/CMakeLists.gles3.txt
>  create mode 100644 tests/spec/arb_blend_func_extended/api/builtins.c
>  create mode 100644 
> tests/spec/arb_blend_func_extended/execution/CMakeLists.gles2.txt
>  create mode 100644 
> tests/spec/arb_blend_func_extended/execution/CMakeLists.gles3.txt
>
> diff --git a/tests/all.py b/tests/all.py
> index ee2b7d9..b81578d 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -3982,6 +3982,19 @@ with profile.group_manager(
>run_concurrent=False)
>  g(['arb_blend_func_extended-fbo-extended-blend-pattern'],
>run_concurrent=False)
> +g(['arb_blend_func_extended-blend-api_gles2'], run_concurrent=False)
> +g(['arb_blend_func_extended-builtins_gles2'], run_concurrent=False)
> +
> g(['arb_blend_func_extended-bindfragdataindexed-invalid-parameters_gles3'],
> +  run_concurrent=False)
> +g(['arb_blend_func_extended-output-location_gles3'], 
> run_concurrent=False)
> +g(['arb_blend_func_extended-getfragdataindex_gles3'], 
> run_concurrent=False)
> +g(['arb_blend_func_extended-fbo-extended-blend-pattern_gles2'],
> +  run_concurrent=False)
> +g(['arb_blend_func_extended-fbo-extended-blend-pattern_gles3'],
> +  run_concurrent=False)
> +g(['arb_blend_func_extended-fbo-extended-blend_gles3'], 
> run_concurrent=False)
> +g(['arb_blend_func_extended-fbo-extended-blend-explicit_gles3'],
> +  run_concurrent=False)
>
>  with profile.group_manager(
>  PiglitGLTest,
> diff --git a/tests/spec/arb_blend_func_extended/api/CMakeLists.gles2.txt 
> b/tests/spec/arb_blend_func_extended/api/CMakeLists.gles2.txt
> new file mode 100644
> index 000..2966073
> --- /dev/null
> +++ b/tests/spec/arb_blend_func_extended/api/CMakeLists.gles2.txt
> @@ -0,0 +1,5 @@
> +link_libraries(piglitutil_${piglit_target_api})
> +
> +piglit_add_executable 
> (arb_blend_func_extended-blend-api_${piglit_target_api} blend-api)
> +piglit_add_executable (arb_blend_func_extended-builtins_${piglit_target_api} 
> builtins.c)
> +# vim: ft=cmake:
> diff --git a/tests/spec/arb_blend_func_extended/api/CMakeLists.gles3.txt 
> b/tests/spec/arb_blend_func_extended/api/CMakeLists.gles3.txt
> new file mode 100644
> index 000..a005fc2
> --- /dev/null
> +++ b/tests/spec/arb_blend_func_extended/api/CMakeLists.gles3.txt
> @@ -0,0 +1,6 @@
> +link_libraries(piglitutil_${piglit_target_api})
> +
> +piglit_add_executable 
> (arb_blend_func_extended-bindfragdataindexed-invalid-parameters_${piglit_target_api}
>  bindfragdataindexed-invalid-parameters.c)
> +piglit_add_executable 
> (arb_blend_func_extended-output-location_${piglit_target_api} 
> output-location.c)
> +piglit_add_executable 
> (arb_blend_func_extended-getfragdataindex_${piglit_target_api} 
> getfragdataindex.c)
> +# vim: ft=cmake:
> diff --git 
> a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
>  
> b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
> index 7ef6048..c4a8d53 100644
> --- 
> a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
> +++ 
> b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
> @@ -31,7 +31,11 @@
>
>  PIGLIT_GL_TEST_CONFIG_BEGIN
>
> +#ifdef PIGLIT_USE_OPENGL
> config.supports_gl_compat_version = 10;
> +#else // PIGLIT_USE_OPENGLES3
> +   config.supports_gl_es_version = 30;
> +#endif
> config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
>
>  PIGLIT_GL_TEST_CONFIG_END
> @@ -47,8 +51,12 @@ void piglit_init(int argc, char **argv)
> GLint max_draw_buffers, max_dual_source;
> GLuint prog;
>
> +#ifdef PIGLIT_USE_OPENGL
> piglit_require_gl_version(30);
> piglit_require_extension("GL_ARB_blend_func_extended");
> +#else // PIGLIT_USE_OPENGLES3

[Piglit] [PATCH 2/9] all.py: Use the same MSAA_SAMPLE_COUNTS idiom almost everywhere

2015-11-19 Thread Ian Romanick
From: Ian Romanick 

I could not figure out how to get

for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):

to work with the (0,) + MSAA_SAMPLE_COUNTS places.

Signed-off-by: Ian Romanick 
Cc: Dylan Baker 
---
 tests/all.py | 83 +---
 1 file changed, 40 insertions(+), 43 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 578bcae..1038e07 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -115,9 +115,9 @@ def add_msaa_visual_plain_tests(adder, args, **kwargs):
 assert isinstance(args, list)
 
 adder(args, **kwargs)
-for num_samples in MSAA_SAMPLE_COUNTS:
-adder(args + ['-samples={}'.format(num_samples)],
-  ' '.join(args + ['samples={}'.format(num_samples)]),
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
+adder(args + ['-samples={}'.format(sample_count)],
+  ' '.join(args + ['samples={}'.format(sample_count)]),
   **kwargs)
 
 
@@ -138,10 +138,10 @@ def add_fbo_formats_tests(adder, extension, suffix=''):
 
 
 def add_msaa_formats_tests(adder, extension):
-for num_samples in MSAA_SAMPLE_COUNTS:
-adder(['ext_framebuffer_multisample-formats', str(num_samples),
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
+adder(['ext_framebuffer_multisample-formats', sample_count,
extension],
-  'multisample-formats {} {}'.format(num_samples, extension))
+  'multisample-formats {} {}'.format(sample_count, extension))
 adder(['ext_framebuffer_multisample-fast-clear', extension],
   'multisample-fast-clear {}'.format(extension))
 
@@ -2191,13 +2191,12 @@ with profile.group_manager(
   'builtin-gl-sample-position {}'.format(num_samples),
   run_concurrent=False)
 
-for num_samples in MSAA_SAMPLE_COUNTS:
-g(['arb_sample_shading-interpolate-at-sample-position',
-   str(num_samples)],
-  'interpolate-at-sample-position {}'.format(num_samples),
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
+g(['arb_sample_shading-interpolate-at-sample-position', sample_count],
+  'interpolate-at-sample-position {}'.format(sample_count),
   run_concurrent=False)
-g(['arb_sample_shading-ignore-centroid-qualifier', str(num_samples)],
-  'ignore-centroid-qualifier {}'.format(num_samples),
+g(['arb_sample_shading-ignore-centroid-qualifier', sample_count],
+  'ignore-centroid-qualifier {}'.format(sample_count),
   run_concurrent=False)
 
 for num_samples in (0,) + MSAA_SAMPLE_COUNTS:
@@ -2717,15 +2716,15 @@ with profile.group_manager(
 g(['ext_framebuffer_multisample_blit_scaled-negative-blit-scaled'],
   'negative-blit-scaled')
 
-for num_samples in MSAA_SAMPLE_COUNTS:
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
 g(['ext_framebuffer_multisample_blit_scaled-blit-scaled',
-   str(num_samples)],
-  'blit-scaled samples={}'.format(num_samples))
+   sample_count],
+  'blit-scaled samples={}'.format(sample_count))
 
-for num_samples in MSAA_SAMPLE_COUNTS:
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
 g(['ext_framebuffer_multisample_blit_scaled-blit-scaled',
-   str(num_samples), 'array'],
-  'blit-scaled samples={} with 
GL_TEXTURE_2D_MULTISAMPLE_ARRAY'.format(num_samples))
+   sample_count, 'array'],
+  'blit-scaled samples={} with 
GL_TEXTURE_2D_MULTISAMPLE_ARRAY'.format(sample_count))
 
 with profile.group_manager(
 PiglitGLTest,
@@ -2797,9 +2796,9 @@ with profile.group_manager(
test_type],
   'interpolation {} {}'.format(num_samples, test_type))
 
-for num_samples in MSAA_SAMPLE_COUNTS:
-g(['ext_framebuffer_multisample-turn-on-off', str(num_samples)],
-  'turn-on-off {}'.format(num_samples), run_concurrent=False)
+for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
+g(['ext_framebuffer_multisample-turn-on-off', sample_count],
+  'turn-on-off {}'.format(sample_count), run_concurrent=False)
 
 for buffer_type in ('color', 'depth', 'stencil'):
 if buffer_type == 'color':
@@ -2808,31 +2807,31 @@ with profile.group_manager(
 sensible_options = []
 
 for options in power_set(sensible_options):
-g(['ext_framebuffer_multisample-upsample', str(num_samples),
+g(['ext_framebuffer_multisample-upsample', sample_count,
buffer_type] + options,
   'upsample {} {}'.format(
-  num_samples, ' '.join([buffer_type] + options)))
+  sample_count, ' '.join([buffer_type] + options)))
 g(['ext_framebuffer_multisample-multisample-blit',
-   

Re: [Piglit] [PATCH] arb_shader_storage_buffer_object: Test copying a large SSBO item

2015-11-19 Thread Samuel Iglesias Gonsálvez
Reviewed-by: Samuel Iglesias Gonsálvez 

Thanks for writing a test for this issue,

Sam

On 20/11/15 02:23, Jordan Justen wrote:
> Signed-off-by: Jordan Justen 
> Cc: Kristian Høgsberg 
> Cc: Samuel Iglesias Gonsalvez 
> Cc: Iago Toral Quiroga 
> ---
>  This fails to link on i965.
> 
>  .../execution/large-field-copy.shader_test | 66 
> ++
>  1 file changed, 66 insertions(+)
>  create mode 100644 
> tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
> 
> diff --git 
> a/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
>  
> b/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
> new file mode 100644
> index 000..a949507
> --- /dev/null
> +++ 
> b/tests/spec/arb_shader_storage_buffer_object/execution/large-field-copy.shader_test
> @@ -0,0 +1,66 @@
> +# Test that a 'large' field of an SSBO can be copied.
> +
> +[require]
> +GL >= 3.3
> +GLSL >= 3.30
> +GL_ARB_shader_storage_buffer_object
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 330
> +#extension GL_ARB_shader_storage_buffer_object: require
> +
> +#define SIZE 16
> +
> +layout (std430) buffer SSBO {
> +mat4 m1[SIZE];
> +mat4 m2[SIZE];
> +};
> +
> +out vec4 color;
> +
> +uniform uint mode;
> +
> +void main() {
> +bool pass = true;
> +int i;
> +
> +switch (mode) {
> +case 0u:
> +for (i = 0; i < SIZE; i++) {
> + m1[i] = mat4(vec4(i + 0), vec4(i + 1),
> +  vec4(i + 2), vec4(i + 3));
> + }
> + break;
> +case 1u:
> +m2 = m1;
> + break;
> +case 2u:
> +for (i = 0; i < SIZE; i++) {
> + pass = pass && (m2[i] == mat4(vec4(i + 0), vec4(i + 1),
> +   vec4(i + 2), vec4(i + 3)));
> + }
> + break;
> +}
> +
> +if (pass)
> +color = vec4(0.0, 1.0, 0.0, 1.0);
> +else
> +color = vec4(1.0, 0.0, 0.0, 1.0);
> +}
> +
> +[test]
> +ssbo 2048
> +
> +uniform uint mode 0
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
> +
> +uniform uint mode 1
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
> +
> +uniform uint mode 2
> +draw rect -1 -1 2 2
> +probe all rgba 0.0 1.0 0.0 1.0
> 
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] arb_separate_shader_objects: test mixed explicit and non-explicit locations

2015-11-19 Thread Timothy Arceri
On Thu, 2015-11-19 at 14:21 +0100, Gregory Hainaut wrote:
> Hello Timothy,
> 
> > There seems to be 3 separate issues so I think we should have a separate
> > tests
> > (or at least cleary labebled subtests) for each of them.
> 
> In this case, I propose that we keep your new test. It has a better
> coverage than mine. Beside it will make my first test easier.
> 
> > I also think you will need to rework your test a bit because with my fixes
> > for
> > outputs it will max out the varying limits, this is consistent with the
> > issue
> > you were having on the Nvidia blob.
> Ok I will remove it.
> 
> Note: as far as I understand, spec allow to optimize the interface of
> a multiple-stage separated program. Extract from issue 8a and 8b of
> the spec. So both implementations were valid.
> "We allow the linker to perform internal optimizations on the
> interfaces between stages of a multi-stage program object."

Yes you are right. In that case you can leave it as is, however we should
again make this case clear by having a separate piglit test or breaking it
into a subtest.

I also have modified my Mesa patches to allow for this, I'll send out V2
tomorrow after some additional testing.


> 
> Best regards,
> Gregory
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit