Re: [Piglit] [PATCH] xts: Add a rendercheck case for a bug I made in glamor.

2016-01-21 Thread Dave Airlie
On 22 January 2016 at 12:37, Eric Anholt  wrote:
> Drawing to a8 is special now, and I missed it in the CA path.
> ---

Reviewed-by: Dave Airlie 
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] xts: Add a rendercheck case for a bug I made in glamor.

2016-01-21 Thread Eric Anholt
Drawing to a8 is special now, and I missed it in the CA path.
---
 tests/xts.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/xts.py b/tests/xts.py
index c7d55e3..6798e70 100644
--- a/tests/xts.py
+++ b/tests/xts.py
@@ -227,6 +227,7 @@ def _populate_profile_rendercheck(profile):
 _add_rendercheck_test(profile, 'composite/All/x8r8g8b8', '-t composite -f 
a8r8g8b8,x8r8g8b8')
 _add_rendercheck_test(profile, 'composite/All/a2r10g10b10', '-t composite 
-f a8r8g8b8,a2r10g10b10')
 _add_rendercheck_test(profile, 'ca composite/All/a8r8g8b8', '-t 
cacomposite -f a8r8g8b8')
+_add_rendercheck_test(profile, 'ca composite/All/a8', '-t cacomposite -f 
a8r8g8b8,a8')
 _add_rendercheck_test(profile, 'ca composite/All/x8r8g8b8', '-t 
cacomposite -f a8r8g8b8,x8r8g8b8')
 _add_rendercheck_test(profile, 'ca composite/All/a2r10g10b10', '-t 
cacomposite -f a8r8g8b8,a2r10g10b10')
 _add_rendercheck_test(profile, 'fill', '-t fill')
-- 
2.6.4

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


Re: [Piglit] [PATCH] sso: add test for linking gs without explicit locations

2016-01-21 Thread Timothy Arceri
On Thu, 2016-01-21 at 08:45 -0500, Ilia Mirkin wrote:
> Mesa treats each GS input as taking up 3 locations instead of 1,
> because
> it doesn't de-array the vars. This causes it to take col3 from VS
> instead of col1.
> 
> Signed-off-by: Ilia Mirkin 

As discussed on IRC the desktop spec leaves SSO interface validation up
to the dev so the mismatch between VS and GS should be fine as far as I
understand.

Reviewed-by: Timothy Arceri 


> ---
>  .../execution/vs-gs-linking.shader_test| 57
> ++
>  1 file changed, 57 insertions(+)
>  create mode 100644
> tests/spec/arb_separate_shader_objects/execution/vs-gs
> -linking.shader_test
> 
> diff --git a/tests/spec/arb_separate_shader_objects/execution/vs-gs
> -linking.shader_test
> b/tests/spec/arb_separate_shader_objects/execution/vs-gs
> -linking.shader_test
> new file mode 100644
> index 000..938df13
> --- /dev/null
> +++ b/tests/spec/arb_separate_shader_objects/execution/vs-gs
> -linking.shader_test
> @@ -0,0 +1,57 @@
> +[require]
> +GLSL >= 1.50
> +SSO ENABLED
> +
> +[vertex shader]
> +#version 150
> +
> +in vec4 piglit_vertex;
> +out vec4 col0;
> +out vec4 col1;
> +out vec4 col2;
> +out vec4 col3;
> +out vec4 col4;
> +out vec4 col5;
> +
> +void main() {
> +  gl_Position = piglit_vertex;
> +  col1 = vec4(0, 1, 0, 1);
> +  col0 = col2 = col3 = col4 = col5 = vec4(1, 0, 0, 1);
> +}
> +
> +[geometry shader]
> +#version 150
> +
> +layout (triangles) in;
> +layout (triangle_strip, max_vertices=3) out;
> +
> +in vec4 color0[];
> +in vec4 color1[];
> +
> +out vec4 color;
> +
> +void main() {
> +  int i;
> +  for (i = 0; i < 3; i++) {
> +gl_Position = gl_in[i].gl_Position;
> +color = color1[i];
> +EmitVertex();
> +  }
> +}
> +
> +[fragment shader]
> +#version 150
> +
> +in vec4 color;
> +out vec4 col;
> +
> +void main() {
> +  col = color;
> +}
> +
> +[test]
> +clear color 0.2 0.2 0.2 0.2
> +clear
> +
> +draw rect -1 -1 2 2
> +probe all rgba 0 1 0 1
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2 1/5] piglit_num_components: add more pixel unpack formats

2016-01-21 Thread Ilia Mirkin
On Thu, Jan 21, 2016 at 3:33 PM, Nicolai Hähnle  wrote:
> From: Nicolai Hähnle 
>
> ---
>  tests/util/piglit-util-gl.c | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
> index bbc174d..61764fb 100644
> --- a/tests/util/piglit-util-gl.c
> +++ b/tests/util/piglit-util-gl.c
> @@ -909,14 +909,19 @@ piglit_num_components(GLenum base_format)

This is no longer about base formats, right? I don't think
GL_GREEN/BLUE can be base formats (or GL_BGRA). I have a mild
preference to renaming this to just "format". Not going to insist on
it though.

Either way, Reviewed-by: Ilia Mirkin 

> case GL_INTENSITY:
> case GL_LUMINANCE:
> case GL_RED:
> +   case GL_GREEN:
> +   case GL_BLUE:
> return 1;
> case GL_DEPTH_STENCIL:
> case GL_LUMINANCE_ALPHA:
> case GL_RG:
> return 2;
> case GL_RGB:
> +   case GL_BGR:
> return 3;
> case GL_RGBA:
> +   case GL_BGRA:
> +   case GL_ABGR_EXT:
> return 4;
> default:
> printf("Unknown num_components for %s\n",
> --
> 2.5.0
>
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH v2 4/5] Add texturing/texsubimage-unpack

2016-01-21 Thread Nicolai Hähnle
From: Nicolai Hähnle 

This is similar to the texsubimage test, but checks various type and format
conversions as well as a different set of pixel unpack settings.

v2: cleanups and share some code with texsubimage
---
 tests/all.py |   2 +
 tests/texturing/CMakeLists.gl.txt|   1 +
 tests/texturing/texsubimage-unpack.c | 525 +++
 3 files changed, 528 insertions(+)
 create mode 100644 tests/texturing/texsubimage-unpack.c

diff --git a/tests/all.py b/tests/all.py
index f57d205..bb174cb 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -934,6 +934,7 @@ with profile.group_manager(
 g(['streaming-texture-leak'], run_concurrent=False)
 g(['texredefine'], run_concurrent=False)
 g(['texsubimage'], run_concurrent=False)
+g(['texsubimage-unpack'])
 g(['texsubimage-depth-formats'], run_concurrent=False)
 g(['texture-al'], run_concurrent=False)
 g(['triangle-guardband-viewport'])
@@ -2294,6 +2295,7 @@ with profile.group_manager(
 g(['texsubimage', 'pbo'])
 g(['texsubimage', 'array', 'pbo'])
 g(['texsubimage', 'cube_map_array', 'pbo'])
+g(['texsubimage-unpack', 'pbo'])
 
 # Group ARB_provoking_vertex
 with profile.group_manager(
diff --git a/tests/texturing/CMakeLists.gl.txt 
b/tests/texturing/CMakeLists.gl.txt
index 704ea6d..495acc8 100644
--- a/tests/texturing/CMakeLists.gl.txt
+++ b/tests/texturing/CMakeLists.gl.txt
@@ -90,6 +90,7 @@ IF (UNIX)
target_link_libraries (tex-srgb m)
 ENDIF (UNIX)
 piglit_add_executable (texsubimage texsubimage.c)
+piglit_add_executable (texsubimage-unpack texsubimage-unpack.c)
 piglit_add_executable (texture-al texture-al.c)
 piglit_add_executable (texture-rg texture-rg.c)
 piglit_add_executable (teximage-colors teximage-colors.c)
diff --git a/tests/texturing/texsubimage-unpack.c 
b/tests/texturing/texsubimage-unpack.c
new file mode 100644
index 000..cb81053
--- /dev/null
+++ b/tests/texturing/texsubimage-unpack.c
@@ -0,0 +1,525 @@
+/*
+ * Copyright 2016 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS 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.
+ */
+
+/*
+ * Test that glTexSubImage*D works correctly with GL_UNPACK_ALIGNMENT,
+ * component mapping, and type conversions.
+ */
+
+#include "piglit-util-gl.h"
+#include "../fbo/fbo-formats.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 10;
+
+   config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+
+   config.window_width = 512;
+   config.window_height = 512;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+#define TEX_WIDTH 32
+#define TEX_HEIGHT 16
+
+/* If set to true then the texture sub image upload will be read
+ * from a PBO */
+static bool use_pbo = false;
+
+static bool have_ARB_texture_rg = false;
+static bool have_EXT_bgra = false;
+static bool have_EXT_abgr = false;
+
+struct src_format_desc {
+   GLenum format;
+   int8_t data_swizzle[4];
+   int8_t tex_swizzle[4];
+   bool *enable;
+};
+
+static const struct src_format_desc test_src_formats[] = {
+#define X (-1)
+#define Y (-2)
+   /* This is first because we test it with all types. */
+   { GL_RGBA,{ 0, 1, 2, 3 }, { 0, 1, 2, 3 } },
+
+   /* Remainder is in the order of Table 8.8 of the OpenGL 4.5
+* (Compatibility Profile) spec. */
+   { GL_RED, { 0, }, { 0, X, X, Y } },
+   { GL_GREEN,   { 1, }, { X, 1, X, Y } },
+   { GL_BLUE,{ 2, }, { X, X, 2, Y } },
+   { GL_ALPHA,   { 3, }, { X, X, X, 3 } },
+   { GL_RG,  { 0, 1 },   { 0, 1, X, Y }, 
&have_ARB_texture_rg },
+   { GL_RGB, { 0, 1, 2, },   { 0, 1, 2, Y } },
+   { GL_BGR, { 2, 1, 0, },   { 0, 1, 2, Y }, &have_EXT_bgra },
+   { GL_BGRA,{ 2, 1, 0, 3 }, { 0, 1, 2, 3 }, &have_EXT_bgra },
+   { GL_LUMINANCE,   

[Piglit] [PATCH v2 2/5] Add piglit_equal_images_update_rgba8 to piglit-util-gl

2016-01-21 Thread Nicolai Hähnle
From: Nicolai Hähnle 

This is a slightly extended variant of equal_images from texsubimage
which will also be used in the new texsubimage-unpack test.

I've decided to call it "equal" instead of "compare", since I feel that
makes the meaning of the return value more obvious.
---
 tests/texturing/texsubimage.c | 28 +++-
 tests/util/piglit-util-gl.c   | 60 +++
 tests/util/piglit-util-gl.h   |  7 +
 3 files changed, 71 insertions(+), 24 deletions(-)

diff --git a/tests/texturing/texsubimage.c b/tests/texturing/texsubimage.c
index c66f93c..cc8f6b5 100644
--- a/tests/texturing/texsubimage.c
+++ b/tests/texturing/texsubimage.c
@@ -228,9 +228,6 @@ equal_images(GLenum target,
 GLuint tx, GLuint ty, GLuint tz,
 GLuint tw, GLuint th, GLuint td)
 {
-   const GLubyte *ref;
-   GLuint z, y, x;
-
switch (target) {
case GL_TEXTURE_1D:
ty = 0;
@@ -243,27 +240,10 @@ equal_images(GLenum target,
break;
}
 
-   for (z = 0; z < d; z++) {
-   for (y = 0; y < h; y++) {
-   for (x = 0; x < w; x++) {
-   if (x >= tx && x < tx + tw &&
-   y >= ty && y < ty + th &&
-   z >= tz && z < tz + td)
-   ref = updated_ref;
-   else
-   ref = original_ref;
-
-   if (memcmp(ref, testImg, 4))
-   return GL_FALSE;
-
-   testImg += 4;
-   original_ref += 4;
-   updated_ref += 4;
-   }
-   }
-   }
-
-   return GL_TRUE;
+   return piglit_equal_images_update_rgba8(original_ref, updated_ref, 
testImg,
+   w, h, d,
+   tx, ty, tz, tw, th, td,
+   8);
 }
 
 /**
diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 61764fb..8052a29 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -1573,6 +1573,66 @@ piglit_compare_images_ubyte(int x, int y, int w, int h,
 }
 
 /**
+ * Compare the image (array) stored in \p observed with the image obtained from
+ * \p expected_original with the box described by ux,uy,uz and uw,uh,ud
+ * replaced by \p expected_updated.
+ *
+ * Only the highest \p bits bits of all four channels are compared.
+ */
+int
+piglit_equal_images_update_rgba8(const GLubyte *expected_original,
+const GLubyte *expected_updated,
+const GLubyte *observed,
+unsigned w, unsigned h, unsigned d,
+unsigned ux, unsigned uy, unsigned uz,
+unsigned uw, unsigned uh, unsigned ud,
+unsigned bits)
+{
+   assert(bits > 0 && bits <= 8);
+
+   unsigned x, y, z;
+   const uint8_t compare_mask = 0xff << (8 - bits);
+
+   for (z = 0; z < d; ++z) {
+   for (y = 0; y < h; y++) {
+   for (x = 0; x < w; x++) {
+   const GLubyte *ref;
+
+   if (x >= ux && x < ux + uw &&
+   y >= uy && y < uy + uh &&
+   z >= uz && z < uz + ud)
+   ref = expected_updated;
+   else
+   ref = expected_original;
+
+   bool fail =
+   ((ref[0] ^ observed[0]) |
+(ref[1] ^ observed[1]) |
+(ref[2] ^ observed[2]) |
+(ref[3] ^ observed[3])) &
+   compare_mask;
+   if (fail) {
+   printf("%u,%u,%u: test = %u,%u,%u,%u "
+   "ref = %u,%u,%u,%u (comparing 
%u bits)\n",
+   x, y, z,
+   observed[0], observed[1],
+   observed[2], observed[3],
+   ref[0], ref[1], ref[2], ref[3],
+   bits);
+   return 0;
+   }
+
+   observed += 4;
+   expected_original += 4;
+   expected_updated += 4;
+   }
+   }
+ 

[Piglit] [PATCH v2 3/5] fbo-formats: include information about number of bits in sized formats

2016-01-21 Thread Nicolai Hähnle
From: Nicolai Hähnle 

The idea is that tests can get an idea of how much precision to expect when
using these formats.

v2: clarify that min_bits is for the depth component (Ian Romanick)
---
 tests/fbo/fbo-formats.h | 396 
 1 file changed, 202 insertions(+), 194 deletions(-)

diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
index d73e282..42a12ea 100644
--- a/tests/fbo/fbo-formats.h
+++ b/tests/fbo/fbo-formats.h
@@ -40,278 +40,286 @@ struct format_desc {
 * GL_RG, GL_RGB, GL_RGBA.
 */
GLenum base_internal_format;
+
+   /* For color formats, the number of bits in the smallest channel for
+* the sized formats and 0 for unsized and compressed formats.
+*
+* For sized depth/stencil formats, the number of bits in the depth
+* component (i.e., 0 for stencil-only formats).
+*/
+   unsigned min_bits;
 };
 
-#define FORMAT(f, base_internal_format) { f, #f, base_internal_format }
+#define FORMAT(f, base_internal_format, min_bits) { f, #f, 
base_internal_format, min_bits }
 static const struct format_desc core[] = {
-   FORMAT(3, GL_RGB),
-   FORMAT(4, GL_RGBA),
-   FORMAT(GL_RGB, GL_RGB),
-   FORMAT(GL_RGBA, GL_RGBA),
-   FORMAT(GL_ALPHA, GL_ALPHA),
-   FORMAT(GL_LUMINANCE, GL_LUMINANCE),
-   FORMAT(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA),
-   FORMAT(GL_INTENSITY, GL_INTENSITY),
-
-   FORMAT(GL_ALPHA4, GL_ALPHA),
-   FORMAT(GL_ALPHA8, GL_ALPHA),
-   FORMAT(GL_ALPHA12, GL_ALPHA),
-   FORMAT(GL_ALPHA16, GL_ALPHA),
-
-   FORMAT(GL_LUMINANCE4, GL_LUMINANCE),
-   FORMAT(GL_LUMINANCE8, GL_LUMINANCE),
-   FORMAT(GL_LUMINANCE12, GL_LUMINANCE),
-   FORMAT(GL_LUMINANCE16, GL_LUMINANCE),
-
-   FORMAT(GL_LUMINANCE4_ALPHA4, GL_LUMINANCE_ALPHA),
-   FORMAT(GL_LUMINANCE8_ALPHA8, GL_LUMINANCE_ALPHA),
-   FORMAT(GL_LUMINANCE12_ALPHA12, GL_LUMINANCE_ALPHA),
-   FORMAT(GL_LUMINANCE16_ALPHA16, GL_LUMINANCE_ALPHA),
-
-   FORMAT(GL_INTENSITY4, GL_INTENSITY),
-   FORMAT(GL_INTENSITY8, GL_INTENSITY),
-   FORMAT(GL_INTENSITY12, GL_INTENSITY),
-   FORMAT(GL_INTENSITY16, GL_INTENSITY),
-
-   FORMAT(GL_R3_G3_B2, GL_RGB),
-   FORMAT(GL_RGB4, GL_RGB),
-   FORMAT(GL_RGB5, GL_RGB),
-   FORMAT(GL_RGB8, GL_RGB),
-   FORMAT(GL_RGB10, GL_RGB),
-   FORMAT(GL_RGB12, GL_RGB),
-   FORMAT(GL_RGB16, GL_RGB),
-
-   FORMAT(GL_RGBA2, GL_RGBA),
-   FORMAT(GL_RGBA4, GL_RGBA),
-   FORMAT(GL_RGB5_A1, GL_RGBA),
-   FORMAT(GL_RGBA8, GL_RGBA),
-   FORMAT(GL_RGB10_A2, GL_RGBA),
-   FORMAT(GL_RGBA12, GL_RGBA),
-   FORMAT(GL_RGBA16, GL_RGBA),
+   FORMAT(3, GL_RGB, 0),
+   FORMAT(4, GL_RGBA, 0),
+   FORMAT(GL_RGB, GL_RGB, 0),
+   FORMAT(GL_RGBA, GL_RGBA, 0),
+   FORMAT(GL_ALPHA, GL_ALPHA, 0),
+   FORMAT(GL_LUMINANCE, GL_LUMINANCE, 0),
+   FORMAT(GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0),
+   FORMAT(GL_INTENSITY, GL_INTENSITY, 0),
+
+   FORMAT(GL_ALPHA4, GL_ALPHA, 4),
+   FORMAT(GL_ALPHA8, GL_ALPHA, 8),
+   FORMAT(GL_ALPHA12, GL_ALPHA, 12),
+   FORMAT(GL_ALPHA16, GL_ALPHA, 16),
+
+   FORMAT(GL_LUMINANCE4, GL_LUMINANCE, 4),
+   FORMAT(GL_LUMINANCE8, GL_LUMINANCE, 8),
+   FORMAT(GL_LUMINANCE12, GL_LUMINANCE, 12),
+   FORMAT(GL_LUMINANCE16, GL_LUMINANCE, 16),
+
+   FORMAT(GL_LUMINANCE4_ALPHA4, GL_LUMINANCE_ALPHA, 4),
+   FORMAT(GL_LUMINANCE8_ALPHA8, GL_LUMINANCE_ALPHA, 8),
+   FORMAT(GL_LUMINANCE12_ALPHA12, GL_LUMINANCE_ALPHA, 12),
+   FORMAT(GL_LUMINANCE16_ALPHA16, GL_LUMINANCE_ALPHA, 16),
+
+   FORMAT(GL_INTENSITY4, GL_INTENSITY, 4),
+   FORMAT(GL_INTENSITY8, GL_INTENSITY, 8),
+   FORMAT(GL_INTENSITY12, GL_INTENSITY, 12),
+   FORMAT(GL_INTENSITY16, GL_INTENSITY, 16),
+
+   FORMAT(GL_R3_G3_B2, GL_RGB, 2),
+   FORMAT(GL_RGB4, GL_RGB, 4),
+   FORMAT(GL_RGB5, GL_RGB, 5),
+   FORMAT(GL_RGB8, GL_RGB, 8),
+   FORMAT(GL_RGB10, GL_RGB, 10),
+   FORMAT(GL_RGB12, GL_RGB, 12),
+   FORMAT(GL_RGB16, GL_RGB, 16),
+
+   FORMAT(GL_RGBA2, GL_RGBA, 2),
+   FORMAT(GL_RGBA4, GL_RGBA, 4),
+   FORMAT(GL_RGB5_A1, GL_RGBA, 1),
+   FORMAT(GL_RGBA8, GL_RGBA, 8),
+   FORMAT(GL_RGB10_A2, GL_RGBA, 2),
+   FORMAT(GL_RGBA12, GL_RGBA, 12),
+   FORMAT(GL_RGBA16, GL_RGBA, 16),
 };
 
 static const struct format_desc arb_depth_texture[] = {
-   FORMAT(GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT),
-   FORMAT(GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT),
-   FORMAT(GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT),
-   FORMAT(GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT),
+   FORMAT(GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, 0),
+   FORMAT(GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, 16),
+   FORMAT(GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, 24),
+   FORMAT(GL_DEPTH_COMPONENT32, GL_DEPTH_COMPONENT, 32),
 };
 
 static const struct format_desc ext_packed_depth_stencil[] = {
-

[Piglit] [PATCH v2 5/5] all.py: mark the last variant of texsubimage as running concurrently

2016-01-21 Thread Nicolai Hähnle
From: Nicolai Hähnle 

All other variants (array, cube_map-array, and pbo variants) are already
running concurrently
---
 tests/all.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/all.py b/tests/all.py
index bb174cb..28aba13 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -933,7 +933,7 @@ with profile.group_manager(
 g(['sized-texture-format-channels'])
 g(['streaming-texture-leak'], run_concurrent=False)
 g(['texredefine'], run_concurrent=False)
-g(['texsubimage'], run_concurrent=False)
+g(['texsubimage'])
 g(['texsubimage-unpack'])
 g(['texsubimage-depth-formats'], run_concurrent=False)
 g(['texture-al'], run_concurrent=False)
-- 
2.5.0

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


[Piglit] [PATCH v2 0/5] Add texturing/texsubimage-unpack

2016-01-21 Thread Nicolai Hähnle
Hi,

this is a restructuring of the first part of the PBO coverage series I sent
recently, based on Ian's feedback.

There's a bit more code sharing, the run_concurrent business is cleared up,
and bunch of other cleanups.

Cheers,
Nicolai
--
 tests/all.py |   4 +-
 tests/fbo/fbo-formats.h  | 396 ++-
 tests/texturing/CMakeLists.gl.txt|   1 +
 tests/texturing/texsubimage-unpack.c | 525 +
 tests/texturing/texsubimage.c|  28 +-
 tests/util/piglit-util-gl.c  |  65 +++
 tests/util/piglit-util-gl.h  |   7 +
 7 files changed, 807 insertions(+), 219 deletions(-)

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


[Piglit] [PATCH v2 1/5] piglit_num_components: add more pixel unpack formats

2016-01-21 Thread Nicolai Hähnle
From: Nicolai Hähnle 

---
 tests/util/piglit-util-gl.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index bbc174d..61764fb 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -909,14 +909,19 @@ piglit_num_components(GLenum base_format)
case GL_INTENSITY:
case GL_LUMINANCE:
case GL_RED:
+   case GL_GREEN:
+   case GL_BLUE:
return 1;
case GL_DEPTH_STENCIL:
case GL_LUMINANCE_ALPHA:
case GL_RG:
return 2;
case GL_RGB:
+   case GL_BGR:
return 3;
case GL_RGBA:
+   case GL_BGRA:
+   case GL_ABGR_EXT:
return 4;
default:
printf("Unknown num_components for %s\n",
-- 
2.5.0

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


Re: [Piglit] [PATCH v2] Add glsl-fs-discard-only.shader_test

2016-01-21 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin 

On Thu, Jan 21, 2016 at 2:53 PM, Nicolai Hähnle  wrote:
> From: Nicolai Hähnle 
>
> Test a pure depth write with conditional discard in the fragment shader.
> This currently fails in radeonsi.
>
> v2: use vertex shader passthrough and move to tests/spec/glsl-1.10 (Ilia 
> Mirkin)
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93761
> ---
>  .../glsl-1.10/glsl-fs-discard-only.shader_test | 22 
> ++
>  1 file changed, 22 insertions(+)
>  create mode 100644 tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test
>
> diff --git a/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test 
> b/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test
> new file mode 100644
> index 000..5b9402b
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test
> @@ -0,0 +1,22 @@
> +[require]
> +GLSL >= 1.10
> +depthbuffer
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +void main()
> +{
> +   if (gl_FragCoord.x < 10.0)
> +   discard;
> +}
> +
> +[test]
> +clear depth 1.0
> +clear
> +enable GL_DEPTH_TEST
> +draw rect -1 -1 2 2
> +probe depth 0 0 1.0
> +probe depth 9 0 1.0
> +probe depth 10 0 0.5
> +probe depth 11 0 0.5
> --
> 2.5.0
>
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH v2] Add glsl-fs-discard-only.shader_test

2016-01-21 Thread Nicolai Hähnle
From: Nicolai Hähnle 

Test a pure depth write with conditional discard in the fragment shader.
This currently fails in radeonsi.

v2: use vertex shader passthrough and move to tests/spec/glsl-1.10 (Ilia Mirkin)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93761
---
 .../glsl-1.10/glsl-fs-discard-only.shader_test | 22 ++
 1 file changed, 22 insertions(+)
 create mode 100644 tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test

diff --git a/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test 
b/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test
new file mode 100644
index 000..5b9402b
--- /dev/null
+++ b/tests/spec/glsl-1.10/glsl-fs-discard-only.shader_test
@@ -0,0 +1,22 @@
+[require]
+GLSL >= 1.10
+depthbuffer
+
+[vertex shader passthrough]
+
+[fragment shader]
+void main()
+{
+   if (gl_FragCoord.x < 10.0)
+   discard;
+}
+
+[test]
+clear depth 1.0
+clear
+enable GL_DEPTH_TEST
+draw rect -1 -1 2 2
+probe depth 0 0 1.0
+probe depth 9 0 1.0
+probe depth 10 0 0.5
+probe depth 11 0 0.5
-- 
2.5.0

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


[Piglit] [Bug 93783] [regression, bisected] arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate

2016-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93783

Ilia Mirkin  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are the QA Contact for the bug.___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [Bug 93783] [regression, bisected] arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate

2016-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93783

Mark Janes  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
You are receiving this mail because:
You are the QA Contact for the bug.___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Test that cubemaps with non-matching faces are incomplete

2016-01-21 Thread Ian Romanick


On 01/21/2016 10:44 AM, Neil Roberts wrote:
> This creates a cubemap where one of the faces either has a different
> size or a different format from the other faces and then checks that
> it is incomplete by rendering with it and veryifying that the sampler
verifying

A couple of minor nits below.  With or without them changed, this patch is

Reviewed-by: Ian Romanick 

> returns solid black.
> 
> The format test currently fails on Mesa.
> ---
>  tests/all.py |   2 +
>  tests/texturing/CMakeLists.gl.txt|   1 +
>  tests/texturing/incomplete-cubemap.c | 191 
> +++
>  3 files changed, 194 insertions(+)
>  create mode 100644 tests/texturing/incomplete-cubemap.c
> 
> diff --git a/tests/all.py b/tests/all.py
> index f57d205..29c58ac 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -1132,6 +1132,8 @@ with profile.group_manager(
>  g(['max-samplers'])
>  g(['max-samplers', 'border'])
>  g(['gl-2.0-active-sampler-conflict'])
> +g(['incomplete-cubemap', 'size'], 'incomplete-cubemap-size')
> +g(['incomplete-cubemap', 'format'], 'incomplete-cubemap-format')
>  
>  with profile.group_manager(
>  PiglitGLTest,
> diff --git a/tests/texturing/CMakeLists.gl.txt 
> b/tests/texturing/CMakeLists.gl.txt
> index 704ea6d..c344cdf 100644
> --- a/tests/texturing/CMakeLists.gl.txt
> +++ b/tests/texturing/CMakeLists.gl.txt
> @@ -36,6 +36,7 @@ piglit_add_executable (getteximage-luminance 
> getteximage-luminance.c)
>  piglit_add_executable (getteximage-targets getteximage-targets.c)
>  piglit_add_executable (getteximage-depth getteximage-depth.c)
>  piglit_add_executable (incomplete-texture incomplete-texture.c)
> +piglit_add_executable (incomplete-cubemap incomplete-cubemap.c)
>  piglit_add_executable (generatemipmap-cubemap generatemipmap-cubemap.c)
>  piglit_add_executable (fragment-and-vertex-texturing 
> fragment-and-vertex-texturing.c)
>  piglit_add_executable (levelclamp levelclamp.c)
> diff --git a/tests/texturing/incomplete-cubemap.c 
> b/tests/texturing/incomplete-cubemap.c
> new file mode 100644
> index 000..99f6e9a
> --- /dev/null
> +++ b/tests/texturing/incomplete-cubemap.c
> @@ -0,0 +1,191 @@
> +/*
> + * 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.
> + */
> +
> +/**
> + * Tests that a cube map texture which doesn't have the same size or
> + * format for all of the faces isn't considered complete.
> + */
> +
> +#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_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
> +
> +PIGLIT_GL_TEST_CONFIG_END
> +
> +static const GLenum
> +faces[6] = {
> + GL_TEXTURE_CUBE_MAP_POSITIVE_X,
> + GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
> + GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
> + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
> + GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
> + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
> +};
> +
> +enum test_attribute {
> + TEST_ATTRIBUTE_SIZE,
> + TEST_ATTRIBUTE_FORMAT
> +};
> +
> +static enum test_attribute
> +test_attribute;
> +
> +/* Incomplete textures return 0,0,0,1 when sampled in GLSL */
> +static const float
> +expected_color[] = {
> + 0.0f, 0.0f, 0.0f, 1.0f
> +};
> +
> +static const char
> +vertex_source[] =
> + "attribute vec2 piglit_vertex;\n"
> + "\n"
> + "void\n"
> + "main()\n"
> + "{\n"
> + "gl_Position = vec4(piglit_vertex, 0.0, 1.0);\n"
> + "}\n";
> +
> +static const char
> +fragment_source[] =
> + "uniform samplerCube tex;\n"
> + "\n"
> + "void\n"
> + "main()\n"
> + "{\n"
> + "gl_FragColor = textureCube(tex, vec3(0.0));\n"
> + "}\n";
> +
> +static void
> +make_image(GL

[Piglit] [Bug 93783] [regression, bisected] arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate

2016-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93783

--- Comment #8 from Ilia Mirkin  ---
Looks like there's some left-over IMAGE_T usage... pushed a fix.

commit 1e7ca7fc900fbf59a37e84b46c2a2fb69686dc1f
Author: Ilia Mirkin 
Date:   Thu Jan 21 13:51:21 2016 -0500

arb_shader_image_size: fix last use of IMAGE_T

Trivial

-- 
You are receiving this mail because:
You are the QA Contact for the bug.___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [Bug 93783] [regression, bisected] arb_shader_image_load_store.compiler.declaration-format-qualifier-duplicate

2016-01-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=93783

--- Comment #7 from Mark Janes  ---
Created attachment 121192
  --> https://bugs.freedesktop.org/attachment.cgi?id=121192&action=edit
output from arb_shader_image_size

-- 
You are receiving this mail because:
You are the QA Contact for the bug.___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] Test that cubemaps with non-matching faces are incomplete

2016-01-21 Thread Neil Roberts
This creates a cubemap where one of the faces either has a different
size or a different format from the other faces and then checks that
it is incomplete by rendering with it and veryifying that the sampler
returns solid black.

The format test currently fails on Mesa.
---
 tests/all.py |   2 +
 tests/texturing/CMakeLists.gl.txt|   1 +
 tests/texturing/incomplete-cubemap.c | 191 +++
 3 files changed, 194 insertions(+)
 create mode 100644 tests/texturing/incomplete-cubemap.c

diff --git a/tests/all.py b/tests/all.py
index f57d205..29c58ac 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1132,6 +1132,8 @@ with profile.group_manager(
 g(['max-samplers'])
 g(['max-samplers', 'border'])
 g(['gl-2.0-active-sampler-conflict'])
+g(['incomplete-cubemap', 'size'], 'incomplete-cubemap-size')
+g(['incomplete-cubemap', 'format'], 'incomplete-cubemap-format')
 
 with profile.group_manager(
 PiglitGLTest,
diff --git a/tests/texturing/CMakeLists.gl.txt 
b/tests/texturing/CMakeLists.gl.txt
index 704ea6d..c344cdf 100644
--- a/tests/texturing/CMakeLists.gl.txt
+++ b/tests/texturing/CMakeLists.gl.txt
@@ -36,6 +36,7 @@ piglit_add_executable (getteximage-luminance 
getteximage-luminance.c)
 piglit_add_executable (getteximage-targets getteximage-targets.c)
 piglit_add_executable (getteximage-depth getteximage-depth.c)
 piglit_add_executable (incomplete-texture incomplete-texture.c)
+piglit_add_executable (incomplete-cubemap incomplete-cubemap.c)
 piglit_add_executable (generatemipmap-cubemap generatemipmap-cubemap.c)
 piglit_add_executable (fragment-and-vertex-texturing 
fragment-and-vertex-texturing.c)
 piglit_add_executable (levelclamp levelclamp.c)
diff --git a/tests/texturing/incomplete-cubemap.c 
b/tests/texturing/incomplete-cubemap.c
new file mode 100644
index 000..99f6e9a
--- /dev/null
+++ b/tests/texturing/incomplete-cubemap.c
@@ -0,0 +1,191 @@
+/*
+ * 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.
+ */
+
+/**
+ * Tests that a cube map texture which doesn't have the same size or
+ * format for all of the faces isn't considered complete.
+ */
+
+#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_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+static const GLenum
+faces[6] = {
+   GL_TEXTURE_CUBE_MAP_POSITIVE_X,
+   GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
+   GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
+   GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
+   GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
+   GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
+};
+
+enum test_attribute {
+   TEST_ATTRIBUTE_SIZE,
+   TEST_ATTRIBUTE_FORMAT
+};
+
+static enum test_attribute
+test_attribute;
+
+/* Incomplete textures return 0,0,0,1 when sampled in GLSL */
+static const float
+expected_color[] = {
+   0.0f, 0.0f, 0.0f, 1.0f
+};
+
+static const char
+vertex_source[] =
+   "attribute vec2 piglit_vertex;\n"
+   "\n"
+   "void\n"
+   "main()\n"
+   "{\n"
+   "gl_Position = vec4(piglit_vertex, 0.0, 1.0);\n"
+   "}\n";
+
+static const char
+fragment_source[] =
+   "uniform samplerCube tex;\n"
+   "\n"
+   "void\n"
+   "main()\n"
+   "{\n"
+   "gl_FragColor = textureCube(tex, vec3(0.0));\n"
+   "}\n";
+
+static void
+make_image(GLenum target,
+  int size,
+  GLenum internal_format)
+{
+   GLubyte *data = malloc(size * size * 4), *p = data;
+   int i;
+
+   for (i = 0; i < size * size; i++) {
+   /* Red texture because it should be incomplete so if
+* it is displayed then it is a failure.
+*/
+   *(p++) = 0xff;
+   *(p++) = 0x00;
+   *(p++) =

[Piglit] [PATCH] sso: add test for linking gs without explicit locations

2016-01-21 Thread Ilia Mirkin
Mesa treats each GS input as taking up 3 locations instead of 1, because
it doesn't de-array the vars. This causes it to take col3 from VS
instead of col1.

Signed-off-by: Ilia Mirkin 
---
 .../execution/vs-gs-linking.shader_test| 57 ++
 1 file changed, 57 insertions(+)
 create mode 100644 
tests/spec/arb_separate_shader_objects/execution/vs-gs-linking.shader_test

diff --git 
a/tests/spec/arb_separate_shader_objects/execution/vs-gs-linking.shader_test 
b/tests/spec/arb_separate_shader_objects/execution/vs-gs-linking.shader_test
new file mode 100644
index 000..938df13
--- /dev/null
+++ b/tests/spec/arb_separate_shader_objects/execution/vs-gs-linking.shader_test
@@ -0,0 +1,57 @@
+[require]
+GLSL >= 1.50
+SSO ENABLED
+
+[vertex shader]
+#version 150
+
+in vec4 piglit_vertex;
+out vec4 col0;
+out vec4 col1;
+out vec4 col2;
+out vec4 col3;
+out vec4 col4;
+out vec4 col5;
+
+void main() {
+  gl_Position = piglit_vertex;
+  col1 = vec4(0, 1, 0, 1);
+  col0 = col2 = col3 = col4 = col5 = vec4(1, 0, 0, 1);
+}
+
+[geometry shader]
+#version 150
+
+layout (triangles) in;
+layout (triangle_strip, max_vertices=3) out;
+
+in vec4 color0[];
+in vec4 color1[];
+
+out vec4 color;
+
+void main() {
+  int i;
+  for (i = 0; i < 3; i++) {
+gl_Position = gl_in[i].gl_Position;
+color = color1[i];
+EmitVertex();
+  }
+}
+
+[fragment shader]
+#version 150
+
+in vec4 color;
+out vec4 col;
+
+void main() {
+  col = color;
+}
+
+[test]
+clear color 0.2 0.2 0.2 0.2
+clear
+
+draw rect -1 -1 2 2
+probe all rgba 0 1 0 1
-- 
2.4.10

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


[Piglit] [PATCH] arb_enhanced_layouts: xfb_buffer layout qualifier compile tests

2016-01-21 Thread Timothy Arceri
---
 ...ck-larger-than-gl_TransformFeedbackBuffers.vert | 22 ++
 .../xfb-buffer/xfb_buffer-block-max.vert   | 22 ++
 .../xfb_buffer-block-member-global-mismatch.vert   | 35 ++
 .../xfb_buffer-block-member-mismatch.vert  | 33 
 .../xfb_buffer-block-member-mismatch2.vert | 33 
 .../xfb-buffer/xfb_buffer-block-member.vert| 33 
 ...al-larger-than-gl_TransformFeedbackBuffers.vert | 22 ++
 .../xfb-buffer/xfb_buffer-global-max.vert  | 22 ++
 .../xfb-buffer/xfb_buffer-multiple-qualifiers.vert | 28 +
 ..._buffer-named-block-member-global-mismatch.vert | 35 ++
 .../xfb_buffer-named-block-member-mismatch.vert| 33 
 .../xfb_buffer-named-block-member-mismatch2.vert   | 33 
 .../xfb-buffer/xfb_buffer-named-block-member.vert  | 33 
 ...le-larger-than-gl_TransformFeedbackBuffers.vert | 20 +
 .../xfb-buffer/xfb_buffer-variable-max.vert| 20 +
 15 files changed, 424 insertions(+)
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-global-mismatch.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member-mismatch2.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-member.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-larger-than-gl_TransformFeedbackBuffers.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-global-max.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-multiple-qualifiers.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-global-mismatch.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member-mismatch2.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-named-block-member.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-larger-than-gl_TransformFeedbackBuffers.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-variable-max.vert

diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert
new file mode 100644
index 000..ea5ea36
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-larger-than-gl_TransformFeedbackBuffers.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//"It is a compile-time error to specify an *xfb_buffer* that is greater
+//than the implementation-dependent constant
+//gl_MaxTransformFeedbackBuffers."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_buffer = gl_MaxTransformFeedbackBuffers) out block {
+  vec4 var;
+};
+
+void main()
+{
+}
diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert
new file mode 100644
index 000..adac1ab
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb-buffer/xfb_buffer-block-max.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: