Re: [Piglit] [PATCH] gl-2.1: Add a test for alpha testing with multiple render targets

2016-10-26 Thread Brian Paul

On 10/26/2016 04:01 PM, Anuj Phogat wrote:

In a situation when there are multiple render targets with alpha testing
enabled, if fragment shader doesn't write to draw buffer zero, alpha
value used for alpha testing will be undefined. Such case should not
cause a GPU hang.

Signed-off-by: Anuj Phogat 
---
  tests/all.py   |   1 +
  tests/spec/gl-2.1/CMakeLists.gl.txt|   1 +
  .../fbo-mrt-alphatest-no-buffer-zero-write.c   | 152 +
  3 files changed, 154 insertions(+)
  create mode 100644 tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c

diff --git a/tests/all.py b/tests/all.py
index 9b67bae..e56cae8 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1155,6 +1155,7 @@ with profile.group_manager(
  g(['gl-2.1-minmax'], 'minmax')
  g(['gl-2.1-pbo'], 'pbo')
  g(['gl-2.1-polygon-stipple-fs'], 'polygon-stipple-fs')
+g(['gl-2.1-fbo-mrt-alphatest-no-buffer-zero-write'], 
'fbo-mrt-alphatest-no-buffer-zero-write')

  with profile.group_manager(
  PiglitGLTest,
diff --git a/tests/spec/gl-2.1/CMakeLists.gl.txt 
b/tests/spec/gl-2.1/CMakeLists.gl.txt
index dbd1e7a..1ce1443 100644
--- a/tests/spec/gl-2.1/CMakeLists.gl.txt
+++ b/tests/spec/gl-2.1/CMakeLists.gl.txt
@@ -12,3 +12,4 @@ link_libraries (
  piglit_add_executable (gl-2.1-minmax minmax.c)
  piglit_add_executable (gl-2.1-pbo pbo.c)
  piglit_add_executable (gl-2.1-polygon-stipple-fs polygon-stipple-fs.c)
+piglit_add_executable (gl-2.1-fbo-mrt-alphatest-no-buffer-zero-write 
fbo-mrt-alphatest-no-buffer-zero-write.c)
diff --git a/tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c 
b/tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c
new file mode 100644
index 000..51e694b
--- /dev/null
+++ b/tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * 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.
+ */
+
+/*
+ * This test asserts correct behavior for alpha-testing of fragments when
+ * multiple color buffers are being rendered to. In particular, the alpha
+ * component of the color output to draw buffer zero is used for the alpha
+ * test. If draw buffer zero is not written by the fragment shader, alpha
+ * value used for alpha testing is undefined.
+ * From OpenGL 2.1 specification:
+ * "If a fragment shader writes to neither gl FragColor nor gl FragData,
+ * the values of the fragment colors following shader execution are
+ * undefined, and may differ for each fragment color."
+ *
+ * Test should run to completion without a GPU hang.
+ *
+ * This is important for deferred renderers which use alpha-test, and is a
+ * significant edge case for the i965 driver.
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 21;
+
+   config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+GLenum buffers[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, 
GL_COLOR_ATTACHMENT2};
+GLuint fbo;
+GLint prog;
+GLuint color0, color1, color2;
+
+void
+piglit_init(int argc, char **argv)
+{
+   piglit_require_GLSL_version(130);
+
+   glGenFramebuffers(1, );
+   glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+
+   glGenTextures(1, );
+   glBindTexture(GL_TEXTURE_2D, color0);
+   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, 
GL_UNSIGNED_BYTE, NULL);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+   glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 
GL_TEXTURE_2D, color0, 0);
+
+   glGenTextures(1, );
+   glBindTexture(GL_TEXTURE_2D, color1);
+   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, 
GL_UNSIGNED_BYTE, NULL);
+   

[Piglit] [PATCH v2] framework/backends/json: support non-piglit junit files

2016-10-26 Thread Mark Janes
The junit loader is unnecessarily strict with the input that it
accepts.  It expects input generated by piglit, but can be made to
handle junit from other test suites like crucible.

v2: Remove unnecessary initializers
Conditionally parse command for piglit tests
---
 framework/backends/junit.py | 30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 4c9b7af..4032db9 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -361,14 +361,19 @@ def _load(results_file):
 else:
 run_result.name = 'junit result'
 
-tree = 
etree.parse(results_file).getroot().find('.//testsuite[@name="piglit"]')
+tree = etree.parse(results_file).getroot().find('.//testsuite')
 for test in tree.iterfind('testcase'):
 result = results.TestResult()
 # Take the class name minus the 'piglit.' element, replace junit's '.'
 # separator with piglit's separator, and join the group and test names
-name = test.attrib['classname'].split('.', 1)[1]
+name = test.attrib['name']
+if 'classname' in test.attrib:
+name = grouptools.join(test.attrib['classname'], name)
 name = name.replace('.', grouptools.SEPARATOR)
-name = grouptools.join(name, test.attrib['name'])
+is_piglit = False
+if name.startswith("piglit"):
+is_piglit = True
+name = name.split(grouptools.SEPARATOR, 1)[1]
 
 # Remove the trailing _ if they were added (such as to api and search)
 if name.endswith('_'):
@@ -378,14 +383,23 @@ def _load(results_file):
 
 # This is the fallback path, we'll try to overwrite this with the value
 # in stderr
-result.time = results.TimeAttribute(end=float(test.attrib['time']))
-result.err = test.find('system-err').text
+result.time = results.TimeAttribute()
+if 'time' in test.attrib:
+result.time = results.TimeAttribute(end=float(test.attrib['time']))
+syserr = test.find('system-err')
+if syserr is not None:
+result.err = syserr.text
 
 # The command is prepended to system-out, so we need to separate those
 # into two separate elements
-out = test.find('system-out').text.split('\n')
-result.command = out[0]
-result.out = '\n'.join(out[1:])
+out_tag = test.find('system-out')
+if out_tag is not None:
+if is_piglit:
+out = out_tag.text.split('\n')
+result.command = out[0]
+result.out = '\n'.join(out[1:])
+else:
+result.out = out_tag.text
 
 # Try to get the values in stderr for time and pid
 for line in result.err.split('\n'):
-- 
2.9.3

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


Re: [Piglit] [PATCH] framework/backends/json: support non-piglit junit files

2016-10-26 Thread Dylan Baker
Quoting Mark Janes (2016-10-26 17:04:49)
> Dylan Baker  writes:
> 
> > Quoting Mark Janes (2016-10-26 16:30:12)
> >> The junit loader is unnecessarily strict with the input that it
> >> accepts.  It expects input generated by piglit, but can be made to
> >> handle junit from other test suites like crucible.
> >> ---
> >>  framework/backends/junit.py | 28 
> >>  1 file changed, 20 insertions(+), 8 deletions(-)
> >> 
> >> diff --git a/framework/backends/junit.py b/framework/backends/junit.py
> >> index 4c9b7af..ab14074 100644
> >> --- a/framework/backends/junit.py
> >> +++ b/framework/backends/junit.py
> >> @@ -361,14 +361,17 @@ def _load(results_file):
> >>  else:
> >>  run_result.name = 'junit result'
> >>  
> >> -tree = 
> >> etree.parse(results_file).getroot().find('.//testsuite[@name="piglit"]')
> >> +tree = etree.parse(results_file).getroot().find('.//testsuite')
> >>  for test in tree.iterfind('testcase'):
> >>  result = results.TestResult()
> >>  # Take the class name minus the 'piglit.' element, replace 
> >> junit's '.'
> >>  # separator with piglit's separator, and join the group and test 
> >> names
> >> -name = test.attrib['classname'].split('.', 1)[1]
> >> +name = test.attrib['name']
> >> +if 'classname' in test.attrib:
> >> +name = grouptools.join(test.attrib['classname'], name)
> >>  name = name.replace('.', grouptools.SEPARATOR)
> >> -name = grouptools.join(name, test.attrib['name'])
> >> +if name.startswith("piglit"):
> >> +name = name.split(grouptools.SEPARATOR, 1)[1]
> >
> > I assumed that grouptools.split could do this, but apparently not.
> >
> >>  
> >>  # Remove the trailing _ if they were added (such as to api and 
> >> search)
> >>  if name.endswith('_'):
> >> @@ -378,14 +381,23 @@ def _load(results_file):
> >>  
> >>  # This is the fallback path, we'll try to overwrite this with the 
> >> value
> >>  # in stderr
> >> -result.time = 
> >> results.TimeAttribute(end=float(test.attrib['time']))
> >> -result.err = test.find('system-err').text
> >> +result.time = results.TimeAttribute()
> >> +if 'time' in test.attrib:
> >> +result.time = 
> >> results.TimeAttribute(end=float(test.attrib['time']))
> >> +result.err = ""
> >
> > result.err is initialized to "", so no need to set it.
> >
> >> +syserr = test.find('system-err')
> >> +if syserr is not None:
> >> +result.err = syserr.text
> > 
> >>  
> >>  # The command is prepended to system-out, so we need to separate 
> >> those
> >>  # into two separate elements
> >> -out = test.find('system-out').text.split('\n')
> >> -result.command = out[0]
> >> -result.out = '\n'.join(out[1:])
> >> +out_tag = test.find('system-out')
> >
> >> +result.out = ""
> >> +result.command = ""
> >
> > These are initialized to "" as well.
> >
> >> +if out_tag is not None:
> >> +out = out_tag.text.split('\n')
> >> +result.command = out[0]
> >
> > This isn't right, if the suite generates stdout it is assumed that the 
> > command
> > will be the first line, but that isn't true unless piglit generates it. We
> > probably need to do like we do we do with stderr and have a "command: ..." 
> > and
> > search for that.
> 
> You are right.  We could use the earlier check for piglit as the first
> component in the name to conditionally take the first line as the
> command.  Is that acceptable?
> 
> Other suites will have an empty command in the field, which is still
> usable.

Yeah, that's probably fine.

> 
> >> +result.out = '\n'.join(out[1:])
> >>  
> >>  # Try to get the values in stderr for time and pid
> >>  for line in result.err.split('\n'):
> >> -- 
> >> 2.9.3
> >> 
> >
> > Dylan


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


Re: [Piglit] [PATCH] framework/backends/json: support non-piglit junit files

2016-10-26 Thread Mark Janes
Dylan Baker  writes:

> Quoting Mark Janes (2016-10-26 16:30:12)
>> The junit loader is unnecessarily strict with the input that it
>> accepts.  It expects input generated by piglit, but can be made to
>> handle junit from other test suites like crucible.
>> ---
>>  framework/backends/junit.py | 28 
>>  1 file changed, 20 insertions(+), 8 deletions(-)
>> 
>> diff --git a/framework/backends/junit.py b/framework/backends/junit.py
>> index 4c9b7af..ab14074 100644
>> --- a/framework/backends/junit.py
>> +++ b/framework/backends/junit.py
>> @@ -361,14 +361,17 @@ def _load(results_file):
>>  else:
>>  run_result.name = 'junit result'
>>  
>> -tree = 
>> etree.parse(results_file).getroot().find('.//testsuite[@name="piglit"]')
>> +tree = etree.parse(results_file).getroot().find('.//testsuite')
>>  for test in tree.iterfind('testcase'):
>>  result = results.TestResult()
>>  # Take the class name minus the 'piglit.' element, replace junit's 
>> '.'
>>  # separator with piglit's separator, and join the group and test 
>> names
>> -name = test.attrib['classname'].split('.', 1)[1]
>> +name = test.attrib['name']
>> +if 'classname' in test.attrib:
>> +name = grouptools.join(test.attrib['classname'], name)
>>  name = name.replace('.', grouptools.SEPARATOR)
>> -name = grouptools.join(name, test.attrib['name'])
>> +if name.startswith("piglit"):
>> +name = name.split(grouptools.SEPARATOR, 1)[1]
>
> I assumed that grouptools.split could do this, but apparently not.
>
>>  
>>  # Remove the trailing _ if they were added (such as to api and 
>> search)
>>  if name.endswith('_'):
>> @@ -378,14 +381,23 @@ def _load(results_file):
>>  
>>  # This is the fallback path, we'll try to overwrite this with the 
>> value
>>  # in stderr
>> -result.time = results.TimeAttribute(end=float(test.attrib['time']))
>> -result.err = test.find('system-err').text
>> +result.time = results.TimeAttribute()
>> +if 'time' in test.attrib:
>> +result.time = 
>> results.TimeAttribute(end=float(test.attrib['time']))
>> +result.err = ""
>
> result.err is initialized to "", so no need to set it.
>
>> +syserr = test.find('system-err')
>> +if syserr is not None:
>> +result.err = syserr.text
> 
>>  
>>  # The command is prepended to system-out, so we need to separate 
>> those
>>  # into two separate elements
>> -out = test.find('system-out').text.split('\n')
>> -result.command = out[0]
>> -result.out = '\n'.join(out[1:])
>> +out_tag = test.find('system-out')
>
>> +result.out = ""
>> +result.command = ""
>
> These are initialized to "" as well.
>
>> +if out_tag is not None:
>> +out = out_tag.text.split('\n')
>> +result.command = out[0]
>
> This isn't right, if the suite generates stdout it is assumed that the command
> will be the first line, but that isn't true unless piglit generates it. We
> probably need to do like we do we do with stderr and have a "command: ..." and
> search for that.

You are right.  We could use the earlier check for piglit as the first
component in the name to conditionally take the first line as the
command.  Is that acceptable?

Other suites will have an empty command in the field, which is still
usable.

>> +result.out = '\n'.join(out[1:])
>>  
>>  # Try to get the values in stderr for time and pid
>>  for line in result.err.split('\n'):
>> -- 
>> 2.9.3
>> 
>
> Dylan
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [RFC 0/2] egl_android_native_fence_sync tests.

2016-10-26 Thread Rafael Antognolli
On Tue, Oct 25, 2016 at 07:29:16PM -0400, Rob Clark wrote:
> On Tue, Oct 25, 2016 at 5:19 PM, Rafael Antognolli
>  wrote:
> > Hi,
> >
> > I finally got to work on these piglit tests (took longer than I
> > expected). But here is an initial version, and I would like to know if
> > I'm going on the right direction. Particularly I would like to know
> > whether adding the sw_sync lib code that I copied mostly as is from
> > intel-gpu-tools is acceptable/desirable. Also in order to use the
> > sw_sync, one needs to be root on a regular linux distro.
> >
> > I'm still going to add all the tests for trying to create fences from
> > invalid EGLDisplay, and things like that, but I should send those soon.
> >
> > Additionally, I also have a couple questions:
> >
> >  1) I don't see anywhere in the spec mentioning about creating a sync
> >  fence from an invalid fd (or an fd that is not a sync file), but should
> >  I test for it anyway? It looks like an error to me.
> 
> hmm, interesting.. from a practical standpoint, I'm not sure there is
> any good way to discover a bogus fence fd until we do submit/execbuf
> ioctl.  Which means it wouldn't be discovered until you did something
> that triggered a flush.
> 
> I guess on one hand, it is something easy for a user with fd
> refcnt'ing issues to mess up.  On the other hand, for non-debug
> scenario's we wouldn't want to introduce extra overhead..

OK, got your point.

> I wonder if there is some way we could add an ioctl on the fence fd to
> return "are you a valid fence fd" without conflicting with ioctls on
> unrelated fd's?

I don't know, but I could take a look at that if it's really needed (and
assuming nobody does it first). For now I'll just assume it's not
necessary.

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


Re: [Piglit] [PATCH] framework/backends/json: support non-piglit junit files

2016-10-26 Thread Dylan Baker
Quoting Mark Janes (2016-10-26 16:30:12)
> The junit loader is unnecessarily strict with the input that it
> accepts.  It expects input generated by piglit, but can be made to
> handle junit from other test suites like crucible.
> ---
>  framework/backends/junit.py | 28 
>  1 file changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/framework/backends/junit.py b/framework/backends/junit.py
> index 4c9b7af..ab14074 100644
> --- a/framework/backends/junit.py
> +++ b/framework/backends/junit.py
> @@ -361,14 +361,17 @@ def _load(results_file):
>  else:
>  run_result.name = 'junit result'
>  
> -tree = 
> etree.parse(results_file).getroot().find('.//testsuite[@name="piglit"]')
> +tree = etree.parse(results_file).getroot().find('.//testsuite')
>  for test in tree.iterfind('testcase'):
>  result = results.TestResult()
>  # Take the class name minus the 'piglit.' element, replace junit's 
> '.'
>  # separator with piglit's separator, and join the group and test 
> names
> -name = test.attrib['classname'].split('.', 1)[1]
> +name = test.attrib['name']
> +if 'classname' in test.attrib:
> +name = grouptools.join(test.attrib['classname'], name)
>  name = name.replace('.', grouptools.SEPARATOR)
> -name = grouptools.join(name, test.attrib['name'])
> +if name.startswith("piglit"):
> +name = name.split(grouptools.SEPARATOR, 1)[1]

I assumed that grouptools.split could do this, but apparently not.

>  
>  # Remove the trailing _ if they were added (such as to api and 
> search)
>  if name.endswith('_'):
> @@ -378,14 +381,23 @@ def _load(results_file):
>  
>  # This is the fallback path, we'll try to overwrite this with the 
> value
>  # in stderr
> -result.time = results.TimeAttribute(end=float(test.attrib['time']))
> -result.err = test.find('system-err').text
> +result.time = results.TimeAttribute()
> +if 'time' in test.attrib:
> +result.time = 
> results.TimeAttribute(end=float(test.attrib['time']))
> +result.err = ""

result.err is initialized to "", so no need to set it.

> +syserr = test.find('system-err')
> +if syserr is not None:
> +result.err = syserr.text

>  
>  # The command is prepended to system-out, so we need to separate 
> those
>  # into two separate elements
> -out = test.find('system-out').text.split('\n')
> -result.command = out[0]
> -result.out = '\n'.join(out[1:])
> +out_tag = test.find('system-out')

> +result.out = ""
> +result.command = ""

These are initialized to "" as well.

> +if out_tag is not None:
> +out = out_tag.text.split('\n')
> +result.command = out[0]

This isn't right, if the suite generates stdout it is assumed that the command
will be the first line, but that isn't true unless piglit generates it. We
probably need to do like we do we do with stderr and have a "command: ..." and
search for that.

> +result.out = '\n'.join(out[1:])
>  
>  # Try to get the values in stderr for time and pid
>  for line in result.err.split('\n'):
> -- 
> 2.9.3
> 

Dylan


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


[Piglit] [PATCH] framework/backends/json: support non-piglit junit files

2016-10-26 Thread Mark Janes
The junit loader is unnecessarily strict with the input that it
accepts.  It expects input generated by piglit, but can be made to
handle junit from other test suites like crucible.
---
 framework/backends/junit.py | 28 
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 4c9b7af..ab14074 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -361,14 +361,17 @@ def _load(results_file):
 else:
 run_result.name = 'junit result'
 
-tree = 
etree.parse(results_file).getroot().find('.//testsuite[@name="piglit"]')
+tree = etree.parse(results_file).getroot().find('.//testsuite')
 for test in tree.iterfind('testcase'):
 result = results.TestResult()
 # Take the class name minus the 'piglit.' element, replace junit's '.'
 # separator with piglit's separator, and join the group and test names
-name = test.attrib['classname'].split('.', 1)[1]
+name = test.attrib['name']
+if 'classname' in test.attrib:
+name = grouptools.join(test.attrib['classname'], name)
 name = name.replace('.', grouptools.SEPARATOR)
-name = grouptools.join(name, test.attrib['name'])
+if name.startswith("piglit"):
+name = name.split(grouptools.SEPARATOR, 1)[1]
 
 # Remove the trailing _ if they were added (such as to api and search)
 if name.endswith('_'):
@@ -378,14 +381,23 @@ def _load(results_file):
 
 # This is the fallback path, we'll try to overwrite this with the value
 # in stderr
-result.time = results.TimeAttribute(end=float(test.attrib['time']))
-result.err = test.find('system-err').text
+result.time = results.TimeAttribute()
+if 'time' in test.attrib:
+result.time = results.TimeAttribute(end=float(test.attrib['time']))
+result.err = ""
+syserr = test.find('system-err')
+if syserr is not None:
+result.err = syserr.text
 
 # The command is prepended to system-out, so we need to separate those
 # into two separate elements
-out = test.find('system-out').text.split('\n')
-result.command = out[0]
-result.out = '\n'.join(out[1:])
+out_tag = test.find('system-out')
+result.out = ""
+result.command = ""
+if out_tag is not None:
+out = out_tag.text.split('\n')
+result.command = out[0]
+result.out = '\n'.join(out[1:])
 
 # Try to get the values in stderr for time and pid
 for line in result.err.split('\n'):
-- 
2.9.3

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


[Piglit] [PATCH] gl-2.1: Add a test for alpha testing with multiple render targets

2016-10-26 Thread Anuj Phogat
In a situation when there are multiple render targets with alpha testing
enabled, if fragment shader doesn't write to draw buffer zero, alpha
value used for alpha testing will be undefined. Such case should not
cause a GPU hang.

Signed-off-by: Anuj Phogat 
---
 tests/all.py   |   1 +
 tests/spec/gl-2.1/CMakeLists.gl.txt|   1 +
 .../fbo-mrt-alphatest-no-buffer-zero-write.c   | 152 +
 3 files changed, 154 insertions(+)
 create mode 100644 tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c

diff --git a/tests/all.py b/tests/all.py
index 9b67bae..e56cae8 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1155,6 +1155,7 @@ with profile.group_manager(
 g(['gl-2.1-minmax'], 'minmax')
 g(['gl-2.1-pbo'], 'pbo')
 g(['gl-2.1-polygon-stipple-fs'], 'polygon-stipple-fs')
+g(['gl-2.1-fbo-mrt-alphatest-no-buffer-zero-write'], 
'fbo-mrt-alphatest-no-buffer-zero-write')
 
 with profile.group_manager(
 PiglitGLTest,
diff --git a/tests/spec/gl-2.1/CMakeLists.gl.txt 
b/tests/spec/gl-2.1/CMakeLists.gl.txt
index dbd1e7a..1ce1443 100644
--- a/tests/spec/gl-2.1/CMakeLists.gl.txt
+++ b/tests/spec/gl-2.1/CMakeLists.gl.txt
@@ -12,3 +12,4 @@ link_libraries (
 piglit_add_executable (gl-2.1-minmax minmax.c)
 piglit_add_executable (gl-2.1-pbo pbo.c)
 piglit_add_executable (gl-2.1-polygon-stipple-fs polygon-stipple-fs.c)
+piglit_add_executable (gl-2.1-fbo-mrt-alphatest-no-buffer-zero-write 
fbo-mrt-alphatest-no-buffer-zero-write.c)
diff --git a/tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c 
b/tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c
new file mode 100644
index 000..51e694b
--- /dev/null
+++ b/tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * 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.
+ */
+
+/*
+ * This test asserts correct behavior for alpha-testing of fragments when
+ * multiple color buffers are being rendered to. In particular, the alpha
+ * component of the color output to draw buffer zero is used for the alpha
+ * test. If draw buffer zero is not written by the fragment shader, alpha
+ * value used for alpha testing is undefined.
+ * From OpenGL 2.1 specification:
+ * "If a fragment shader writes to neither gl FragColor nor gl FragData,
+ * the values of the fragment colors following shader execution are
+ * undefined, and may differ for each fragment color."
+ *
+ * Test should run to completion without a GPU hang.
+ *
+ * This is important for deferred renderers which use alpha-test, and is a
+ * significant edge case for the i965 driver.
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 21;
+
+   config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+GLenum buffers[] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, 
GL_COLOR_ATTACHMENT2};
+GLuint fbo;
+GLint prog;
+GLuint color0, color1, color2;
+
+void
+piglit_init(int argc, char **argv)
+{
+   piglit_require_GLSL_version(130);
+
+   glGenFramebuffers(1, );
+   glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+
+   glGenTextures(1, );
+   glBindTexture(GL_TEXTURE_2D, color0);
+   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, 
GL_UNSIGNED_BYTE, NULL);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+   glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 
GL_TEXTURE_2D, color0, 0);
+
+   glGenTextures(1, );
+   glBindTexture(GL_TEXTURE_2D, color1);
+   glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, 
GL_UNSIGNED_BYTE, NULL);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+   

Re: [Piglit] [PATCH] arb_enhanced_layouts: fix shader GLSL version requirement

2016-10-26 Thread Timothy Arceri
Reviewed-by: Timothy Arceri 

On Thu, 2016-07-28 at 11:37 +0200, Iago Toral Quiroga wrote:
> The test declares that only GLSL 1.40 is required, but then shaders
> use version 4.20, leading to execution failures if the platform does
> not support 4.20. Just require GLSL 1.40 in the shaders too, since
> that is sufficient and consistent with other similar tests.
> ---
>  .../execution/component-layout/vs-fs-
> doubles.shader_test  | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/spec/arb_enhanced_layouts/execution/component-
> layout/vs-fs-doubles.shader_test
> b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-
> doubles.shader_test
> index de33459..2507668 100644
> --- a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-
> fs-doubles.shader_test
> +++ b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-
> fs-doubles.shader_test
> @@ -7,7 +7,7 @@ GL_ARB_separate_shader_objects
>  GL_ARB_gpu_shader_fp64
>  
>  [vertex shader]
> -#version 420
> +#version 140
>  #extension GL_ARB_enhanced_layouts: require
>  #extension GL_ARB_separate_shader_objects: require
>  #extension GL_ARB_gpu_shader_fp64: require
> @@ -30,7 +30,7 @@ void main()
>  }
>  
>  [fragment shader]
> -#version 420
> +#version 140
>  #extension GL_ARB_enhanced_layouts: require
>  #extension GL_ARB_separate_shader_objects: require
>  #extension GL_ARB_gpu_shader_fp64: require
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [RFC 0/2] egl_android_native_fence_sync tests.

2016-10-26 Thread Chad Versace
On Tue 25 Oct 2016, Rob Clark wrote:
> On Tue, Oct 25, 2016 at 5:19 PM, Rafael Antognolli
>  wrote:
> > Hi,
> >
> > I finally got to work on these piglit tests (took longer than I
> > expected). But here is an initial version, and I would like to know if
> > I'm going on the right direction. Particularly I would like to know
> > whether adding the sw_sync lib code that I copied mostly as is from
> > intel-gpu-tools is acceptable/desirable. Also in order to use the
> > sw_sync, one needs to be root on a regular linux distro.
> >
> > I'm still going to add all the tests for trying to create fences from
> > invalid EGLDisplay, and things like that, but I should send those soon.
> >
> > Additionally, I also have a couple questions:
> >
> >  1) I don't see anywhere in the spec mentioning about creating a sync
> >  fence from an invalid fd (or an fd that is not a sync file), but should
> >  I test for it anyway? It looks like an error to me.
> 
> hmm, interesting.. from a practical standpoint, I'm not sure there is
> any good way to discover a bogus fence fd until we do submit/execbuf
> ioctl.  Which means it wouldn't be discovered until you did something
> that triggered a flush.
> 
> I guess on one hand, it is something easy for a user with fd
> refcnt'ing issues to mess up.  On the other hand, for non-debug
> scenario's we wouldn't want to introduce extra overhead..
> 
> I wonder if there is some way we could add an ioctl on the fence fd to
> return "are you a valid fence fd" without conflicting with ioctls on
> unrelated fd's?
> 
> >  2) The spec mentions that if a fence sync object is created with
> >  attribute EGL_SYNC_NATIVE_FENCE_FD_ANDROID set to
> >  EGL_NO_NATIVE_FENCE_FD_ANDROID, "the next Flush() operation performed
> >  by the current client API causes a new native fence object to be
> >  created, and the EGL_SYNC_NATIVE_FENCE_ANDROID attribute of the EGL
> >  native fence object is set to a file descriptor that refers to the new
> >  native fence object." I'm not sure I fully understand this statement,
> >  so I have no idea how to test it.
> 
> basically, before glFlush() or eglSwapBuffers() (or perhaps some other
> calls that are expected to trigger a flush?) eglDupNativeFenceFD() can
> return -1, but after it should return a valid fence.

The two modes of using EGL_ANDROID_native_fence_sync correspond
to an "in" fence and an "out" fence.

If you give a valid sync fd to eglCreateSync, then the next flush will
submit the fd as an "in" fence along with the submitted batch buffer. The kernel
will schedule the work to begin after the in-fence signals.

If you give fd == -1 to eglCreateSync, then the next flush, when it
submits the batch buffer to i915, will tell the EXECBUFFER2 ioctl
to return an "out" fence fd. The out-fence will signal when the batch
buffer completes execution.

For more details, see I915_EXEC_FENCE_IN and I915_EXEC_FENCE_OUT in this
email:

Subject: [Intel-gfx] [PATCH 41/41] drm/i915: Support explicit fencing for 
execbuf
From: Chris Wilson 
To: intel-...@lists.freedesktop.org
Date: Thu, 20 Oct 2016 16:04:23 +0100
Message-Id: <20161020150423.4560-42-ch...@chris-wilson.co.uk>
In-Reply-To: <20161020150423.4560-1-ch...@chris-wilson.co.uk>
List-Id: 
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] fbo: Add a test for alpha testing with multiple render targets

2016-10-26 Thread Anuj Phogat
On Tue, Oct 25, 2016 at 10:34 PM, Tapani Pälli  wrote:
>
>
> On 10/26/2016 03:05 AM, Brian Paul wrote:
>>
>> On 10/25/2016 03:58 PM, Anuj Phogat wrote:
>>>
>>> In a situation when there are multiple render targets with alpha testing
>>> enabled, if fragment shader doesn't write to draw buffer zero, alpha
>>> value used for alpha testing will be undefined. Such case should not
>>> cause a GPU hang.
>>>
>>> Signed-off-by: Anuj Phogat 
>>> ---
>>>   tests/all.py   |   1 +
>>>   tests/fbo/CMakeLists.gl.txt|   1 +
>>>   tests/fbo/fbo-mrt-alphatest-no-buffer-zero-write.c | 145
>>> +
>>
>>
>> I think we're trying to get away from putting new tests in general/,
>> bugs/, fbo/, etc.
>>
>> How about tests/spec/gl-2.1/fbo-mrt-alphatest-no-buffer-zero-write.c ?
sounds good to me.

>>
>> -Brian
>>
>>
>>>   3 files changed, 147 insertions(+)
>>>   create mode 100644 tests/fbo/fbo-mrt-alphatest-no-buffer-zero-write.c
>>>
>>> diff --git a/tests/all.py b/tests/all.py
>>> index 9b67bae..9e4420e 100644
>>> --- a/tests/all.py
>>> +++ b/tests/all.py
>>> @@ -4196,6 +4196,7 @@ with profile.group_manager(
>>>   grouptools.join('spec', 'arb_draw_buffers')) as g:
>>>   g(['arb_draw_buffers-state_change'], run_concurrent=False)
>>>   g(['fbo-mrt-alphatest'], run_concurrent=False)
>>> +g(['fbo-mrt-alphatest-no-buffer-zero-write'], run_concurrent=False)
>>>   g(['fbo-mrt-new-bind'], run_concurrent=False)
>>>
>>>   with profile.group_manager(
>>> diff --git a/tests/fbo/CMakeLists.gl.txt b/tests/fbo/CMakeLists.gl.txt
>>> index 2e2cac9..e2c03ca 100644
>>> --- a/tests/fbo/CMakeLists.gl.txt
>>> +++ b/tests/fbo/CMakeLists.gl.txt
>>> @@ -73,6 +73,7 @@ piglit_add_executable (fbo-integer fbo-integer.c)
>>>   piglit_add_executable (fbo-maxsize fbo-maxsize.c)
>>>   piglit_add_executable (fbo-mipmap-copypix fbo-mipmap-copypix.c)
>>>   piglit_add_executable (fbo-mrt-alphatest fbo-mrt-alphatest.c)
>>> +piglit_add_executable (fbo-mrt-alphatest-no-buffer-zero-write
>>> fbo-mrt-alphatest-no-buffer-zero-write.c)
>>>   piglit_add_executable (fbo-mrt-new-bind fbo-mrt-new-bind.c)
>>>   piglit_add_executable (fbo-nodepth-test fbo-nodepth-test.c)
>>>   piglit_add_executable (fbo-nostencil-test fbo-nostencil-test.c)
>>> diff --git a/tests/fbo/fbo-mrt-alphatest-no-buffer-zero-write.c
>>> b/tests/fbo/fbo-mrt-alphatest-no-buffer-zero-write.c
>>> new file mode 100644
>>> index 000..ef56d89
>>> --- /dev/null
>>> +++ b/tests/fbo/fbo-mrt-alphatest-no-buffer-zero-write.c
>>> @@ -0,0 +1,145 @@
>>> +/*
>>> + * Copyright © 2016 Intel Corporation
>>> + *
>>> + * 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.
>>> + */
>>> +
>>> +/*
>>> + * This test asserts correct behavior for alpha-testing of fragments
>>> when
>>> + * multiple color buffers are being rendered to. In particular, the
>>> alpha
>>> + * component of the color output to draw buffer zero is used for the
>>> alpha
>>> + * test. If draw buffer zero is not written by the fragment shader,
>>> alpha
>>> + * value used for alpha testing is undefined. This test should run to
>>> + * completion without a GPU hang.
>>> + *
>>> + * This is important for deferred renderers which use alpha-test, and
>>> is a
>>> + * significant edge case for the i965 driver.
>>> + */
>>
>>
>> Where in the GL 2.1 spec does it describe this (the undefined behavior,
>> that is)?  I took a quick look and didn't see it in the "4.1.4 Alpha
>> Test" section.  Can you add a spec quotation?
>
>
> Maybe this? (4.2.1):
>
> "If a fragment shader writes to neither gl FragColor nor gl FragData, the
> values of the fragment colors following shader execution are undefined, and
> may differ for each fragment color."
>
I'll add this 

[Piglit] [PATCH 5/9] arb_enhanced_layouts: More duplicated layout-qualifier-names tests

2016-10-26 Thread Andres Gomez
Added tests for the layout-qualifier-names "max_vertices",
"invocations", "vertices", "local_size_[x|y|z]" and "xfb_stride" which
may have redeclarations but all of them enforce that a global or
variable redeclaration holds the same value than in the previous
declaration(s).

These tests check that multiple appearances of the same
layout-qualifier-name in a single layout qualifier with different values
won't trigger a compile/link error.

From the ARB_enhanced_layouts spec:

"More than one layout qualifier may appear in a single declaration.
 Additionally, the same layout-qualifier-name can occur multiple times
 within a layout qualifier or across multiple layout qualifiers in the
 same declaration. When the same layout-qualifier-name occurs
 multiple times, in a single declaration, the last occurrence overrides
 the former occurrence(s).  Further, if such a layout-qualifier-name
 will effect subsequent declarations or other observable behavior, it
 is only the last occurrence that will have any effect, behaving as if
 the earlier occurrence(s) within the declaration are not present.
 This is also true for overriding layout-qualifier-names, where one
 overrides the other (e.g., row_major vs. column_major); only the last
 occurrence has any effect."

V2:
- Removed link check, as suggested by Timothy.
- Risen GLSL version from 1.40 to 1.50, needed for default
  input/output layout declarations.

Reviewed-by: Timothy Arceri 
Signed-off-by: Andres Gomez 
---
 ...tion-identifiers-in-single-layout-mismatch.geom | 38 +++
 ...le-invocation-identifiers-in-single-layout.geom | 38 +++
 ...size-identifiers-in-single-layout-mismatch.comp | 37 ++
 ...le-local_size-identifiers-in-single-layout.comp | 37 ++
 ...ices-identifiers-in-single-layout-mismatch.geom | 40 
 ...-max_vertices-identifiers-in-single-layout.geom | 40 
 ...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++
 ...iple-vertices-identifiers-in-single-layout.tesc | 39 +++
 ...obal-identifiers-in-single-layout-mismatch.vert | 41 
 ...-block-global-identifiers-in-single-layout.vert | 41 
 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++
 ..._stride-block-identifiers-in-single-layout.vert | 44 ++
 ...obal-identifiers-in-single-layout-mismatch.vert | 37 ++
 ...stride-global-identifiers-in-single-layout.vert | 37 ++
 ...obal-identifiers-in-single-layout-mismatch.vert | 41 
 ...dblock-global-identifiers-in-single-layout.vert | 41 
 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++
 ...de-namedblock-identifiers-in-single-layout.vert | 44 ++
 ...obal-identifiers-in-single-layout-mismatch.vert | 39 +++
 ...riable-global-identifiers-in-single-layout.vert | 39 +++
 ...able-identifiers-in-single-layout-mismatch.vert | 39 +++
 ...ride-variable-identifiers-in-single-layout.vert | 39 +++
 22 files changed, 878 insertions(+)
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout-mismatch.geom
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-invocation-identifiers-in-single-layout.geom
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout-mismatch.comp
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-local_size-identifiers-in-single-layout.comp
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout-mismatch.geom
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-max_vertices-identifiers-in-single-layout.geom
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout-mismatch.tesc
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-vertices-identifiers-in-single-layout.tesc
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout-mismatch.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/duplicate-layout-qualifier-identifiers/multiple-xfb_stride-block-global-identifiers-in-single-layout.vert
 create mode 100644 

[Piglit] [PATCH 4/9] arb_shading_language_420pack: More multiple layout qualifiers in a single declaration tests

2016-10-26 Thread Andres Gomez
Added tests for the layout-qualifier-names "max_vertices",
"invocations", "vertices" and "local_size_[x|y|z]" which may have
redeclarations but all of them enforce that a redeclaration holds the
same value than in the previous declaration(s).

These tests check that multiple appearances of a layout-qualifier-name
across different layout qualifiers with different values in the same
declaration won't trigger a compile/link error.

From the ARB_shading_language_420pack spec:

"More than one layout qualifier may appear in a single declaration. If
 the same layout-qualifier-name occurs in multiple layout qualifiers for
 the same declaration, the last one overrides the former ones."

V2: Removed link check, as suggested by Timothy.

Reviewed-by: Timothy Arceri 
Signed-off-by: Andres Gomez 
---
 ...-invocation-in-single-declaration-mismatch.geom | 31 ++
 .../multiple-invocation-in-single-declaration.geom | 29 
 ...-local_size-in-single-declaration-mismatch.comp | 28 +++
 .../multiple-local_size-in-single-declaration.comp | 28 +++
 ...ax_vertices-in-single-declaration-mismatch.geom | 31 ++
 ...ultiple-max_vertices-in-single-declaration.geom | 31 ++
 ...le-vertices-in-single-declaration-mismatch.tesc | 30 +
 .../multiple-vertices-in-single-declaration.tesc   | 30 +
 8 files changed, 238 insertions(+)
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-local_size-in-single-declaration-mismatch.comp
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-local_size-in-single-declaration.comp
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-max_vertices-in-single-declaration-mismatch.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-max_vertices-in-single-declaration.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-vertices-in-single-declaration-mismatch.tesc
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-vertices-in-single-declaration.tesc

diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom
new file mode 100644
index 000..e55f667
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration-mismatch.geom
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration. If
+// the same layout-qualifier-name occurs in multiple layout qualifiers for
+// the same declaration, the last one overrides the former ones."
+//
+// From the ARB_gpu_shader5 spec:
+//
+//"If an invocation count is declared, all such declarations must
+// specify the same count."
+
+#version 150
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_gpu_shader5 : enable
+
+#version 150
+
+layout(points, invocations=4) layout(invocations=3) in;
+layout(invocations=4) in;
+layout(triangle_strip, max_vertices=3) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom
new file mode 100644
index 000..07a13f7
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-invocation-in-single-declaration.geom
@@ -0,0 +1,29 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5
+// check_link: false
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration. If
+// the same layout-qualifier-name occurs in multiple layout qualifiers for
+// the same declaration, the last one overrides the former ones."
+//
+// From the ARB_gpu_shader5 spec:
+//
+//"If an invocation count is declared, all such declarations must
+// 

[Piglit] [PATCH 7/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single output declaration tests

2016-10-26 Thread Andres Gomez
Added tests to check that all the layout-qualifier-ids in more than
one layout-qualifier in a single non-variable output declaration are
taken into account.

The tests check that this works for value and non-value
layout-qualifier-ids.

From the ARB_shading_language_420pack spec:

"More than one layout qualifier may appear in a single declaration."

Signed-off-by: Andres Gomez 
---
 ...e-layout-qualifier-in-single-declaration-1.geom | 25 ++
 ...e-layout-qualifier-in-single-declaration-2.geom | 25 ++
 ...e-layout-qualifier-in-single-declaration-3.geom | 25 ++
 ...e-layout-qualifier-in-single-declaration-4.geom | 25 ++
 4 files changed, 100 insertions(+)
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-4.geom

diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
new file mode 100644
index 000..50cc657
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-1.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//"All geometry shader output layout declarations in a program must 
declare the
+// same layout and same value for max_vertices."
+
+#version 150
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(lines) in;
+layout(triangle_strip) layout(max_vertices=3) out;
+layout(points) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
new file mode 100644
index 000..11ec500
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-non-value-layout-qualifier-in-single-declaration-2.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//"All geometry shader output layout declarations in a program must 
declare the
+// same layout and same value for max_vertices."
+
+#version 150
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(lines) in;
+layout(max_vertices=3) layout(triangle_strip) out;
+layout(points) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
new file mode 100644
index 000..d2cc48b
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-output-value-layout-qualifier-in-single-declaration-3.geom
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// From section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//"All geometry shader output layout declarations in a program must 
declare the
+// same layout and same value for max_vertices."
+
+#version 150
+#extension GL_ARB_shading_language_420pack: enable
+
+layout(lines) in;
+layout(triangle_strip) layout(max_vertices=3) out;
+layout(max_vertices=2) out;
+
+void main()
+{
+}
diff --git 

[Piglit] [PATCH 6/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single input declaration tests

2016-10-26 Thread Andres Gomez
Added tests to check that all the layout-qualifier-ids in more than
one layout-qualifier in a single non-variable input declaration are
taken into account.

The tests check that this works for value and non-value
layout-qualifier-ids.

From the ARB_shading_language_420pack spec:

"More than one layout qualifier may appear in a single declaration."

Signed-off-by: Andres Gomez 
---
 ...e-layout-qualifier-in-single-declaration-1.geom | 31 ++
 ...e-layout-qualifier-in-single-declaration-2.geom | 31 ++
 ...e-layout-qualifier-in-single-declaration-3.geom | 26 ++
 ...e-layout-qualifier-in-single-declaration-4.geom | 26 ++
 4 files changed, 114 insertions(+)
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-4.geom

diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom
new file mode 100644
index 000..4e36e3c
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-1.geom
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//"For inputs declared without an array size, including
+// intrinsically declared inputs (i.e., gl_in), a layout must be
+// declared before any use of the method length() or other array
+// use requiring its size be known."
+
+#version 150
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(lines) layout(invocations=4) in;
+layout(triangle_strip, max_vertices=3) out;
+
+in vec4 Color1[];
+
+uniform int foo[Color1.length() == 2 ? 1 : -1];
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom
new file mode 100644
index 000..449d975
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-non-value-layout-qualifier-in-single-declaration-2.geom
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//"For inputs declared without an array size, including
+// intrinsically declared inputs (i.e., gl_in), a layout must be
+// declared before any use of the method length() or other array
+// use requiring its size be known."
+
+#version 150
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_gpu_shader5 : enable
+
+layout(invocations=4) layout(lines) in;
+layout(triangle_strip, max_vertices=3) out;
+
+in vec4 Color1[];
+
+uniform int foo[Color1.length() == 2 ? 1 : -1];
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom
new file mode 100644
index 000..d07bd97
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-input-value-layout-qualifier-in-single-declaration-3.geom
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_gpu_shader5
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//

[Piglit] [PATCH 9/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single buffer declaration tests

2016-10-26 Thread Andres Gomez
Added tests to check that all the layout-qualifier-ids in more than
one layout-qualifier in a single non-variable buffer declaration are
taken into account.

The tests check that this works for non-value layout-qualifier-ids. So
far, there is no value layout-qualifier-ids with which to check.

From the ARB_shading_language_420pack spec:

"More than one layout qualifier may appear in a single declaration."

Signed-off-by: Andres Gomez 
---
 ...e-layout-qualifier-in-single-declaration-1.vert | 31 ++
 ...e-layout-qualifier-in-single-declaration-2.vert | 31 ++
 2 files changed, 62 insertions(+)
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert

diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert
new file mode 100644
index 000..65e6ac6
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-1.vert
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts 
GL_ARB_shader_storage_buffer_object
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// ARB_enhanced_layouts spec says:
+//
+//"The *align* qualifier can only be used on blocks or block
+// members, and only for blocks declared with *std140* or *std430*
+// layouts."
+
+#version 140
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std140) layout(row_major) buffer;
+
+layout(align = 32) buffer b {
+   vec4 var1;
+   vec4 var2;
+};
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert
new file mode 100644
index 000..65e6ac6
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-buffer-non-value-layout-qualifier-in-single-declaration-2.vert
@@ -0,0 +1,31 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts 
GL_ARB_shader_storage_buffer_object
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// ARB_enhanced_layouts spec says:
+//
+//"The *align* qualifier can only be used on blocks or block
+// members, and only for blocks declared with *std140* or *std430*
+// layouts."
+
+#version 140
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_enhanced_layouts : enable
+#extension GL_ARB_shader_storage_buffer_object : enable
+
+layout(std140) layout(row_major) buffer;
+
+layout(align = 32) buffer b {
+   vec4 var1;
+   vec4 var2;
+};
+
+void main()
+{
+}
-- 
2.9.3

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


[Piglit] [PATCH 8/9] arb_shading_language_420pack: Adds multiple layout qualifiers in a single uniform declaration tests

2016-10-26 Thread Andres Gomez
Added tests to check that all the layout-qualifier-ids in more than
one layout-qualifier in a single non-variable uniform declaration are
taken into account.

The tests check that this works for non-value layout-qualifier-ids. So
far, there is no value layout-qualifier-ids with which to check.

From the ARB_shading_language_420pack spec:

"More than one layout qualifier may appear in a single declaration."

Signed-off-by: Andres Gomez 
---
 ...e-layout-qualifier-in-single-declaration-1.vert | 30 ++
 ...e-layout-qualifier-in-single-declaration-2.vert | 30 ++
 2 files changed, 60 insertions(+)
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
 create mode 100644 
tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert

diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
new file mode 100644
index 000..947444f
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-1.vert
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// ARB_enhanced_layouts spec says:
+//
+//"The *align* qualifier can only be used on blocks or block
+// members, and only for blocks declared with *std140* or *std430*
+// layouts."
+
+#version 140
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(std140) layout(row_major) uniform;
+
+layout(align = 32) uniform block {
+   vec4 var1;
+   vec4 var2;
+};
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert
 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert
new file mode 100644
index 000..c82547a
--- /dev/null
+++ 
b/tests/spec/arb_shading_language_420pack/compiler/layout-qualifiers/multiple-uniform-non-value-layout-qualifier-in-single-declaration-2.vert
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.40
+// require_extensions: GL_ARB_shading_language_420pack GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the ARB_shading_language_420pack spec:
+//
+//"More than one layout qualifier may appear in a single declaration."
+//
+// ARB_enhanced_layouts spec says:
+//
+//"The *align* qualifier can only be used on blocks or block
+// members, and only for blocks declared with *std140* or *std430*
+// layouts."
+
+#version 140
+#extension GL_ARB_shading_language_420pack: enable
+#extension GL_ARB_enhanced_layouts : enable
+
+layout(row_major) layout(std140) uniform;
+
+layout(align = 32) uniform block {
+   vec4 var1;
+   vec4 var2;
+};
+
+void main()
+{
+}
-- 
2.9.3

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


[Piglit] [PATCH 1/9] glsl-1.50: Add GS output layout qualifier redeclaration test

2016-10-26 Thread Andres Gomez
Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec says:

"All geometry shader output layout declarations in a program must declare 
the
 same layout and same value for max_vertices."

V2: Renamed test, as suggested by Timothy.

Reviewed-by: Timothy Arceri 
Signed-off-by: Andres Gomez 
---
 ...declaration-per-program-max-verts-mismatch.geom | 22 +++
 ...-one-out-declaration-per-program-max-verts.geom | 25 +-
 2 files changed, 42 insertions(+), 5 deletions(-)
 create mode 100644 
tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom

diff --git 
a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom
 
b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom
new file mode 100644
index 000..c3b067f
--- /dev/null
+++ 
b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts-mismatch.geom
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
+// "All geometry shader output layout declarations in a program must declare 
the
+//  same layout and same value for max_vertices."
+
+#version 150
+
+layout(lines) in;
+layout(line_strip, max_vertices=2) out;
+
+in vec4 pos[];
+
+layout(line_strip, max_vertices=3) out;
+
+void main()
+{
+}
diff --git 
a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom
 
b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom
index c3b067f..da8a86c 100644
--- 
a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom
+++ 
b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program-max-verts.geom
@@ -1,21 +1,36 @@
 // [config]
-// expect_result: fail
+// expect_result: pass
 // glsl_version: 1.50
 // check_link: true
 // [end config]
 //
-// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:
-// "All geometry shader output layout declarations in a program must declare 
the
-//  same layout and same value for max_vertices."
+// Section 4.3.8.2 (Output Layout Qualifiers) of the GLSL 1.50 spec says:
+//
+//"layout(triangle_strip, max_vertices = 60) out; // order does not matter
+// layout(max_vertices = 60) out; // redeclaration okay (*)
+// layout(triangle_strip) out;// redeclaration okay (*)
+// layout(points) out;// error, contradicts 
triangle_strip
+// layout(max_vertices = 30) out; // error, contradicts 60"
+//
+//...
+//
+//"All geometry shader output layout declarations in a program must 
declare the
+// same layout and same value for max_vertices."
+//
+// This test verifies the case marked with (*), namely that no error
+// results from declaring a geometry shader output layout that is
+// consistent with a previously declared geometry shader output layout.
 
 #version 150
 
 layout(lines) in;
-layout(line_strip, max_vertices=2) out;
+layout(line_strip, max_vertices=3) out;
 
 in vec4 pos[];
 
 layout(line_strip, max_vertices=3) out;
+layout(max_vertices=3) out;
+layout(line_strip) out;
 
 void main()
 {
-- 
2.9.3

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


[Piglit] [PATCH v2 0/9] More duplicated layout-qualifier-names tests

2016-10-26 Thread Andres Gomez
This series complements the work done for mesa at:
https://lists.freedesktop.org/archives/mesa-dev/2016-October/132990.html

Briefing, this is a new set of tests that check the ability to support
multiple layout-qualifers in a single declaration and that only the
right-most appearance of the same layout-qualifier-name, in a single
layout-qualifier or across multiple layout-qualifiers in a single
declaration is taken into account.

The ARB_shading_language_420pack spec adds the support for multiple
layout-qualifiers in the same declaration.

The ARB_enhanced_layouts spec adds the support to repeat the same
layout-qualifier-name inside a single layout-qualifier.

The main changes in this v2 series are:
  Patch 1/9 has been modified renaming the additional test on it.
  Patches 4/9 and 5/9 have been modified to remove the link check.
  Patch 5/9 has been modified to check for GLSL 1.50 instead of just
1.40.
  Old patches 5/7 and 7/7 have been removed, which was testing
multiple layout-qualifiers in the same declaration with
ARB_enhanced_layouts in addition to ARB_shading_language_420pack.
  Patches 6/9, 7/9, 8/9 and 9/9 have been added with extra tests.

Andres Gomez (9):
  glsl-1.50: Add GS output layout qualifier redeclaration test
  arb_tessellation_shader: Add tests for TCS output size redeclaration
  arb_enhanced_layouts: Add more xfb_stride redeclaration tests
  arb_shading_language_420pack: More multiple layout qualifiers in a
single declaration tests
  arb_enhanced_layouts: More duplicated layout-qualifier-names tests
  arb_shading_language_420pack: Adds multiple layout qualifiers in a
single input declaration tests
  arb_shading_language_420pack: Adds multiple layout qualifiers in a
single output declaration tests
  arb_shading_language_420pack: Adds multiple layout qualifiers in a
single uniform declaration tests
  arb_shading_language_420pack: Adds multiple layout qualifiers in a
single buffer declaration tests

 ...tion-identifiers-in-single-layout-mismatch.geom | 38 +++
 ...le-invocation-identifiers-in-single-layout.geom | 38 +++
 ...size-identifiers-in-single-layout-mismatch.comp | 37 ++
 ...le-local_size-identifiers-in-single-layout.comp | 37 ++
 ...ices-identifiers-in-single-layout-mismatch.geom | 40 
 ...-max_vertices-identifiers-in-single-layout.geom | 40 
 ...ices-identifiers-in-single-layout-mismatch.tesc | 39 +++
 ...iple-vertices-identifiers-in-single-layout.tesc | 39 +++
 ...obal-identifiers-in-single-layout-mismatch.vert | 41 
 ...-block-global-identifiers-in-single-layout.vert | 41 
 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++
 ..._stride-block-identifiers-in-single-layout.vert | 44 ++
 ...obal-identifiers-in-single-layout-mismatch.vert | 37 ++
 ...stride-global-identifiers-in-single-layout.vert | 37 ++
 ...obal-identifiers-in-single-layout-mismatch.vert | 41 
 ...dblock-global-identifiers-in-single-layout.vert | 41 
 ...lock-identifiers-in-single-layout-mismatch.vert | 44 ++
 ...de-namedblock-identifiers-in-single-layout.vert | 44 ++
 ...obal-identifiers-in-single-layout-mismatch.vert | 39 +++
 ...riable-global-identifiers-in-single-layout.vert | 39 +++
 ...able-identifiers-in-single-layout-mismatch.vert | 39 +++
 ...ride-variable-identifiers-in-single-layout.vert | 39 +++
 .../xfb_stride/block-stride-match-global.vert  | 31 +++
 .../xfb_stride/block-stride-match.vert | 29 ++
 .../xfb_stride/block-stride-mismatch-global.vert   | 31 +++
 .../xfb_stride/block-stride-mismatch.vert  | 29 ++
 .../xfb_stride/global-stride-match.vert| 22 +++
 .../xfb_stride/global-stride-mismatch.vert | 22 +++
 .../named-block-stride-match-global.vert   | 31 +++
 .../xfb_stride/named-block-stride-match.vert   | 29 ++
 .../named-block-stride-mismatch-global.vert| 31 +++
 .../xfb_stride/named-block-stride-mismatch.vert| 29 ++
 .../xfb_stride/variable-stride-match-global.vert   | 26 +
 .../xfb_stride/variable-stride-match.vert  | 24 
 .../variable-stride-mismatch-global.vert   |  6 +--
 .../xfb_stride/variable-stride-mismatch.vert   |  6 +--
 ...e-layout-qualifier-in-single-declaration-1.vert | 31 +++
 ...e-layout-qualifier-in-single-declaration-2.vert | 31 +++
 ...e-layout-qualifier-in-single-declaration-1.geom | 31 +++
 ...e-layout-qualifier-in-single-declaration-2.geom | 31 +++
 

Re: [Piglit] [PATCH 0/3] Fix summary breakage

2016-10-26 Thread Michel Dänzer
On 26/10/16 04:54 AM, Dylan Baker wrote:
> This little series fixes three bugs in the summary code:
> 
> The first one fixes the argument help message being returned when an unrelated
> exception is raised.
> 
> The second fixes summarizing JSON results, which were broken due to incorrect
> deserialization.
> 
> The third fixes summarizing JUnit results, which were broken due to incorrect
> deserialization, this is a separate bug from the one that affected the JSON
> loader.
> 
> This is available at my github:
> https://github.com/dcbaker/piglit wip/fix-summary
> 
> Mark and Michel,
> I'd appreciate if you could test this and make sure it fixes your respective
> problems.

It does, thanks. Patches 1 & 2 are

Tested-by: Michel Dänzer 


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit