Re: [Piglit] [PATCH] util: Silence GCC unused-function warning.

2018-06-05 Thread Tapani Pälli



On 06/06/2018 02:51 AM, Ian Romanick wrote:

On 06/05/2018 03:41 PM, Vinson Lee wrote:

piglit-util-gl.c:1941:1: warning: ‘read_texture_via_fbo’ defined but not used 
[-Wunused-function]
  read_texture_via_fbo(int target, int level, int x, int y, int layer, int w,
  ^~~~

Fixes: 77a4b73436c0 ("util: provide way to read a texture in ES compatible way")
Signed-off-by: Vinson Lee 
---
  tests/util/piglit-util-gl.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 9b0f88a3697e..11e7d4b1da4d 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -1894,6 +1894,7 @@ piglit_probe_image_ubyte(int x, int y, int w, int h, 
GLenum format,
return 1;
  }
  
+#ifndef PIGLIT_USE_OPENGL


Isn't there a PIGLIT_USE_OPENGLES2 flag or similar that we could use?
I'm not sure how this change (or 77a4b73436c0) interacts with building
GLES 1.x tests... if at all.


It should not affect as those tests are not using the 'probe_texel' 
functions (using probe_pixel instead). It should be fine to go with this:


Reviewed-by: Tapani Pälli 




  static GLuint
  create_fbo_from_texture(GLenum target, GLint texture, GLint level, GLint 
layer)
  {
@@ -1995,6 +1996,7 @@ read_texture_via_fbo(int target, int level, int x, int y, 
int layer, int w,
  
  	return buffer;

  }
+#endif
  
  
  /**



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


Re: [Piglit] [PATCH] general/draw: Test that checks propper render order in mixed draw setups.

2018-06-05 Thread Timothy Arceri

On 05/06/18 16:05, mathias.froehl...@gmx.net wrote:

From: Mathias Fröhlich 

Hi all,

The description below,
Please review!!

best
Mathias



The test checks for propper immediate mode flushes when array draws
are mixed with immediate mode draws.
The test abstracts out what went wrong in bugzilla #106594.

Signed-off-by: Mathias Fröhlich 
---
  tests/general/CMakeLists.gl.txt |   1 +
  tests/general/draw-flush-vertices.c | 111 
  2 files changed, 112 insertions(+)
  create mode 100644 tests/general/draw-flush-vertices.c

diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt
index ceec9f0b6..7f530974e 100644
--- a/tests/general/CMakeLists.gl.txt
+++ b/tests/general/CMakeLists.gl.txt
@@ -40,6 +40,7 @@ piglit_add_executable (draw-batch draw-batch.c)
  piglit_add_executable (draw-copypixels-sync draw-copypixels-sync.c)
  piglit_add_executable (draw-elements draw-elements.c)
  piglit_add_executable (draw-elements-vs-inputs draw-elements-vs-inputs.c)
+piglit_add_executable (draw-flush-vertices draw-flush-vertices.c)
  piglit_add_executable (draw-pixel-with-texture draw-pixel-with-texture.c)
  piglit_add_executable (draw-sync draw-sync.c)
  piglit_add_executable (draw-pixels draw-pixels.c)
diff --git a/tests/general/draw-flush-vertices.c 
b/tests/general/draw-flush-vertices.c
new file mode 100644
index 0..9932a6bc0
--- /dev/null
+++ b/tests/general/draw-flush-vertices.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright © 2018 Mathias Fröhlich 
+ *
+ * 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.
+ *
+ * Authors:
+ *Mathias Fröhlich 
+ */
+
+/* The test does mixes immediate mode and array draws, but does not
+ * not do an other draw setup past the immediate mode draw. By that
+ * it checks for the order of draws that may be inverted if the queued
+ * immediate mode draws are not properly flushed before the array draw.
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 11;
+
+   config.window_width = 32;
+   config.window_height = 32;
+   config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+void piglit_init(int argc, char **argv)
+{
+   piglit_require_gl_version(11);
+
+   piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
+
+   glDisable(GL_DEPTH_TEST);
+   glClearColor(0.0, 0.0, 0.0, 1.0);
+}


nit:

Normally we try to put piglit_init() at the bottom so we can get right 
into the interesting things first.


Otherwise this is:

Acked-by: Timothy Arceri 

Thanks for writing a piglit test to cover this!


+
+
+enum piglit_result
+piglit_display(void)
+{
+   const GLfloat Vertices[2*4] = {
+   0, 0,
+   piglit_width, 0,
+   piglit_width, piglit_height,
+   0, piglit_height
+   };
+   const GLfloat Colors[4*3] = {
+   1, 0, 0,
+   1, 0, 0,
+   1, 0, 0,
+   1, 0, 0
+   };
+
+   GLboolean pass = GL_TRUE;
+
+   glViewport(0, 0, piglit_width, piglit_height);
+
+   glEnableClientState(GL_VERTEX_ARRAY);
+   glVertexPointer(2, GL_FLOAT, sizeof(GLfloat)*2, Vertices);
+   glEnableClientState(GL_COLOR_ARRAY);
+   glColorPointer(3, GL_FLOAT, sizeof(GLfloat)*3, Colors);
+
+   glClear(GL_COLOR_BUFFER_BIT);
+
+   /* Draw a blue quad */
+   glBegin(GL_QUADS);
+   glColor3f(0, 0, 1);
+   glVertex2fv([0]);
+   glVertex2fv([2]);
+   glVertex2fv([4]);
+   glVertex2fv([6]);
+   glEnd();
+
+   /* OpenGL has to make sure that prior to the glDrawArrays call
+* all immediate mode rendering has landed.
+*/
+
+   /* Draw a red quad */
+   glDrawArrays(GL_QUADS, 0, 4);
+
+   if (!piglit_check_gl_error(GL_NO_ERROR))
+

Re: [Piglit] [PATCH] util: Silence GCC unused-function warning.

2018-06-05 Thread Ian Romanick
On 06/05/2018 03:41 PM, Vinson Lee wrote:
> piglit-util-gl.c:1941:1: warning: ‘read_texture_via_fbo’ defined but not used 
> [-Wunused-function]
>  read_texture_via_fbo(int target, int level, int x, int y, int layer, int w,
>  ^~~~
> 
> Fixes: 77a4b73436c0 ("util: provide way to read a texture in ES compatible 
> way")
> Signed-off-by: Vinson Lee 
> ---
>  tests/util/piglit-util-gl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
> index 9b0f88a3697e..11e7d4b1da4d 100644
> --- a/tests/util/piglit-util-gl.c
> +++ b/tests/util/piglit-util-gl.c
> @@ -1894,6 +1894,7 @@ piglit_probe_image_ubyte(int x, int y, int w, int h, 
> GLenum format,
>   return 1;
>  }
>  
> +#ifndef PIGLIT_USE_OPENGL

Isn't there a PIGLIT_USE_OPENGLES2 flag or similar that we could use?
I'm not sure how this change (or 77a4b73436c0) interacts with building
GLES 1.x tests... if at all.

>  static GLuint
>  create_fbo_from_texture(GLenum target, GLint texture, GLint level, GLint 
> layer)
>  {
> @@ -1995,6 +1996,7 @@ read_texture_via_fbo(int target, int level, int x, int 
> y, int layer, int w,
>  
>   return buffer;
>  }
> +#endif
>  
>  
>  /**
> 
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] util: Silence GCC unused-function warning.

2018-06-05 Thread Vinson Lee
piglit-util-gl.c:1941:1: warning: ‘read_texture_via_fbo’ defined but not used 
[-Wunused-function]
 read_texture_via_fbo(int target, int level, int x, int y, int layer, int w,
 ^~~~

Fixes: 77a4b73436c0 ("util: provide way to read a texture in ES compatible way")
Signed-off-by: Vinson Lee 
---
 tests/util/piglit-util-gl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 9b0f88a3697e..11e7d4b1da4d 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -1894,6 +1894,7 @@ piglit_probe_image_ubyte(int x, int y, int w, int h, 
GLenum format,
return 1;
 }
 
+#ifndef PIGLIT_USE_OPENGL
 static GLuint
 create_fbo_from_texture(GLenum target, GLint texture, GLint level, GLint layer)
 {
@@ -1995,6 +1996,7 @@ read_texture_via_fbo(int target, int level, int x, int y, 
int layer, int w,
 
return buffer;
 }
+#endif
 
 
 /**
-- 
2.14.1

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


Re: [Piglit] [PATCH v2] GL_ARB_texture_buffer_object: New test for error behavior.

2018-06-05 Thread Ilia Mirkin
On Tue, Jun 5, 2018 at 2:32 PM, Ian Romanick  wrote:
> On 06/05/2018 04:58 AM, Illia Iorin wrote:
>> This test checks that if we allocate more memory for the buffer
>>  than possible, we get GL_OUT_OF_MEMORY error.
>> V2:
>>   - check GL_ARB_texture_buffer_object extension

This bit didn't happen.

>>   - change storage format to GL_RGBA32I
>>   - check gl compat version 3.1 because
>>   function glTexBuffer() require that version
>
> Uh... but you actually set it to 2.0.  Also, it's helpful if there's a
> blank line between the body of the commit message an the first
> Signed-off-by, Reviewed-by, etc.

Having both core and compat is set causes just one of them to always
be picked, as I recall.

>
> One more nit below...
>
> Assuming nobody else has comments, I can tidy these issues up and push
> this patch Wednesday morning.
>
>> Signed-off-by: Illia Iorin 
>> ---
>>  tests/opengl.py   |  1 +
>>  .../CMakeLists.gl.txt |  1 +
>>  .../negative-bad-oom.c| 61 +++
>>  3 files changed, 63 insertions(+)
>>  create mode 100644 tests/spec/arb_texture_buffer_object/negative-bad-oom.c
>>
>> diff --git a/tests/opengl.py b/tests/opengl.py
>> index 9c43d32c9..56cf4f041 100644
>> --- a/tests/opengl.py
>> +++ b/tests/opengl.py
>> @@ -2365,6 +2365,7 @@ with profile.test_list.group_manager(
>>  g(['arb_texture_buffer_object-max-size'], 'max-size')
>>  g(['arb_texture_buffer_object-minmax'], 'minmax')
>>  g(['arb_texture_buffer_object-negative-bad-bo'], 'negative-bad-bo')
>> +g(['arb_texture_buffer_object-negative-bad-oom'], 'negative-bad-oom')
>>  g(['arb_texture_buffer_object-negative-bad-format'], 
>> 'negative-bad-format')
>>  g(['arb_texture_buffer_object-negative-bad-target'], 
>> 'negative-bad-target')
>>  g(['arb_texture_buffer_object-negative-unsupported'],
>> diff --git a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt 
>> b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
>> index 959ca0c2f..98d1e16d8 100644
>> --- a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
>> +++ b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
>> @@ -25,3 +25,4 @@ piglit_add_executable 
>> (arb_texture_buffer_object-subdata-sync subdata-sync.c)
>>  piglit_add_executable (arb_texture_buffer_object-unused-name unused-name.c)
>>  piglit_add_executable (arb_texture_buffer_object-fetch-outside-bounds 
>> fetch-outside-bounds.c)
>>  piglit_add_executable (arb_texture_buffer_object-indexed indexed.c)
>> +piglit_add_executable (arb_texture_buffer_object-negative-bad-oom 
>> negative-bad-oom.c)
>> \ No newline at end of file
>> diff --git a/tests/spec/arb_texture_buffer_object/negative-bad-oom.c 
>> b/tests/spec/arb_texture_buffer_object/negative-bad-oom.c
>> new file mode 100644
>> index 0..53d4ff3f8
>> --- /dev/null
>> +++ b/tests/spec/arb_texture_buffer_object/negative-bad-oom.c
>> @@ -0,0 +1,61 @@
>> +/* Copyright © 2018 Illia Iorin
>> + *
>> + * 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 negative-bad-oom.c
>> +* This test checks  allocat more memory than possible,
>> +* the glGetError() will return  GL_OUT_OF_MEMORY error flag
>> +*/
>> +#include "piglit-util-gl.h"
>> +
>> +PIGLIT_GL_TEST_CONFIG_BEGIN
>> +
>> + config.supports_gl_compat_version = 20;
>> + config.supports_gl_core_version = 31;
>> +
>> + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
>> + config.khr_no_error_support = PIGLIT_HAS_ERRORS;
>> +
>> +PIGLIT_GL_TEST_CONFIG_END
>> +
>> +enum piglit_result
>> +piglit_display(void)
>> +{
>> + return PIGLIT_FAIL; /* UNREACHED */
>> +}
>> +
>
> Only one blank line here.
>
>> +
>> +void
>> +piglit_init(int argc, char **argv)
>> +{
>> + GLuint tex, tbo;
>> + glGenBuffers(1, );
>> + 

Re: [Piglit] [PATCH v2] GL_ARB_texture_buffer_object: New test for error behavior.

2018-06-05 Thread Ian Romanick
On 06/05/2018 04:58 AM, Illia Iorin wrote:
> This test checks that if we allocate more memory for the buffer
>  than possible, we get GL_OUT_OF_MEMORY error.
> V2:
>   - check GL_ARB_texture_buffer_object extension
>   - change storage format to GL_RGBA32I
>   - check gl compat version 3.1 because
>   function glTexBuffer() require that version

Uh... but you actually set it to 2.0.  Also, it's helpful if there's a
blank line between the body of the commit message an the first
Signed-off-by, Reviewed-by, etc.

One more nit below...

Assuming nobody else has comments, I can tidy these issues up and push
this patch Wednesday morning.

> Signed-off-by: Illia Iorin 
> ---
>  tests/opengl.py   |  1 +
>  .../CMakeLists.gl.txt |  1 +
>  .../negative-bad-oom.c| 61 +++
>  3 files changed, 63 insertions(+)
>  create mode 100644 tests/spec/arb_texture_buffer_object/negative-bad-oom.c
> 
> diff --git a/tests/opengl.py b/tests/opengl.py
> index 9c43d32c9..56cf4f041 100644
> --- a/tests/opengl.py
> +++ b/tests/opengl.py
> @@ -2365,6 +2365,7 @@ with profile.test_list.group_manager(
>  g(['arb_texture_buffer_object-max-size'], 'max-size')
>  g(['arb_texture_buffer_object-minmax'], 'minmax')
>  g(['arb_texture_buffer_object-negative-bad-bo'], 'negative-bad-bo')
> +g(['arb_texture_buffer_object-negative-bad-oom'], 'negative-bad-oom')
>  g(['arb_texture_buffer_object-negative-bad-format'], 
> 'negative-bad-format')
>  g(['arb_texture_buffer_object-negative-bad-target'], 
> 'negative-bad-target')
>  g(['arb_texture_buffer_object-negative-unsupported'],
> diff --git a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt 
> b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
> index 959ca0c2f..98d1e16d8 100644
> --- a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
> +++ b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
> @@ -25,3 +25,4 @@ piglit_add_executable 
> (arb_texture_buffer_object-subdata-sync subdata-sync.c)
>  piglit_add_executable (arb_texture_buffer_object-unused-name unused-name.c)
>  piglit_add_executable (arb_texture_buffer_object-fetch-outside-bounds 
> fetch-outside-bounds.c)
>  piglit_add_executable (arb_texture_buffer_object-indexed indexed.c)
> +piglit_add_executable (arb_texture_buffer_object-negative-bad-oom 
> negative-bad-oom.c)
> \ No newline at end of file
> diff --git a/tests/spec/arb_texture_buffer_object/negative-bad-oom.c 
> b/tests/spec/arb_texture_buffer_object/negative-bad-oom.c
> new file mode 100644
> index 0..53d4ff3f8
> --- /dev/null
> +++ b/tests/spec/arb_texture_buffer_object/negative-bad-oom.c
> @@ -0,0 +1,61 @@
> +/* Copyright © 2018 Illia Iorin 
> + *
> + * 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 negative-bad-oom.c 
> +* This test checks  allocat more memory than possible, 
> +* the glGetError() will return  GL_OUT_OF_MEMORY error flag 
> +*/
> +#include "piglit-util-gl.h"
> +
> +PIGLIT_GL_TEST_CONFIG_BEGIN
> +
> + config.supports_gl_compat_version = 20;
> + config.supports_gl_core_version = 31;
> +
> + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
> + config.khr_no_error_support = PIGLIT_HAS_ERRORS;
> +
> +PIGLIT_GL_TEST_CONFIG_END
> +
> +enum piglit_result
> +piglit_display(void)
> +{
> + return PIGLIT_FAIL; /* UNREACHED */
> +}
> +

Only one blank line here.

> +
> +void
> +piglit_init(int argc, char **argv)
> +{
> + GLuint tex, tbo;
> + glGenBuffers(1, );
> + glBindBuffer(GL_TEXTURE_BUFFER, tbo);
> +
> + glGenTextures(1, );
> + glBindTexture(GL_TEXTURE_BUFFER, tex);
> + glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32I, tbo);
> + glBufferData(GL_TEXTURE_BUFFER,
> +  INT_MAX , NULL, GL_STATIC_READ);
> + if 

Re: [Piglit] [Mesa-dev] GitLab migration of Piglit

2018-06-05 Thread Emil Velikov
Hi Dan,

Sharing a couple of small ideas.

On 5 June 2018 at 18:02, Daniel Stone  wrote:

>>> drm-gralloc.git
Empty - please nuke, alongside bugzilla & other infra.

>>> drm.git
Out of curiosity - this and others (say igt) projects are accessible
as mesa/$foo and drm/$foo.
I'd image the same approach will be adopted in gitlab?

>>> llvm.git
Empty - nuke?

>>> mesa-test.git
Plain copy/paste just like xserver-test. There were no extra
branches/patches wrt the usual repos.
Nuke?

>>> libwsbm.git
>>> linux-agp-compat.git
>>> vmwgfx.git

Might want to check with the VMware people about these.
I'm suspecting that the developers are not keeping a close eye on mesa-dev@

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


Re: [Piglit] [Mesa-dev] GitLab migration of Piglit

2018-06-05 Thread Eric Engestrom
On Tuesday, 2018-06-05 17:52:17 +0100, Daniel Stone wrote:
> Hi Eric,
> 
> On 5 June 2018 at 17:49, Eric Engestrom  wrote:
> > On Tuesday, 2018-06-05 09:11:58 -0700, Jason Ekstrand wrote:
> >> Given the discussion below, I think we'll make piglit a sub-project of
> >> mesa.  Those who need commit access to piglit but not mesa can be added
> >> directly to the piglit project.
> >>
> >> Unless someone objects strongly, I'll plan to migrate piglit on Thursday
> >> along with all the other mesa repos.
> >
> > "all the other mesa repos"
> > -> could we get a list? :)
> >
> > I assume that's now mesa, libdrm, piglit, shader-db, crucible, kmscube,
> > mesa-demos; what about igt? Anything else?
> 
> We currently have under /git/mesa:
> clover.git
> crucible.git
> demos.git
> drm-gralloc.git
> drm.git
> glu.git
> glut.git
> glw.git
> kmscube.git
> libwsbm.git
> linux-agp-compat.git
> llvm.git
> mesa-test.git
> mesa.git
> r600_demo.git
> rbug-gui
> shader-db.git
> tasks.git
> vkpipeline-db.git
> vmwgfx.git

This might just be my outsider impression, but aren't most of those
dead/no longer maintained?

> 
> Of those, kmscube and crucible have already been migrated.
> 
> Cheers,
> Daniel
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] GitLab migration of Piglit

2018-06-05 Thread Eric Engestrom
On Tuesday, 2018-06-05 09:11:58 -0700, Jason Ekstrand wrote:
> Given the discussion below, I think we'll make piglit a sub-project of
> mesa.  Those who need commit access to piglit but not mesa can be added
> directly to the piglit project.
> 
> Unless someone objects strongly, I'll plan to migrate piglit on Thursday
> along with all the other mesa repos.

"all the other mesa repos"
-> could we get a list? :)

I assume that's now mesa, libdrm, piglit, shader-db, crucible, kmscube,
mesa-demos; what about igt? Anything else?

> 
> On Mon, Jun 4, 2018 at 3:29 PM, Eric Anholt  wrote:
> 
> > Jason Ekstrand  writes:
> >
> > > All,
> > >
> > > Sorry for the mess of GitLab e-mails but there are a lot of questions to
> > > ask as this process moves forward.  Today, we're discussing piglit.  I've
> > > included both the mesa and piglit list in the hopes that people will
> > > actually see this e-mail.
> > >
> > > Honestly, I expect the migration of piglit to have much less impact on
> > most
> > > people's daily lives than moving the mesa repo.
> > >
> > > The biggest question I have is whether we actually want to continue to
> > have
> > > a separate "piglit" group.  With GitLab, we can already give someone
> > > developer access to piglit without giving them developer access to mesa.
> > > Mostly, this is a question of whether we consider piglit to be it's own
> > > project on freedesktop or a sub-project of mesa.  I don't know the answer
> > > to that question.
> >
> > So far, having it be a separate group has just been a pain in getting
> > people to contribute to piglit, when we mistakenly forget to add mesa
> > devs to it.  I don't think we need it to be a separate committer group.
> >

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

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


Re: [Piglit] GitLab migration of Piglit

2018-06-05 Thread Jason Ekstrand
Given the discussion below, I think we'll make piglit a sub-project of
mesa.  Those who need commit access to piglit but not mesa can be added
directly to the piglit project.

Unless someone objects strongly, I'll plan to migrate piglit on Thursday
along with all the other mesa repos.

On Mon, Jun 4, 2018 at 3:29 PM, Eric Anholt  wrote:

> Jason Ekstrand  writes:
>
> > All,
> >
> > Sorry for the mess of GitLab e-mails but there are a lot of questions to
> > ask as this process moves forward.  Today, we're discussing piglit.  I've
> > included both the mesa and piglit list in the hopes that people will
> > actually see this e-mail.
> >
> > Honestly, I expect the migration of piglit to have much less impact on
> most
> > people's daily lives than moving the mesa repo.
> >
> > The biggest question I have is whether we actually want to continue to
> have
> > a separate "piglit" group.  With GitLab, we can already give someone
> > developer access to piglit without giving them developer access to mesa.
> > Mostly, this is a question of whether we consider piglit to be it's own
> > project on freedesktop or a sub-project of mesa.  I don't know the answer
> > to that question.
>
> So far, having it be a separate group has just been a pain in getting
> people to contribute to piglit, when we mistakenly forget to add mesa
> devs to it.  I don't think we need it to be a separate committer group.
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] Add a test for instanced GS inputs.

2018-06-05 Thread Andrii Simiklit
   All of our other tests for instanced geometry shaders don't actually
   transfer the vertices to the geometry shader
   from the vertex shader using gl_Position.
   This used to be broken with the i965 driver's in Mesa 12.1.0
   on revision d10ae20b9678f1a5b8a81716c68e612662665277.
   This test should give us ability to detect
   such kind of bugs like 96354 bug in future.

Signed-off-by: Andrii Simiklit 
---
 .../instanced-inputs-built-in-variable.shader_test | 68 ++
 1 file changed, 68 insertions(+)
 create mode 100644 
tests/spec/arb_gpu_shader5/execution/instanced-inputs-built-in-variable.shader_test

diff --git 
a/tests/spec/arb_gpu_shader5/execution/instanced-inputs-built-in-variable.shader_test
 
b/tests/spec/arb_gpu_shader5/execution/instanced-inputs-built-in-variable.shader_test
new file mode 100644
index 000..86b2bbd
--- /dev/null
+++ 
b/tests/spec/arb_gpu_shader5/execution/instanced-inputs-built-in-variable.shader_test
@@ -0,0 +1,68 @@
+#It seems as duplicate of the "instanced-inputs.shader_test" test but it could 
not detect the bug 96354.
+#It could detect the 96354 bug if and only if vertices are transferred 
+#from vertex shader into geometry shader through built-in variable 
gl_Position. 
+#
+#Specification permits us to do it "11.3.4.4 Geometry Shader Inputs:
+#Structure member gl_Position holds the per-vertex position, as written
+#by the vertex shader to its built-in output variable gl_Position. 
+#Note that writing to gl_Position from either the vertex or geometry 
shader is 
+#optional (also see section 7.1(“Built-In Variables”) of the OpenGL 
Shading Language Specification)"
+
+[require]
+GL >= 2.0
+GLSL >= 1.50
+GL_ARB_gpu_shader5
+
+[vertex shader]
+in vec4 vertex;
+
+void main()
+{   
+   gl_Position = vertex;
+}
+
+[geometry shader]
+#extension GL_ARB_gpu_shader5 : require
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+layout(invocations = 4) in;
+
+void main()
+{
+   vec2 offset;
+   if (gl_InvocationID == 0)
+  offset.xy = vec2(-0.5, -0.5);
+   else if (gl_InvocationID == 1)
+  offset.xy = vec2( 0.5, -0.5);
+   else if (gl_InvocationID == 2)
+  offset.xy = vec2(-0.5,  0.5);
+   else if (gl_InvocationID == 3)
+  offset.xy = vec2( 0.5,  0.5);
+   
+   for (int i = 0; i < 3; i++) {
+   gl_Position = gl_in[i].gl_Position;
+   gl_Position.xy += offset;
+   EmitVertex();
+   }
+}
+
+[fragment shader]
+void main()
+{
+   gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[vertex data]
+vertex/float/2
+-0.5 -0.5
+ 0.5 -0.5
+-0.5  0.0
+ 0.5  0.0
+-0.5  0.5
+ 0.5  0.5
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+draw arrays GL_TRIANGLE_STRIP 0 6
+probe all rgba 0.0 1.0 0.0 1.0
\ No newline at end of file
-- 
2.7.4

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


[Piglit] [PATCH v2] GL_ARB_texture_buffer_object: New test for error behavior.

2018-06-05 Thread Illia Iorin
This test checks that if we allocate more memory for the buffer
 than possible, we get GL_OUT_OF_MEMORY error.
V2:
  - check GL_ARB_texture_buffer_object extension
  - change storage format to GL_RGBA32I
  - check gl compat version 3.1 because
function glTexBuffer() require that version
Signed-off-by: Illia Iorin 
---
 tests/opengl.py   |  1 +
 .../CMakeLists.gl.txt |  1 +
 .../negative-bad-oom.c| 61 +++
 3 files changed, 63 insertions(+)
 create mode 100644 tests/spec/arb_texture_buffer_object/negative-bad-oom.c

diff --git a/tests/opengl.py b/tests/opengl.py
index 9c43d32c9..56cf4f041 100644
--- a/tests/opengl.py
+++ b/tests/opengl.py
@@ -2365,6 +2365,7 @@ with profile.test_list.group_manager(
 g(['arb_texture_buffer_object-max-size'], 'max-size')
 g(['arb_texture_buffer_object-minmax'], 'minmax')
 g(['arb_texture_buffer_object-negative-bad-bo'], 'negative-bad-bo')
+g(['arb_texture_buffer_object-negative-bad-oom'], 'negative-bad-oom')
 g(['arb_texture_buffer_object-negative-bad-format'], 'negative-bad-format')
 g(['arb_texture_buffer_object-negative-bad-target'], 'negative-bad-target')
 g(['arb_texture_buffer_object-negative-unsupported'],
diff --git a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt 
b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
index 959ca0c2f..98d1e16d8 100644
--- a/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_texture_buffer_object/CMakeLists.gl.txt
@@ -25,3 +25,4 @@ piglit_add_executable (arb_texture_buffer_object-subdata-sync 
subdata-sync.c)
 piglit_add_executable (arb_texture_buffer_object-unused-name unused-name.c)
 piglit_add_executable (arb_texture_buffer_object-fetch-outside-bounds 
fetch-outside-bounds.c)
 piglit_add_executable (arb_texture_buffer_object-indexed indexed.c)
+piglit_add_executable (arb_texture_buffer_object-negative-bad-oom 
negative-bad-oom.c)
\ No newline at end of file
diff --git a/tests/spec/arb_texture_buffer_object/negative-bad-oom.c 
b/tests/spec/arb_texture_buffer_object/negative-bad-oom.c
new file mode 100644
index 0..53d4ff3f8
--- /dev/null
+++ b/tests/spec/arb_texture_buffer_object/negative-bad-oom.c
@@ -0,0 +1,61 @@
+/* Copyright © 2018 Illia Iorin 
+ *
+ * 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 negative-bad-oom.c 
+* This test checks  allocat more memory than possible, 
+* the glGetError() will return  GL_OUT_OF_MEMORY error flag 
+*/
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 20;
+   config.supports_gl_core_version = 31;
+
+   config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+   return PIGLIT_FAIL; /* UNREACHED */
+}
+
+
+void
+piglit_init(int argc, char **argv)
+{
+   GLuint tex, tbo;
+   glGenBuffers(1, );
+   glBindBuffer(GL_TEXTURE_BUFFER, tbo);
+
+   glGenTextures(1, );
+   glBindTexture(GL_TEXTURE_BUFFER, tex);
+   glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32I, tbo);
+   glBufferData(GL_TEXTURE_BUFFER,
+INT_MAX , NULL, GL_STATIC_READ);
+   if (!piglit_check_gl_error(GL_OUT_OF_MEMORY))
+   piglit_report_result(PIGLIT_FAIL);
+   piglit_report_result(PIGLIT_PASS);
+}
\ No newline at end of file
-- 
2.17.0

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


[Piglit] [PATCH] general/draw: Test that checks propper render order in mixed draw setups.

2018-06-05 Thread Mathias . Froehlich
From: Mathias Fröhlich 

Hi all,

The description below,
Please review!!

best
Mathias



The test checks for propper immediate mode flushes when array draws
are mixed with immediate mode draws.
The test abstracts out what went wrong in bugzilla #106594.

Signed-off-by: Mathias Fröhlich 
---
 tests/general/CMakeLists.gl.txt |   1 +
 tests/general/draw-flush-vertices.c | 111 
 2 files changed, 112 insertions(+)
 create mode 100644 tests/general/draw-flush-vertices.c

diff --git a/tests/general/CMakeLists.gl.txt b/tests/general/CMakeLists.gl.txt
index ceec9f0b6..7f530974e 100644
--- a/tests/general/CMakeLists.gl.txt
+++ b/tests/general/CMakeLists.gl.txt
@@ -40,6 +40,7 @@ piglit_add_executable (draw-batch draw-batch.c)
 piglit_add_executable (draw-copypixels-sync draw-copypixels-sync.c)
 piglit_add_executable (draw-elements draw-elements.c)
 piglit_add_executable (draw-elements-vs-inputs draw-elements-vs-inputs.c)
+piglit_add_executable (draw-flush-vertices draw-flush-vertices.c)
 piglit_add_executable (draw-pixel-with-texture draw-pixel-with-texture.c)
 piglit_add_executable (draw-sync draw-sync.c)
 piglit_add_executable (draw-pixels draw-pixels.c)
diff --git a/tests/general/draw-flush-vertices.c 
b/tests/general/draw-flush-vertices.c
new file mode 100644
index 0..9932a6bc0
--- /dev/null
+++ b/tests/general/draw-flush-vertices.c
@@ -0,0 +1,111 @@
+/*
+ * Copyright © 2018 Mathias Fröhlich 
+ *
+ * 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.
+ *
+ * Authors:
+ *Mathias Fröhlich 
+ */
+
+/* The test does mixes immediate mode and array draws, but does not
+ * not do an other draw setup past the immediate mode draw. By that
+ * it checks for the order of draws that may be inverted if the queued
+ * immediate mode draws are not properly flushed before the array draw.
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 11;
+
+   config.window_width = 32;
+   config.window_height = 32;
+   config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+void piglit_init(int argc, char **argv)
+{
+   piglit_require_gl_version(11);
+
+   piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
+
+   glDisable(GL_DEPTH_TEST);
+   glClearColor(0.0, 0.0, 0.0, 1.0);
+}
+
+
+enum piglit_result
+piglit_display(void)
+{
+   const GLfloat Vertices[2*4] = {
+   0, 0,
+   piglit_width, 0,
+   piglit_width, piglit_height,
+   0, piglit_height
+   };
+   const GLfloat Colors[4*3] = {
+   1, 0, 0,
+   1, 0, 0,
+   1, 0, 0,
+   1, 0, 0
+   };
+
+   GLboolean pass = GL_TRUE;
+
+   glViewport(0, 0, piglit_width, piglit_height);
+
+   glEnableClientState(GL_VERTEX_ARRAY);
+   glVertexPointer(2, GL_FLOAT, sizeof(GLfloat)*2, Vertices);
+   glEnableClientState(GL_COLOR_ARRAY);
+   glColorPointer(3, GL_FLOAT, sizeof(GLfloat)*3, Colors);
+
+   glClear(GL_COLOR_BUFFER_BIT);
+
+   /* Draw a blue quad */
+   glBegin(GL_QUADS);
+   glColor3f(0, 0, 1);
+   glVertex2fv([0]);
+   glVertex2fv([2]);
+   glVertex2fv([4]);
+   glVertex2fv([6]);
+   glEnd();
+
+   /* OpenGL has to make sure that prior to the glDrawArrays call
+* all immediate mode rendering has landed.
+*/
+
+   /* Draw a red quad */
+   glDrawArrays(GL_QUADS, 0, 4);
+
+   if (!piglit_check_gl_error(GL_NO_ERROR))
+   piglit_report_result(PIGLIT_FAIL);
+
+   /* Check for a red quad that is drawn last */
+   pass = piglit_probe_pixel_rgb(piglit_width/2, piglit_height/2, Colors)
+   && pass;
+
+   glFinish();
+   piglit_present_results();
+
+   return pass ?