[Piglit] [PATCH] ext_packed_float: Add a test that queries GL_RGBA_SIGNED_COMPONENTS_EXT

2018-05-09 Thread Timothy Arceri
From: Bruce Merry 

Cc: Brian Paul 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73096
---

 I came across this test when cleaning up bugzilla. Seems we fixed
 Mesa but never pushed the piglit test.

 tests/all.py  |   1 +
 tests/spec/ext_packed_float/CMakeLists.gl.txt |   1 +
 .../query-rgba-signed-components.c| 167 ++
 3 files changed, 169 insertions(+)
 create mode 100644 tests/spec/ext_packed_float/query-rgba-signed-components.c

diff --git a/tests/all.py b/tests/all.py
index 26638cd82..db85f172e 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -3331,6 +3331,7 @@ with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ext_packed_float')) as g:
 g(['ext_packed_float-pack'], 'pack')
+g(['query-rgba-signed-components'], 'query-rgba-signed-components')
 g(['getteximage-invalid-format-for-packed-type'],
   'getteximage-invalid-format-for-packed-type')
 add_msaa_formats_tests(g, 'GL_EXT_packed_float')
diff --git a/tests/spec/ext_packed_float/CMakeLists.gl.txt 
b/tests/spec/ext_packed_float/CMakeLists.gl.txt
index 44a8818c8..b061cb6b2 100644
--- a/tests/spec/ext_packed_float/CMakeLists.gl.txt
+++ b/tests/spec/ext_packed_float/CMakeLists.gl.txt
@@ -10,5 +10,6 @@ link_libraries (
 
 piglit_add_executable (ext_packed_float-pack pack.c)
 piglit_add_executable (getteximage-invalid-format-for-packed-type 
getteximage-invalid-format-for-packed-type.c)
+piglit_add_executable (query-rgba-signed-components 
query-rgba-signed-components.c)
 
 # vim: ft=cmake:
diff --git a/tests/spec/ext_packed_float/query-rgba-signed-components.c 
b/tests/spec/ext_packed_float/query-rgba-signed-components.c
new file mode 100644
index 0..635d5bc5a
--- /dev/null
+++ b/tests/spec/ext_packed_float/query-rgba-signed-components.c
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2013 Bruce Merry
+ *
+ * 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 AUTHORS OR COYPRIGTH
+ * HOLDERS 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.
+ */
+
+#include "piglit-util-gl.h"
+
+#define MAKE_FORMAT_STR(x) x, #x
+
+typedef struct {
+   GLenum format;
+   const char *format_str;
+   const char *extension;
+   int expected[4];
+   int buffer; /* Draw buffer to attach the renderbuffer to */
+} format_info;
+
+static const format_info formats[] = {
+   { MAKE_FORMAT_STR(GL_RGBA8), NULL, { 0, 0, 0, 0 } },
+   { MAKE_FORMAT_STR(GL_R8I), "GL_ARB_texture_rg", { 1, 0, 0, 0 } },
+   { MAKE_FORMAT_STR(GL_RG8I), "GL_ARB_texture_rg", { 1, 1, 0, 0 } },
+   { MAKE_FORMAT_STR(GL_R8_SNORM), "GL_EXT_texture_snorm", { 1, 0, 0, 0 } 
},
+   { MAKE_FORMAT_STR(GL_LUMINANCE8_SNORM), "GL_EXT_texture_snorm", { 1, 1, 
1, 0 } },
+   { MAKE_FORMAT_STR(GL_RGBA8UI_EXT), "GL_EXT_texture_integer", { 0, 0, 0, 
0 } },
+   { MAKE_FORMAT_STR(GL_RGBA16F_ARB), "GL_ARB_texture_float", { 1, 1, 1, 1 
} },
+   { MAKE_FORMAT_STR(GL_LUMINANCE16F_ARB), "GL_ARB_texture_float", { 1, 1, 
1, 0 } },
+   { MAKE_FORMAT_STR(GL_RGB9_E5_EXT), "GL_EXT_texture_shared_exponent", { 
0, 0, 0, 0 } },
+   { MAKE_FORMAT_STR(GL_R11F_G11F_B10F_EXT), "GL_EXT_packed_float", { 0, 
0, 0, 0 } },
+   { MAKE_FORMAT_STR(GL_RGBA16F_ARB), "GL_ARB_texture_float", { 0, 0, 0, 0 
}, 1 }
+};
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 10;
+
+   config.window_visual = PIGLIT_GL_VISUAL_RGB;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+enum piglit_result
+piglit_display(void)
+{
+   /* Should never be reached */
+   return PIGLIT_FAIL;
+}
+
+/* Queries GL_RGBA_SIGNED_COMPONENTS_EXT and compares to expected.
+ * If they do not match, prints an error. Returns true on match.
+ */
+static bool check_rgba_signed(const int *expected)
+{
+   int i;
+   /* Start with nonsense values, to ensure they are written */
+   GLint actual[4] = {2, 2, 2, 2};
+
+   

[Piglit] [PATCH] piglit-framework-gl: skip compat test when not supported

2018-05-01 Thread Timothy Arceri
OpenGL 3.1 is a little special when it comes to compatibility. If
a 3.1 compat profile is requested by piglit and ARB_compatibility
not supported waffle will end up creating a core profile for us.

Here we make sure ARB_compatibility is supported when explicitly
requesting a 3.1 compat profile from piglit. This allows us to
avoid testing for ARB_compatibility in all GL 3.1 compat tests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106277
---
 tests/util/piglit-framework-gl/piglit_wfl_framework.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c 
b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
index c5f6d4113..5f00c7ed6 100644
--- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_wfl_framework.c
@@ -565,8 +565,15 @@ make_context_current(struct piglit_wfl_framework *wfl_fw,
ok = make_context_current_singlepass(wfl_fw, test_config,
 CONTEXT_GL_COMPAT,
 
partial_config_attrib_list);
-   if (ok)
-  return;
+   if (ok) {
+   if (test_config->supports_gl_compat_version == 31 &&
+   
!piglit_is_extension_supported("GL_ARB_compatibility")) {
+   printf("piglit: info: Failed to create a compat 
profile\n");
+   piglit_report_result(PIGLIT_SKIP);
+   }
+
+   return;
+   }
}
 
 #elif defined(PIGLIT_USE_OPENGL_ES1) || \
-- 
2.17.0

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


[Piglit] [PATCH 2/2] glsl-1.40-compat: add basic compat test for built-in constants

2018-04-23 Thread Timothy Arceri
This test is copied from the glsl-1.10 tests. We just want to be
sure that these built-in are still available in a compat profile.

This was broken when compat was enabled for OpenGL 3.1 in
radeonsi. This test will help us from regressing again in future.
---
 .../execution/built-in-constants.shader_test  | 24 +++
 1 file changed, 24 insertions(+)
 create mode 100644 
tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test

diff --git 
a/tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test 
b/tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test
new file mode 100644
index 0..f738551a4
--- /dev/null
+++ b/tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test
@@ -0,0 +1,24 @@
+[require]
+GL COMPAT >= 3.1
+GLSL >= 1.40
+
+[vertex shader]
+void main()
+{
+   gl_Position = gl_Vertex;
+   // front color values should all be >= 1.0
+   gl_FrontColor = vec4(gl_MaxLights, gl_MaxClipPlanes,
+   gl_MaxTextureUnits,
+   gl_MaxTextureCoords);
+}
+
+
+[fragment shader]
+void main()
+{
+   gl_FragColor = gl_Color;
+}
+
+[test]
+draw rect -1 -1 2 2
+relative probe rgba (0.5, 0.5) (1.0, 1.0, 1.0, 1.0)
-- 
2.17.0

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


[Piglit] [PATCH 1/2] shader_runner: allow compat profiles to be explicitly requested

2018-04-23 Thread Timothy Arceri
Until now compat profile has only been a fallback path if a core
profile could not be created.
---
 tests/shaders/shader_runner.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 700b11327..b526c2d28 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -76,6 +76,7 @@ struct component_version {
} _tag;
 
bool core;
+   bool compat;
bool es;
unsigned num;
char _string[100];
@@ -344,12 +345,13 @@ static bool
 compare_uint(GLuint ref, GLuint value, enum comparison cmp);
 
 static void
-version_init(struct component_version *v, enum version_tag tag, bool core, 
bool es, unsigned num)
+version_init(struct component_version *v, enum version_tag tag, bool core, 
bool compat, bool es, unsigned num)
 {
assert(tag == VERSION_GL || tag == VERSION_GLSL);
 
v->_tag = tag;
v->core = core;
+   v->compat = compat;
v->es = es;
v->num = num;
v->_string[0] = 0;
@@ -696,6 +698,7 @@ parse_version_comparison(const char *line, enum comparison 
*cmp,
unsigned minor;
unsigned full_num;
const bool core = parse_str(line, "CORE", );
+   const bool compat = parse_str(line, "COMPAT", );
const bool es = parse_str(line, "ES", );
 
REQUIRE(parse_comparison_op(line, cmp, ),
@@ -723,7 +726,7 @@ parse_version_comparison(const char *line, enum comparison 
*cmp,
full_num = (major * 10) + minor;
}
 
-   version_init(v, tag, core, es, full_num);
+   version_init(v, tag, core, compat, es, full_num);
 }
 
 /**
@@ -1374,7 +1377,7 @@ choose_required_gl_version(struct 
requirement_parse_results *parse_results,
version_copy(gl_version, _results->gl_version);
} else {
assert(!parse_results->found_glsl || 
!parse_results->glsl_version.es);
-   version_init(gl_version, VERSION_GL, false, false, 10);
+   version_init(gl_version, VERSION_GL, false, false, false, 10);
}
 
if (gl_version->es)
@@ -1420,7 +1423,8 @@ get_required_config(const char *script_name,
if (required_gl_version.es) {
config->supports_gl_es_version = required_gl_version.num;
} else if (required_gl_version.num >= 31) {
-   config->supports_gl_core_version = required_gl_version.num;
+   if (!required_gl_version.compat)
+   config->supports_gl_core_version = 
required_gl_version.num;
if (!required_gl_version.core)
config->supports_gl_compat_version = 
required_gl_version.num;
} else {
@@ -3976,11 +3980,11 @@ piglit_init(int argc, char **argv)
piglit_require_GLSL();
 
version_init(_version, VERSION_GL,
-core,
+core, !core,
 piglit_is_gles(),
 piglit_get_gl_version());
piglit_get_glsl_version(, , );
-   version_init(_version, VERSION_GLSL, core, es,
+   version_init(_version, VERSION_GLSL, core, !core, es,
 (major * 100) + minor);
 
 #ifdef PIGLIT_USE_OPENGL
-- 
2.17.0

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


[Piglit] [PATCH 4/4] glsl-1.20: exercise bug in parameter out handling in Mesa

2018-04-09 Thread Timothy Arceri
---
 ...ersion-int-to-float-vec4-index.shader_test | 48 +++
 1 file changed, 48 insertions(+)
 create mode 100644 
tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test

diff --git 
a/tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test
 
b/tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test
new file mode 100644
index 0..3fca6b0d2
--- /dev/null
+++ 
b/tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test
@@ -0,0 +1,48 @@
+# Test that implicit type conversion of out parameters works properly.
+#
+# From the GLSL 1.30 spec (which clarifies, but does not change, the
+# rules for implicit type conversion in GLSL 1.20), section 6.1
+# (Function Definitions):
+#
+#   Mismatched types on output parameters (out or inout) must have a
+#   conversion from the formal parameter type to the calling argument
+#   type.
+#
+# This tests for a bug in Mesa GLSL IRs handling of these conversions.
+# Specifically if the function changes the index value use by the out
+# parameter we need to make sure it uses the value of the index before the
+# function was called and not the new value of the index.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+#version 120
+
+uniform int u = 1;
+
+void f(inout int i, out int x)
+{
+  x = 4;
+  i = 0;
+}
+
+void main()
+{
+  gl_Position = gl_Vertex;
+  vec4 value;
+
+  int i = u;
+  f(i, value[i]);
+  gl_FrontColor = vec4(1.0/value[1]);
+}
+
+[fragment shader]
+void main()
+{
+  gl_FragColor = gl_Color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.25 0.25 0.25 0.25
-- 
2.17.0

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


[Piglit] [PATCH 1/4] glsl-1.10: rename function chain test and better test the inout param

2018-04-09 Thread Timothy Arceri
From: Timothy Arceri <t_arc...@yahoo.com.au>

The following patch will add a number of variants of this test so
we want to give it a more descriptive name.
---
 .../function-calls/glsl-function-chain16-inout.shader_test}   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename tests/{shaders/glsl-function-chain16.shader_test => 
spec/glsl-1.10/execution/function-calls/glsl-function-chain16-inout.shader_test}
 (96%)

diff --git a/tests/shaders/glsl-function-chain16.shader_test 
b/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-inout.shader_test
similarity index 96%
rename from tests/shaders/glsl-function-chain16.shader_test
rename to 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-inout.shader_test
index 25d5946ac..74b232956 100644
--- a/tests/shaders/glsl-function-chain16.shader_test
+++ 
b/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-inout.shader_test
@@ -16,7 +16,7 @@ void f10(inout float f);
 void f14(inout float f);
 void main()
 {
-   float g;
+   float g = 0.1;
f01(g);
gl_FragColor = vec4(g, 0, 0, 1.0);
 }
@@ -52,7 +52,7 @@ void f13(inout float f);
 void f04(inout float f) {f05(f);}
 void f08(inout float f) {f09(f);}
 void f12(inout float f) {f13(f);}
-void f16(inout float f) {f=0.2;}
+void f16(inout float f) {f+=0.1;}
 
 
 [test]
-- 
2.17.0

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


[Piglit] [PATCH 2/4] glsl-1.10: add a number of new function parameter tests

2018-04-09 Thread Timothy Arceri
These all have long function call chains, so that some remain intact
when Mesas GLSLOptimizeConservatively flag is set. This allows us
to exercise the GLSL IR -> NIR path for functions and NIRs function
inlining code.
---
 ...tion-chain16-in-array-indirect.shader_test | 74 +++
 ...ion-chain16-in-array-indirect2.shader_test | 74 +++
 ...glsl-function-chain16-in-array.shader_test | 70 ++
 ...lsl-function-chain16-in-array2.shader_test | 70 ++
 ...sl-function-chain16-in-swizzle.shader_test | 64 
 .../glsl-function-chain16-in.shader_test  | 64 
 ...function-chain16-inout-swizzle.shader_test | 64 
 ...l-function-chain16-out-swizzle.shader_test | 64 
 .../glsl-function-chain16-out.shader_test | 64 
 9 files changed, 608 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect2.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array2.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-swizzle.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-inout-swizzle.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-out-swizzle.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-out.shader_test

diff --git 
a/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect.shader_test
 
b/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect.shader_test
new file mode 100644
index 0..19dac8bd9
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect.shader_test
@@ -0,0 +1,74 @@
+# This tests we inline functions correctly. Chaining the functions helps
+# us reach the GLSL IR -> NIR code with some functions intact when the
+# conservative optimise flag is set in Mesa. This allows us to test the
+# GLSL IR -> NIR conversion code for functions and the NIR function inlining
+# code.
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+   gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+float f01(in float f[4]);
+float f02(in float f[4]);
+float f06(in float f[4]);
+float f10(in float f[4]);
+float f14(in float f[4]);
+void main()
+{
+   float g[4];
+
+   g[0] = 0.0;
+   g[1] = 1.0;
+   g[2] = 0.0;
+   g[3] = 0.1;
+
+   f01(g);
+   gl_FragColor = vec4(f01(g), g[0], g[2], g[1]);
+}
+float f01(in float f[4]) {return f02(f);}
+float f05(in float f[4]) {return f06(f);}
+float f09(in float f[4]) {return f10(f);}
+float f13(in float f[4]) {return f14(f);}
+
+[fragment shader]
+float f03(in float f[4]);
+float f07(in float f[4]);
+float f11(in float f[4]);
+float f15(in float f[4]);
+float f02(in float f[4]) {return f03(f);}
+float f06(in float f[4]) {return f07(f);}
+float f10(in float f[4]) {return f11(f);}
+float f14(in float f[4]) {return f15(f);}
+
+[fragment shader]
+float f04(in float f[4]);
+float f08(in float f[4]);
+float f12(in float f[4]);
+float f16(in float f[4]);
+float f03(in float f[4]) {return f04(f);}
+float f07(in float f[4]) {return f08(f);}
+float f11(in float f[4]) {return f12(f);}
+float f15(in float f[4]) {return f16(f);}
+
+[fragment shader]
+uniform int i;
+
+float f05(in float f[4]);
+float f09(in float f[4]);
+float f13(in float f[4]);
+float f04(in float f[4]) {return f05(f);}
+float f08(in float f[4]) {return f09(f);}
+float f12(in float f[4]) {return f13(f);}
+float f16(in float f[4]) {return f[i] + 0.1;}
+
+
+[test]
+uniform int i 3
+
+draw rect -1 -1 2 2
+probe all rgba 0.2 0 0 1.0
diff --git 
a/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect2.shader_test
 
b/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect2.shader_test
new file mode 100644
index 0..ea3b20efb
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/function-calls/glsl-function-chain16-in-array-indirect2.shader_test
@@ -0,0 +1,74 @@
+# This tests we inline functions correctly. Chaining the functions helps
+# us reach the GLSL IR -> NIR code with some functions intact when the
+# conservative optimise flag is set in Mesa. This allows us to test the
+# GLSL IR -> NIR conversion code for functions and the NIR function inlining
+# code.
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+   gl_Position = gl_Vertex;

[Piglit] [PATCH 3/4] glsl-1.20: move the parameter out tests to glsl-1.20

2018-04-09 Thread Timothy Arceri
---
 .../out-parameter-indexing/fs-inout-index-two-level.shader_test   | 0
 .../vs-inout-index-inout-float-array.shader_test  | 0
 .../vs-inout-index-inout-mat2-col-array.shader_test   | 0
 .../vs-inout-index-inout-mat2-col.shader_test | 0
 .../vs-inout-index-inout-mat2-row.shader_test | 0
 .../vs-inout-index-inout-vec4-array-element-array.shader_test | 0
 .../vs-inout-index-inout-vec4-array-element.shader_test   | 0
 .../vs-inout-index-inout-vec4-array.shader_test   | 0
 .../out-parameter-indexing/vs-inout-index-inout-vec4.shader_test  | 0
 .../execution}/out-parameter-indexing/vs-inout-vec4.shader_test   | 0
 .../execution}/out-parameter-indexing/vs-out-vec4.shader_test | 0
 11 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/fs-inout-index-two-level.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-float-array.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-mat2-col-array.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-mat2-row.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-vec4-array-element-array.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-vec4-array-element.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-vec4-array.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-index-inout-vec4.shader_test
 (100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-inout-vec4.shader_test 
(100%)
 rename tests/{shaders => 
spec/glsl-1.20/execution}/out-parameter-indexing/vs-out-vec4.shader_test (100%)

diff --git 
a/tests/shaders/out-parameter-indexing/fs-inout-index-two-level.shader_test 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/fs-inout-index-two-level.shader_test
similarity index 100%
rename from 
tests/shaders/out-parameter-indexing/fs-inout-index-two-level.shader_test
rename to 
tests/spec/glsl-1.20/execution/out-parameter-indexing/fs-inout-index-two-level.shader_test
diff --git 
a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-float-array.shader_test
 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-float-array.shader_test
similarity index 100%
rename from 
tests/shaders/out-parameter-indexing/vs-inout-index-inout-float-array.shader_test
rename to 
tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-float-array.shader_test
diff --git 
a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col-array.shader_test
 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-mat2-col-array.shader_test
similarity index 100%
rename from 
tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col-array.shader_test
rename to 
tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-mat2-col-array.shader_test
diff --git 
a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
similarity index 100%
rename from 
tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
rename to 
tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-mat2-col.shader_test
diff --git 
a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-row.shader_test
 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-mat2-row.shader_test
similarity index 100%
rename from 
tests/shaders/out-parameter-indexing/vs-inout-index-inout-mat2-row.shader_test
rename to 
tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-mat2-row.shader_test
diff --git 
a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-vec4-array-element-array.shader_test
 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-vec4-array-element-array.shader_test
similarity index 100%
rename from 
tests/shaders/out-parameter-indexing/vs-inout-index-inout-vec4-array-element-array.shader_test
rename to 
tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-vec4-array-element-array.shader_test
diff --git 
a/tests/shaders/out-parameter-indexing/vs-inout-index-inout-vec4-array-element.shader_test
 
b/tests/spec/glsl-1.20/execution/out-parameter-indexing/vs-inout-index-inout-vec4-array-element.shader_test

Re: [Piglit] [PATCH 15/15] arb_tessellation_shader: add a test with an array in a struct in a per-vertex TCS out

2018-04-03 Thread Timothy Arceri



On 27/03/18 10:32, Marek Olšák wrote:

From: Nicolai Hähnle 

This currently hits a bug in Mesa's GLSL-to-TGSI conversion.
---
  .../tcs-tes-array-in-struct.shader_test| 78 ++
  1 file changed, 78 insertions(+)
  create mode 100644 
tests/spec/arb_tessellation_shader/execution/variable-indexing/tcs-tes-array-in-struct.shader_test

diff --git 
a/tests/spec/arb_tessellation_shader/execution/variable-indexing/tcs-tes-array-in-struct.shader_test
 
b/tests/spec/arb_tessellation_shader/execution/variable-indexing/tcs-tes-array-in-struct.shader_test
new file mode 100644
index 0..8611bdfa7
--- /dev/null
+++ 
b/tests/spec/arb_tessellation_shader/execution/variable-indexing/tcs-tes-array-in-struct.shader_test
@@ -0,0 +1,78 @@
+[require]
+GLSL >= 1.50
+GL_ARB_tessellation_shader
+
+[vertex shader passthrough]
+
+[tessellation control shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(vertices = 4) out;
+
+struct S {
+int v[2];
+};
+
+out S tcs_tes_s[];
+
+void main()
+{
+for (int i = 0; i < 2; ++i)
+   tcs_tes_s[gl_InvocationID].v[i] = gl_InvocationID * 2 + i;
+
+//gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;


remove ???



+gl_TessLevelOuter = float[4](3.0, 3.0, 3.0, 3.0);
+gl_TessLevelInner = float[2](3.0, 3.0);
+}
+
+[tessellation evaluation shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(quads, equal_spacing) in;
+
+struct S {
+int v[2];
+};
+
+in S tcs_tes_s[];
+
+out vec4 color;
+
+void main()
+{
+gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
+
+for (int i = 0; i < 4; ++i) {
+for (int j = 0; j < 2; ++j) {
+int expected = i * 2 + j;
+int actual = tcs_tes_s[i].v[j];
+if (expected != actual) {
+color = vec4(1.0, float(expected) / 255.0, float(actual) / 
255.0, 0.0);
+return;
+}
+}
+}
+
+color = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[fragment shader]
+#version 150
+in vec4 color;
+out vec4 outcolor;
+
+void main()
+{
+outcolor = color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+clear
+
+patch parameter vertices 1
+draw arrays GL_PATCHES 0 1
+
+probe all rgba 0 1 0 1


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


[Piglit] [PATCH] glsl: test for LLVM Error: Terminator found in the middle of a basic block

2018-04-02 Thread Timothy Arceri
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105317
---
 ...fs-nested-loop-unrolled-with-return.shader_test | 40 ++
 1 file changed, 40 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test

diff --git 
a/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test
 
b/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test
new file mode 100644
index 0..3d110f2ad
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/fs-nested-loop-unrolled-with-return.shader_test
@@ -0,0 +1,40 @@
+# This test for a bug in LLVM based drivers where the LLVM validator cannot
+# handle a break that is not the last instruction in the block. radeonsi
+# in order to speed up compilation only runs GLSL IR optimisation passes a
+# limit number of times. So we need to make sure it successfully removed any
+# instructions following a break before creating the LLVM IR.
+#
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main(void)
+{
+  gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+uniform int a;
+
+vec4 getColour() {
+  /* We use a uniform in the outer loop comparision so it's not immediately
+   * unrolled.
+   */
+  for(int v124 = 0; v124 != a; v124++) {
+for(int v229 = 1; v229 > 0; v229--) {
+  return vec4(0.0, 1.0, 0.0, 1.0);
+}
+  }
+
+  return vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+void main(void) {
+  gl_FragColor = getColour();
+}
+
+[test]
+uniform int a 1
+
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.14.3

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


[Piglit] [PATCH] glsl-1.10: test that loop unrolling doesnt create an infinite loop

2018-03-27 Thread Timothy Arceri
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105670
---
 ...vs-loop-complex-unroll-nested-break.shader_test | 48 ++
 1 file changed, 48 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-nested-break.shader_test

diff --git 
a/tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-nested-break.shader_test
 
b/tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-nested-break.shader_test
new file mode 100644
index 0..42721ca79
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-nested-break.shader_test
@@ -0,0 +1,48 @@
+# This tests for a bug in loop unrolling where we were detecting 2 breaks in
+# the loop but only found a single terminator (exit condition). The result was
+# we were attempting to do a complex unroll but failing half way through the
+# unroll process. As a result we ended up creating an infinite loop.
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+uniform int loop_break;
+
+void main()
+{
+  gl_Position = gl_Vertex;
+
+  vec4 colour;
+  int j = 0;
+  for (int i = 0; i < 4; i++) {
+
+ colour = vec4(0.0, 1.0, 0.0, 1.0);
+
+ if (i >= 2) {
+j++; // we use this so the if doesn't get reduced to a series of bcsel
+if (loop_break == 1 || j == loop_break) {
+   colour = vec4(1.0, 0.0, 0.0, 1.0);
+   break;
+}
+ }
+  }
+
+  gl_FrontColor = colour;
+}
+
+[fragment shader]
+void main()
+{
+  gl_FragColor = gl_Color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+
+uniform int loop_break 0
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform int loop_break 1
+draw rect -1 -1 2 2
+probe all rgba 1.0 0.0 0.0 1.0
-- 
2.14.3

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


[Piglit] [PATCH] glsl-1.10: test divide by zero doesn't crash constant evaluation

2018-03-01 Thread Timothy Arceri
Cc: Jason Ekstrand 
Cc: Mark Janes 
---
 .../fs-loop-unrolled-divide-by-zero.shader_test| 31 ++
 1 file changed, 31 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/linker/fs-loop-unrolled-divide-by-zero.shader_test

diff --git 
a/tests/spec/glsl-1.10/linker/fs-loop-unrolled-divide-by-zero.shader_test 
b/tests/spec/glsl-1.10/linker/fs-loop-unrolled-divide-by-zero.shader_test
new file mode 100644
index 0..761657c3c
--- /dev/null
+++ b/tests/spec/glsl-1.10/linker/fs-loop-unrolled-divide-by-zero.shader_test
@@ -0,0 +1,31 @@
+# From the GLSL 4.60 spec Section 5.9 (Expressions):
+#
+#  "Dividing by zero does not cause an exception but does
+#  result in an unspecified value."
+#
+# Here we make sure that constant evaluation doesn't crash on
+# a divide by zero.
+#
+[require]
+GLSL >= 1.10
+
+[vertex shader passthrough]
+
+[fragment shader]
+void main()
+{
+  int j = 0;
+
+  // We use a loop specifically to avoid Mesa's GLSL IR
+  // from doing the constant evaluating. In this case
+  // we want to test NIR which exclusively does loop
+  // unrolling on some drivers and will therefore end
+  // up doing the constant evaluation.
+  for (int i = 0; i < 4; i++)
+ j += 42/i;
+
+  gl_FragColor.x = 255.0f / float(j);
+}
+
+[test]
+link success
-- 
2.14.3

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


Re: [Piglit] [PATCH] ext_transform_feedback-interleaved: disable unneeded printfs()

2017-12-18 Thread Timothy Arceri

Probably should just remove it but I don't really care either way so:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 19/12/17 09:23, Brian Paul wrote:

No need to print passing cases.  Reduced log noise.
---
  tests/spec/ext_transform_feedback/interleaved.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/spec/ext_transform_feedback/interleaved.c 
b/tests/spec/ext_transform_feedback/interleaved.c
index a52474c..0d237d7 100644
--- a/tests/spec/ext_transform_feedback/interleaved.c
+++ b/tests/spec/ext_transform_feedback/interleaved.c
@@ -189,7 +189,8 @@ enum piglit_result piglit_display(void)
if (fabs(ptr[i] - expected[i]) > 0.01) {
printf("Buffer[%i]: %f,  Expected: %f\n", i, ptr[i], 
expected[i]);
pass = GL_FALSE;
-   } else {
+   } else if (0) {
+   /* debug */
printf("Buffer[%i]: %f,  Expected: %f -- OK\n", i, 
ptr[i], expected[i]);
}
}


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


Re: [Piglit] Move and rename tests from bugs/ to spec/ directory.

2017-12-17 Thread Timothy Arceri

Thanks for doing this! Series:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 17/12/17 06:20, Fabian Bieler wrote:

Also includes some formatting fixes,

updated some comments (particularly added license comments) and

corrected value of config.supports_gl_compat_version in some cases.



Some tests were moved to different profiles in all.py (noted in commit
msg).


Otherwise no changes.





Nicolai Hähnle, Vinson Lee, Wiktor Janas: Do any of you take issue with
the addition of the MIT copyright notice?
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


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


Re: [Piglit] [PATCH] all.py: add entry for ext_occlusion_query_boolean

2017-12-13 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 11/12/17 17:19, Tapani Pälli wrote:

commit 68a003409 forgot to add this

Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
---
  tests/all.py | 5 +
  1 file changed, 5 insertions(+)

diff --git a/tests/all.py b/tests/all.py
index c4cbe0bd9..ab1bed0f9 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -3172,6 +3172,11 @@ with profile.test_list.group_manager(
  grouptools.join('spec', 'oes_required_internalformat')) as g:
  g(['oes_required_internalformat-renderbuffer'], 'renderbuffer')
  
+with profile.test_list.group_manager(

+PiglitGLTest,
+grouptools.join('spec', 'ext_occlusion_query_boolean')) as g:
+g(['ext_occlusion_query_boolean-any-samples'], 'any-samples')
+
  with profile.test_list.group_manager(
  PiglitGLTest,
  grouptools.join('spec', 'ext_disjoint_timer_query')) as g:


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


Re: [Piglit] [PATCH 2/2] ssbo/linker: move some linker tests to using a fragment shader ssbo

2017-11-17 Thread Timothy Arceri

Series:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 17/11/17 13:02, Dave Airlie wrote:

From: Dave Airlie <airl...@redhat.com>

---
  .../linker/implicit_size_array_member.shader_test  | 7 +++
  .../linker/sized_arrays_of_arrays_member.shader_test   | 6 ++
  .../linker/unsized_arrays_of_arrays_member.shader_test | 7 +++
  3 files changed, 8 insertions(+), 12 deletions(-)

diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/implicit_size_array_member.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/implicit_size_array_member.shader_test
index 03b2b7c..7f103ee 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/implicit_size_array_member.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/implicit_size_array_member.shader_test
@@ -12,7 +12,9 @@
  GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
  
-[vertex shader]

+[vertex shader passthrough]
+
+[fragment shader]
  #version 150
  #extension GL_ARB_shader_storage_buffer_object: require
  
@@ -21,13 +23,10 @@ buffer a {

vec4 a[];
  } b;
  
-in vec4 piglit_vertex;

  out vec4 c;
  
  void main(void) {

c = b.s[0] + b.s[1];
-
-   gl_Position = piglit_vertex;
  }
  
  [test]

diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/sized_arrays_of_arrays_member.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/sized_arrays_of_arrays_member.shader_test
index ae5e682..45c922b 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/sized_arrays_of_arrays_member.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/sized_arrays_of_arrays_member.shader_test
@@ -13,7 +13,8 @@ GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
  GL_ARB_arrays_of_arrays
  
-[vertex shader]

+[vertex shader passthrough]
+[fragment shader]
  #version 150
  #extension GL_ARB_shader_storage_buffer_object: require
  #extension GL_ARB_arrays_of_arrays: require
@@ -23,13 +24,10 @@ buffer a {
vec4 aoa[2][2];
  } b;
  
-in vec4 piglit_vertex;

  out vec4 c;
  
  void main(void) {

c = b.s;
-
-   gl_Position = piglit_vertex;
  }
  
  [test]

diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/unsized_arrays_of_arrays_member.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/unsized_arrays_of_arrays_member.shader_test
index 614d30e..24eced2 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/unsized_arrays_of_arrays_member.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/unsized_arrays_of_arrays_member.shader_test
@@ -13,7 +13,9 @@ GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
  GL_ARB_arrays_of_arrays
  
-[vertex shader]

+[vertex shader passthrough]
+
+[fragment shader]
  #version 150
  #extension GL_ARB_shader_storage_buffer_object: require
  #extension GL_ARB_arrays_of_arrays: require
@@ -23,13 +25,10 @@ buffer a {
vec4 aoa[][2];
  } b;
  
-in vec4 piglit_vertex;

  out vec4 c;
  
  void main(void) {

c = b.s;
-
-   gl_Position = piglit_vertex;
  }
  
  [test]



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


Re: [Piglit] [PATCH 5/5] ssbo/linking: add check for vertex ssbo support.

2017-11-17 Thread Timothy Arceri

Series:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 17/11/17 12:53, Dave Airlie wrote:

From: Dave Airlie <airl...@redhat.com>

skip if we don't support and vertex ssbos
---
  ...stance-matching-shader-storage-blocks-array-size-mismatch.shader_test | 1 +
  ...matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test | 1 +
  ...ance-matching-shader-storage-blocks-member-count-mismatch.shader_test | 1 +
  ...tance-matching-shader-storage-blocks-member-name-mismatch.shader_test | 1 +
  ...ance-matching-shader-storage-blocks-member-order-mismatch.shader_test | 1 +
  ...-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test | 1 +
  ...tance-matching-shader-storage-blocks-member-type-mismatch.shader_test | 1 +
  ...-matching-shader-storage-blocks-memory-qualifier-mismatch.shader_test | 1 +
  ...tching-shader-storage-blocks-packaging-qualifier-mismatch.shader_test | 1 +
  9 files changed, 9 insertions(+)

diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test
index 2a0da9e..7e57135 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-array-size-mismatch.shader_test
@@ -18,6 +18,7 @@
  [require]
  GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
+INT GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS >= 1
  
  [vertex shader]

  #version 150
diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test
index 48bba07..8498c06 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-binding-qualifier-mismatch.shader_test
@@ -19,6 +19,7 @@
  GLSL >= 1.50
  GL_ARB_shading_language_420pack
  GL_ARB_shader_storage_buffer_object
+INT GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS >= 1
  
  [vertex shader]

  #version 150
diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test
index 29ba5ec..2f71f5b 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-count-mismatch.shader_test
@@ -18,6 +18,7 @@
  [require]
  GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
+INT GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS >= 1
  
  [vertex shader]

  #version 150
diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test
index 972cda6..993f531 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-name-mismatch.shader_test
@@ -18,6 +18,7 @@
  [require]
  GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
+INT GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS >= 1
  
  [vertex shader]

  #version 150
diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test
index 3de14d8..0afffdb 100644
--- 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test
+++ 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-order-mismatch.shader_test
@@ -18,6 +18,7 @@
  [require]
  GLSL >= 1.50
  GL_ARB_shader_storage_buffer_object
+INT GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS >= 1
  
  [vertex shader]

  #version 150
diff --git 
a/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test
 
b/tests/spec/arb_shader_storage_buffer_object/linker/instance-matching-shader-storage-blocks-member-qualifier-mismatch.shader_test
index b1c0377..f6b010c 100644
--- 
a/tests/spec/arb_sh

Re: [Piglit] [PATCH] arb_enhanced_layouts: add test for location aliasing with non-numerical type

2017-11-09 Thread Timothy Arceri

On 09/11/17 18:52, Iago Toral wrote:

This is not so much based on the spec but based on the original code we
had in the linker (which we still have) which assumes that all
locations consumed by a struct variable use up all 4 components (thus
preventing any kind of aliasing to be successful) based on the fact
that the component layout qualifier can't be used on structs (or its
members):

if (type->without_array()->is_record()) {
/* The component qualifier can't be used on structs so just treat
 * all component slots as used.
 */
    last_comp = 4;
} else {
...
}

However, thinking a bit more about it, it is not 100% clear that this
assumption is correct and maybe we should be doing the same for structs
that I did for interface blocks members and check the actual components
used by each field member and only produce link errors if there is
actual component aliasing.


Yeah I wrote that code but looking at it now I'm not sure if its 
correct. The problem with structs is nesting, it could get very 
complicated trying to figure out packing with a struct.




Let's drop this patch for now.

Iago

On Thu, 2017-11-09 at 12:43 +1100, Timothy Arceri wrote:

On 06/11/17 23:22, Iago Toral Quiroga wrote:

This is not allowed so we check that we produce a linker error.


It's not 100% obvious why this wouldn't be allowed. Can we have a
spec
quote added to the
  test header?


---
   .../vs-to-fs-type-not-numerical.shader_test| 52
++
   1 file changed, 52 insertions(+)
   create mode 100644
tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-
type-not-numerical.shader_test

diff --git a/tests/spec/arb_enhanced_layouts/linker/component-
layout/vs-to-fs-type-not-numerical.shader_test
b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-
type-not-numerical.shader_test
new file mode 100644
index 0..aede6ce8d
--- /dev/null
+++ b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-
to-fs-type-not-numerical.shader_test
@@ -0,0 +1,52 @@
+# Test for link error between vertex and fragment shaders when
+# component qualifiers don't match. This case checks that
+# location aliasing is not permitted for non-numerical types
+# such as a struct
+
+[require]
+GLSL >= 3.30
+GL_ARB_enhanced_layouts
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 330
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+struct S {
+  vec3 foo;
+  vec4 bar;
+};
+
+layout(location = 0, component = 3) out float b;
+layout(location = 0) out S a;
+
+void main()
+{
+  a.foo = vec3(1.0);
+  a.bar = vec4(1.0);
+  b = 0.5;
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+struct S {
+  vec3 foo;
+  vec4 bar;
+};
+
+layout(location = 0, component = 3) in float b;
+layout(location = 0) in S a;
+
+out vec4 color;
+
+void main()
+{
+  color = vec4(a.foo + a.bar.xyz, b);
+}
+
+[test]
+link error





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


Re: [Piglit] [PATCH] arb_enhanced_layouts: add test for location aliasing with non-numerical type

2017-11-08 Thread Timothy Arceri

On 06/11/17 23:22, Iago Toral Quiroga wrote:

This is not allowed so we check that we produce a linker error.


It's not 100% obvious why this wouldn't be allowed. Can we have a spec 
quote added to the test header?



---
  .../vs-to-fs-type-not-numerical.shader_test| 52 ++
  1 file changed, 52 insertions(+)
  create mode 100644 
tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-type-not-numerical.shader_test

diff --git 
a/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-type-not-numerical.shader_test
 
b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-type-not-numerical.shader_test
new file mode 100644
index 0..aede6ce8d
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/linker/component-layout/vs-to-fs-type-not-numerical.shader_test
@@ -0,0 +1,52 @@
+# Test for link error between vertex and fragment shaders when
+# component qualifiers don't match. This case checks that
+# location aliasing is not permitted for non-numerical types
+# such as a struct
+
+[require]
+GLSL >= 3.30
+GL_ARB_enhanced_layouts
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 330
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+struct S {
+  vec3 foo;
+  vec4 bar;
+};
+
+layout(location = 0, component = 3) out float b;
+layout(location = 0) out S a;
+
+void main()
+{
+  a.foo = vec3(1.0);
+  a.bar = vec4(1.0);
+  b = 0.5;
+}
+
+[fragment shader]
+#version 330
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+struct S {
+  vec3 foo;
+  vec4 bar;
+};
+
+layout(location = 0, component = 3) in float b;
+layout(location = 0) in S a;
+
+out vec4 color;
+
+void main()
+{
+  color = vec4(a.foo + a.bar.xyz, b);
+}
+
+[test]
+link error


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


Re: [Piglit] [PATCH v2] shaders: Test using a bound program after an unsuccessful relink

2017-11-05 Thread Timothy Arceri



On 03/11/17 21:27, Neil Roberts wrote:

Timothy Arceri <tarc...@itsqueeze.com> writes:


Thanks for the test! The idea is great, the only problem I see is
that the minimum GL version seems too high. This test would not run
on the i915 driver which is a problem IMO. Can you lower the
requirements?


Good point. Here is a v2 that should work with GL2.0. However I’m not
exactly sure what is the minimun requirements for i915. I read that
the default version has been lowered to 1.4. Were you suggesting that
it should go as low as using the GL_ARB_shader_objects extension? I
guess there are two i915 drivers as well so I’m not sure which one you
are referring to.


Your right I forgot it was lowered, however dropping the requirements of 
this test is still the right thing to do so thanks  for that :)


One small comment further down, otherwise:

Acked-by: Timothy Arceri <tarc...@itsqueeze.com>




Regards,
- Neil

-- >8 -- (use git am -c to cut here)

If a bound program is relinked unsuccessfully it is supposed to keep
the executable and the program state such as the uniforms. This adds a
test for that which updates a uniform, does a failed relink and
verifies that a render succeeds with the new uniform value. This is
currently causing a use-after-free error in Mesa. The test has some
redundant allocations to try and encourage it to fail which it does
about 98% of the time.

v2: Adapt to work with GL2.0. Change the order of the colours so that
 a successful run ends with green. Delete the program after use.
---
  tests/all.py|   1 +
  tests/shaders/CMakeLists.gl.txt |   1 +
  tests/shaders/unsuccessful-relink.c | 203 
  3 files changed, 205 insertions(+)
  create mode 100644 tests/shaders/unsuccessful-relink.c

diff --git a/tests/all.py b/tests/all.py
index 9e63fa9..ae4a995 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -624,6 +624,7 @@ with profile.test_list.group_manager(PiglitGLTest, 
'shaders') as g:
  g(['point-vertex-id', 'gl_InstanceID', 'divisor'])
  g(['point-vertex-id', 'gl_VertexID', 'gl_InstanceID', 'divisor'])
  g(['glsl-vs-int-attrib'])
+g(['unsuccessful-relink'])
  g(['glsl-link-initializer-03'],
'GLSL link two programs, global initializer')
  g(['glsl-getactiveuniform-count',
diff --git a/tests/shaders/CMakeLists.gl.txt b/tests/shaders/CMakeLists.gl.txt
index 1c06843..7090d94 100644
--- a/tests/shaders/CMakeLists.gl.txt
+++ b/tests/shaders/CMakeLists.gl.txt
@@ -164,5 +164,6 @@ piglit_add_executable (useshaderprogram-bad-program 
useshaderprogram-bad-program
  piglit_add_executable (useshaderprogram-flushverts-1 
useshaderprogram-flushverts-1.c)
  piglit_add_executable (version-mixing version-mixing.c)
  piglit_add_executable (glsl-vs-int-attrib glsl-vs-int-attrib.c)
+piglit_add_executable (unsuccessful-relink unsuccessful-relink.c)
  
  # vim: ft=cmake:

diff --git a/tests/shaders/unsuccessful-relink.c 
b/tests/shaders/unsuccessful-relink.c
new file mode 100644
index 000..b652fe9
--- /dev/null
+++ b/tests/shaders/unsuccessful-relink.c
@@ -0,0 +1,203 @@
+/*
+ * Copyright © 2017 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.
+ */
+
+/**
+ * \file unsuccessful-relink.c
+ *
+ * Render using a program with a uniform. Modify the uniform and then
+ * do a relink that will fail. This shouldn’t affect the original
+ * program and it should render with the new uniform value.
+ *
+ * GLSL 4.6 spec section 7.3:
+ *
+ * “If a program object that is active for any shader stage is
+ *  re-linked unsuccessfully, the link status will be set to FALSE,
+ *  but any existing executables and associated state will remain part
+ *  of the current rendering state until a subsequent call to
+ *  UseProgram, UseProgramStages, or BindProgramPipeline removes them
+ *  from use.”

Re: [Piglit] [PATCH] shaders: Test using a bound program after an unsuccessful relink

2017-11-02 Thread Timothy Arceri

On 03/11/17 05:42, Neil Roberts wrote:

If a bound program is relinked unsuccessfully it is supposed to keep
the executable and the program state such as the uniforms. This adds a
test for that which updates a uniform, does a failed relink and
verifies that a render succeeds with the new uniform value. This is
currently causing a use-after-free error in Mesa. The test has some
redundant allocations to try and encourage it to fail which it does
about 98% of the time.


Thanks for the test! The idea is great, the only problem I see is that 
the minimum GL version seems too high. This test would not run on the 
i915 driver which is a problem IMO. Can you lower the requirements?




---
  tests/all.py|   1 +
  tests/shaders/CMakeLists.gl.txt |   1 +
  tests/shaders/unsuccessful-relink.c | 199 
  3 files changed, 201 insertions(+)
  create mode 100644 tests/shaders/unsuccessful-relink.c

diff --git a/tests/all.py b/tests/all.py
index 9e63fa9..ae4a995 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -624,6 +624,7 @@ with profile.test_list.group_manager(PiglitGLTest, 
'shaders') as g:
  g(['point-vertex-id', 'gl_InstanceID', 'divisor'])
  g(['point-vertex-id', 'gl_VertexID', 'gl_InstanceID', 'divisor'])
  g(['glsl-vs-int-attrib'])
+g(['unsuccessful-relink'])
  g(['glsl-link-initializer-03'],
'GLSL link two programs, global initializer')
  g(['glsl-getactiveuniform-count',
diff --git a/tests/shaders/CMakeLists.gl.txt b/tests/shaders/CMakeLists.gl.txt
index 1c06843..7090d94 100644
--- a/tests/shaders/CMakeLists.gl.txt
+++ b/tests/shaders/CMakeLists.gl.txt
@@ -164,5 +164,6 @@ piglit_add_executable (useshaderprogram-bad-program 
useshaderprogram-bad-program
  piglit_add_executable (useshaderprogram-flushverts-1 
useshaderprogram-flushverts-1.c)
  piglit_add_executable (version-mixing version-mixing.c)
  piglit_add_executable (glsl-vs-int-attrib glsl-vs-int-attrib.c)
+piglit_add_executable (unsuccessful-relink unsuccessful-relink.c)
  
  # vim: ft=cmake:

diff --git a/tests/shaders/unsuccessful-relink.c 
b/tests/shaders/unsuccessful-relink.c
new file mode 100644
index 000..552a4ef
--- /dev/null
+++ b/tests/shaders/unsuccessful-relink.c
@@ -0,0 +1,199 @@
+/*
+ * Copyright © 2017 Igalia S.L.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * \file unsuccessful-relink.c
+ *
+ * Render using a program with a uniform. Modify the uniform and then
+ * do a relink that will fail. This shouldn’t affect the original
+ * program and it should render with the new uniform value.
+ *
+ * GLSL 4.6 spec section 7.3:
+ *
+ * “If a program object that is active for any shader stage is
+ *  re-linked unsuccessfully, the link status will be set to FALSE,
+ *  but any existing executables and associated state will remain part
+ *  of the current rendering state until a subsequent call to
+ *  UseProgram, UseProgramStages, or BindProgramPipeline removes them
+ *  from use.”
+ */
+
+#include "piglit-util-gl.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+config.supports_gl_core_version = 31;
+config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+static const char vs_source[] =
+"#version 330\n"
+"layout(location = 0) in vec4 piglit_vertex;\n"
+"void main()\n"
+"{\n"
+"   gl_Position = piglit_vertex;\n"
+"}\n";
+
+static const char fs_source[] =
+"#version 330\n"
+"uniform vec4 color;\n"
+"layout(location = 0) out vec4 color_out;\n"
+"void main()\n"
+"{\n"
+"   color_out = color;\n"
+"}\n";
+
+static const float green[] = { 0.0f, 1.0f, 0.0f, 1.0f };
+static const float purple[] = { 0.5f, 0.0f, 0.5f, 1.0f };
+
+static bool
+try_render(const float *color)
+{
+struct vertex { float x, y; };
+

[Piglit] [PATCH] ARB_shader_atomic_counter_ops: fix glsl version

2017-11-01 Thread Timothy Arceri
---
 tests/spec/arb_shader_atomic_counter_ops/compiler/functions.frag | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_shader_atomic_counter_ops/compiler/functions.frag 
b/tests/spec/arb_shader_atomic_counter_ops/compiler/functions.frag
index b991fe1c7..637fafa62 100644
--- a/tests/spec/arb_shader_atomic_counter_ops/compiler/functions.frag
+++ b/tests/spec/arb_shader_atomic_counter_ops/compiler/functions.frag
@@ -1,20 +1,20 @@
 /* [config]
  * expect_result: pass
  * glsl_version: 1.40
  * require_extensions: GL_ARB_shader_atomic_counter_ops
  * [end config]
  *
  * Check that the builtin functions defined by the extension
  * are present.
  */
-#version 150
+#version 140
 #extension GL_ARB_shader_atomic_counters: require
 #extension GL_ARB_shader_atomic_counter_ops: require
 
 layout (binding=0) uniform atomic_uint c;
 out uvec4 fcolor;
 uniform uint data, comp;
 
 void main()
 {
 fcolor.x = atomicCounterAddARB(c, data) +
-- 
2.14.3

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


Re: [Piglit] [PATCH] minmax: change the glGet functions to accept 64-bit variables

2017-10-24 Thread Timothy Arceri

On 21/10/17 01:07, sandra koroniewska wrote:

Is this fix alright now? If so, can anyone push please?


Pushed. Thanks for the patch!

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


Re: [Piglit] [PATCH] arb_shader_atomic_counter_ops: declare counters to fix undefined behaviour.

2017-10-10 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 11/10/17 11:18, Dave Airlie wrote:

From: Dave Airlie <airl...@redhat.com>

It's undefined (including crashing) behaviour to use atomic counters
without having bound enough storage for them. This fixes this test
to bind the storage for the counters it uses.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
  .../arb_shader_atomic_counter_ops/execution/all_touch_test.shader_test   | 1 +
  1 file changed, 1 insertion(+)

diff --git 
a/tests/spec/arb_shader_atomic_counter_ops/execution/all_touch_test.shader_test 
b/tests/spec/arb_shader_atomic_counter_ops/execution/all_touch_test.shader_test
index 7fb3cbf..913fa6b 100644
--- 
a/tests/spec/arb_shader_atomic_counter_ops/execution/all_touch_test.shader_test
+++ 
b/tests/spec/arb_shader_atomic_counter_ops/execution/all_touch_test.shader_test
@@ -68,5 +68,6 @@ void main()
  }
  
  [test]

+atomic counters 8
  draw rect -1 -1 2 2
  probe all rgba 0.0 1.0 0.0 1.0


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


Re: [Piglit] [PATCH] arrays_of_arrays/atomic_counters: set requirements on atomic counter numbers.

2017-10-10 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 11/10/17 11:24, Dave Airlie wrote:

From: Dave Airlie <airl...@redhat.com>

These both use 20 counters so check against the limits before running.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
  .../execution/atomic_counters/fs-simple-inc-dec-read.shader_test | 1 +
  .../execution/atomic_counters/vs-simple-inc-dec-read.shader_test | 1 +
  2 files changed, 2 insertions(+)

diff --git 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
index 68ddc46..9949df8 100644
--- 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
+++ 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-simple-inc-dec-read.shader_test
@@ -5,6 +5,7 @@
  GLSL >= 1.40
  GL_ARB_shader_atomic_counters
  GL_ARB_arrays_of_arrays
+INT GL_MAX_FRAGMENT_ATOMIC_COUNTERS >= 20
  
  [vertex shader passthrough]
  
diff --git a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test

index c0f319c..c5c3015 100644
--- 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
+++ 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
@@ -6,6 +6,7 @@ GLSL >= 1.40
  GL_ARB_shader_atomic_counters
  GL_ARB_arrays_of_arrays
  INT GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS >= 1
+INT GL_MAX_VERTEX_ATOMIC_COUNTERS >= 20
  
  [vertex shader]

  #version 140


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


Re: [Piglit] [PATCH] arrays_of_arrays/atomic_counter: check counters limit on linker test.

2017-10-10 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 11/10/17 11:28, Dave Airlie wrote:

From: Dave Airlie <airl...@redhat.com>

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
  .../arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test | 2 ++
  1 file changed, 2 insertions(+)

diff --git 
a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test 
b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test
index b618137..c6b5c5a 100644
--- a/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/linker/vs-to-fs-atomic-counter.shader_test
@@ -5,6 +5,8 @@
  GLSL >= 1.40
  GL_ARB_shader_atomic_counters
  GL_ARB_arrays_of_arrays
+INT GL_MAX_VERTEX_ATOMIC_COUNTERS >= 12
+INT GL_MAX_FRAGMENT_ATOMIC_COUNTERS >= 12
  
  [vertex shader]

  #version 140


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


[Piglit] [PATCH v2] arb_enhanced_layouts: test packing of floats in the same slots as an array

2017-10-10 Thread Timothy Arceri
This test causes an assert to be thrown on i965 currently.
---
 ...fs-array-interleave-single-location.shader_test | 93 ++
 1 file changed, 93 insertions(+)
 create mode 100644 
tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test

diff --git 
a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
 
b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
new file mode 100644
index 0..b75a31bad
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
@@ -0,0 +1,93 @@
+# Test for successful interleaving of components in arrays with a single float
+# between vertex and fragment shaders.
+
+[require]
+GLSL >= 1.40
+GL_ARB_enhanced_layouts
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+// consume X/Y/Z components of 6 vectors
+layout(location = 0) out vec3 a[6];
+
+// consume W component of 6 slots
+layout(location = 0, component = 3) out float b;
+layout(location = 1, component = 3) out float c;
+layout(location = 2, component = 3) out float d;
+layout(location = 3, component = 3) out float e;
+layout(location = 4, component = 3) out float f;
+layout(location = 5, component = 3) out float g;
+
+in vec4 piglit_vertex;
+
+void main()
+{
+  a[0] = vec3(0.0);
+  a[1] = vec3(1.0);
+  a[2] = vec3(2.0);
+  a[3] = vec3(3.0);
+  a[4] = vec3(4.0);
+  a[5] = vec3(5.0);
+  b = 6.0;
+  c = 7.0;
+  d = 8.0;
+  e = 9.0;
+  f = 10.0;
+  g = 11.0;
+
+  gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+out vec4 color;
+
+// consume X/Y/Z components of 6 vectors
+layout(location = 0) in vec3 a[6];
+
+// consume W component of 6 slots
+layout(location = 0, component = 3) in float b;
+layout(location = 1, component = 3) in float c;
+layout(location = 2, component = 3) in float d;
+layout(location = 3, component = 3) in float e;
+layout(location = 4, component = 3) in float f;
+layout(location = 5, component = 3) in float g;
+
+void main()
+{
+  color = vec4(0, 1, 0, 1);
+
+  for (int i = 0; i < 6; i++) {
+if (a[i] != vec3(float(i)))
+  color = vec4(1, 0, 0, 1);
+  }
+
+  if (b != 6.0)
+color = vec4(1, 0, 0, 1);
+
+  if (c != 7.0)
+color = vec4(1, 0, 0, 1);
+
+  if (d != 8.0)
+color = vec4(1, 0, 0, 1);
+
+  if (e != 9.0)
+color = vec4(1, 0, 0, 1);
+
+  if (f != 10.0)
+color = vec4(1, 0, 0, 1);
+
+  if (g != 11.0)
+color = vec4(1, 0, 0, 1);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 0 1 0
-- 
2.13.6

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


Re: [Piglit] [PATCH] arb_enhanced_layouts: test packing of floats in the same slots as an array

2017-10-10 Thread Timothy Arceri

On 10/10/17 23:39, Ilia Mirkin wrote:
It's traditional for green to mean good, red to mean bad. You have those 
flipped here.


Right. I'd fixed this locally but forgot to commit before sending.



On Oct 10, 2017 2:58 AM, "Timothy Arceri" <tarc...@itsqueeze.com 
<mailto:tarc...@itsqueeze.com>> wrote:


This test causes an assert to be thrown on i965 currently.
---
  ...fs-array-interleave-single-location.shader_test | 93
++
  1 file changed, 93 insertions(+)
  create mode 100644

tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test

diff --git

a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test

b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
new file mode 100644
index 0..43b6a05e8
--- /dev/null
+++

b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
@@ -0,0 +1,93 @@
+# Test for successful interleaving of components in arrays with a
single float
+# between vertex and fragment shaders.
+
+[require]
+GLSL >= 1.40
+GL_ARB_enhanced_layouts
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+// consume X/Y/Z components of 6 vectors
+layout(location = 0) out vec3 a[6];
+
+// consumes W component of 6 vectors
+layout(location = 0, component = 3) out float b;
+layout(location = 1, component = 3) out float c;
+layout(location = 2, component = 3) out float d;
+layout(location = 3, component = 3) out float e;
+layout(location = 4, component = 3) out float f;
+layout(location = 5, component = 3) out float g;
+
+in vec4 piglit_vertex;
+
+void main()
+{
+  a[0] = vec3(0.0);
+  a[1] = vec3(1.0);
+  a[2] = vec3(2.0);
+  a[3] = vec3(3.0);
+  a[4] = vec3(4.0);
+  a[5] = vec3(5.0);
+  b = 6.0;
+  c = 7.0;
+  d = 8.0;
+  e = 9.0;
+  f = 10.0;
+  g = 11.0;
+
+  gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+out vec4 color;
+
+// consume X/Y/Z components of 6 vectors
+layout(location = 0) in vec3 a[6];
+
+// consumes W component of 6 vectors
+layout(location = 0, component = 3) in float b;
+layout(location = 1, component = 3) in float c;
+layout(location = 2, component = 3) in float d;
+layout(location = 3, component = 3) in float e;
+layout(location = 4, component = 3) in float f;
+layout(location = 5, component = 3) in float g;
+
+void main()
+{
+  color = vec4(1, 0, 0, 1);
+
+  for (int i = 0; i < 6; i++) {
+    if (a[i] != vec3(float(i)))
+      color = vec4(0, 1, 0, 1);
+  }
+
+    if (b != 6.0)
+      color = vec4(0, 1, 0, 1);
+
+    if (c != 7.0)
+      color = vec4(0, 1, 0, 1);
+
+    if (d != 8.0)
+      color = vec4(0, 1, 0, 1);
+
+    if (e != 9.0)
+      color = vec4(0, 1, 0, 1);
+
+    if (f != 10.0)
+      color = vec4(0, 1, 0, 1);
+
+    if (g != 11.0)
+      color = vec4(0, 1, 0, 1);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 1 0 0
--
2.13.6

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


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


[Piglit] [PATCH] arb_enhanced_layouts: test packing of floats in the same slots as an array

2017-10-10 Thread Timothy Arceri
This test causes an assert to be thrown on i965 currently.
---
 ...fs-array-interleave-single-location.shader_test | 93 ++
 1 file changed, 93 insertions(+)
 create mode 100644 
tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test

diff --git 
a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
 
b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
new file mode 100644
index 0..43b6a05e8
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-to-fs-array-interleave-single-location.shader_test
@@ -0,0 +1,93 @@
+# Test for successful interleaving of components in arrays with a single float
+# between vertex and fragment shaders.
+
+[require]
+GLSL >= 1.40
+GL_ARB_enhanced_layouts
+GL_ARB_separate_shader_objects
+
+[vertex shader]
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+// consume X/Y/Z components of 6 vectors
+layout(location = 0) out vec3 a[6];
+
+// consumes W component of 6 vectors
+layout(location = 0, component = 3) out float b;
+layout(location = 1, component = 3) out float c;
+layout(location = 2, component = 3) out float d;
+layout(location = 3, component = 3) out float e;
+layout(location = 4, component = 3) out float f;
+layout(location = 5, component = 3) out float g;
+
+in vec4 piglit_vertex;
+
+void main()
+{
+  a[0] = vec3(0.0);
+  a[1] = vec3(1.0);
+  a[2] = vec3(2.0);
+  a[3] = vec3(3.0);
+  a[4] = vec3(4.0);
+  a[5] = vec3(5.0);
+  b = 6.0;
+  c = 7.0;
+  d = 8.0;
+  e = 9.0;
+  f = 10.0;
+  g = 11.0;
+
+  gl_Position = piglit_vertex;
+}
+
+[fragment shader]
+#version 140
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_separate_shader_objects: require
+
+out vec4 color;
+
+// consume X/Y/Z components of 6 vectors
+layout(location = 0) in vec3 a[6];
+
+// consumes W component of 6 vectors
+layout(location = 0, component = 3) in float b;
+layout(location = 1, component = 3) in float c;
+layout(location = 2, component = 3) in float d;
+layout(location = 3, component = 3) in float e;
+layout(location = 4, component = 3) in float f;
+layout(location = 5, component = 3) in float g;
+
+void main()
+{
+  color = vec4(1, 0, 0, 1);
+
+  for (int i = 0; i < 6; i++) {
+if (a[i] != vec3(float(i)))
+  color = vec4(0, 1, 0, 1);
+  }
+
+if (b != 6.0)
+  color = vec4(0, 1, 0, 1);
+
+if (c != 7.0)
+  color = vec4(0, 1, 0, 1);
+
+if (d != 8.0)
+  color = vec4(0, 1, 0, 1);
+
+if (e != 9.0)
+  color = vec4(0, 1, 0, 1);
+
+if (f != 10.0)
+  color = vec4(0, 1, 0, 1);
+
+if (g != 11.0)
+  color = vec4(0, 1, 0, 1);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 1 0 0
-- 
2.13.6

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


[Piglit] [PATCH] glsl-1.10: add some loop unrolling tests with breaks in else branch

2017-09-21 Thread Timothy Arceri
---
 ...loop-complex-unroll-with-else-break.shader_test | 71 ++
 ...l-else-break-unreachable-then-break.shader_test | 41 +
 2 files changed, 112 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-with-else-break.shader_test
 create mode 100644 
tests/spec/glsl-1.10/execution/vs-loop-unroll-else-break-unreachable-then-break.shader_test

diff --git 
a/tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-with-else-break.shader_test
 
b/tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-with-else-break.shader_test
new file mode 100644
index 0..d543c3fc9
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/vs-loop-complex-unroll-with-else-break.shader_test
@@ -0,0 +1,71 @@
+# This tests unrolling of a loop with two exit point where the trip count
+# of one of the exits is known and the other unknown (loop_count uniform).
+#
+# Here we test all possible outcomes for the loop and also add some
+# unreachable code to make sure it is not accessible after unrolling.
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+uniform int loop_count;
+
+void main()
+{
+  gl_Position = gl_Vertex;
+
+  vec4 colour = vec4(1.0, 1.0, 1.0, 1.0);
+  vec4 colour2 = vec4(0.0, 0.0, 0.0, 1.0);
+  for (int i = 0; i < loop_count; i++) {
+
+ if (i > 1) {
+colour = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+
+ if (i <= 1) {
+colour = vec4(0.0, 1.0, 0.0, 1.0);
+ } else {
+break;
+ }
+
+ /* Unreachable break */
+ if (i > 2) {
+break;
+ }
+
+ /* This should be unreachable */
+ if (i >= 2) {
+colour2 = vec4(0.0, 1.0, 0.0, 1.0);
+ }
+  }
+
+  gl_FrontColor = colour + colour2;
+}
+
+[fragment shader]
+void main()
+{
+  gl_FragColor = gl_Color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+
+uniform int loop_count 4
+draw rect -1 -1 2 2
+probe all rgba 1.0 0.0 0.0 1.0
+
+uniform int loop_count 3
+draw rect -1 -1 2 2
+probe all rgba 1.0 0.0 0.0 1.0
+
+uniform int loop_count 2
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform int loop_count 1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
+
+uniform int loop_count 0
+draw rect -1 -1 2 2
+probe all rgba 1.0 1.0 1.0 1.0
diff --git 
a/tests/spec/glsl-1.10/execution/vs-loop-unroll-else-break-unreachable-then-break.shader_test
 
b/tests/spec/glsl-1.10/execution/vs-loop-unroll-else-break-unreachable-then-break.shader_test
new file mode 100644
index 0..1e83a6f41
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/vs-loop-unroll-else-break-unreachable-then-break.shader_test
@@ -0,0 +1,41 @@
+# This tests unrolling of a loop with two exit point where the limiting
+# terminator has its break in the else branch.
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+uniform int loop_count;
+
+void main()
+{
+  gl_Position = gl_Vertex;
+
+  vec4 colour = vec4(1.0, 1.0, 1.0, 1.0);
+  vec4 colour2 = vec4(0.0, 0.0, 0.0, 0.0);
+  for (int i = 0; i < 3; i++) {
+ if (i <= 1) {
+colour = vec4(0.0, 1.0, 0.0, 1.0);
+ } else {
+break;
+ }
+
+ /* This should be unreachable */
+ if (i >= 2) {
+colour2 = vec4(1.0, 0.0, 0.0, 1.0);
+ }
+  }
+
+  gl_FrontColor = colour + colour2;
+}
+
+[fragment shader]
+void main()
+{
+  gl_FragColor = gl_Color;
+}
+
+[test]
+clear color 0.5 0.5 0.5 0.5
+
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.13.5

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


Re: [Piglit] [PATCH] arb_arrays_of_arrays: remove an unused variable

2017-09-18 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 19/09/17 00:42, Nicolai Hähnle wrote:

From: Nicolai Hähnle <nicolai.haeh...@amd.com>

---
  .../execution/atomic_counters/fs-indirect-index.shader_test  | 1 -
  1 file changed, 1 deletion(-)

diff --git 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
index dae9686ad..39dc268df 100644
--- 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
+++ 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
@@ -11,21 +11,20 @@ GL_ARB_arrays_of_arrays
  [fragment shader]
  #version 140
  #extension GL_ARB_shader_atomic_counters: require
  #extension GL_ARB_arrays_of_arrays: require
  
  layout(binding = 0) uniform atomic_uint a0[2][4];
  
  uniform int n;

  uniform int m;
  
-in vec4 vcolor;

  out vec4 fcolor;
  
  void main()

  {
bool passed = true;
uint v0[12];
uint v1[12];
  
  	/* Get all initail values of a0 */

v0[0] = atomicCounter(a0[0][0]);


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


Re: [Piglit] [PATCH] draw-pixels: fix KHR_no_error logic

2017-08-24 Thread Timothy Arceri



On 23/08/17 17:23, Samuel Pitoiset wrote:



On 08/23/2017 06:11 AM, Timothy Arceri wrote:

---

  This was my fault. The flaw was in my suggestion from the code
  review.


You probably need to use PIGLIT_HAS_ERRORS as well.


I don't think so. This skips testing draws with invalid types, the test 
ran fine for me with this change.






  tests/general/draw-pixels.c | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/general/draw-pixels.c b/tests/general/draw-pixels.c
index 40b4c0b0f..333bb7f86 100644
--- a/tests/general/draw-pixels.c
+++ b/tests/general/draw-pixels.c
@@ -730,22 +730,24 @@ piglit_display(void)
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  for (i = 0; i < ARRAY_SIZE(data_types); i++) {
  for (k = 0; k < ARRAY_SIZE(pixel_ops); k++) {
  for (j = 0; j < ARRAY_SIZE(pixel_formats); j++) {
  format = pixel_formats[j];
  type = data_types[i];
-if (!piglit_khr_no_error &&
-is_format_type_mismatch(format, type)) {
+if (is_format_type_mismatch(format, type)) {
+if (piglit_khr_no_error)
+continue;
+
  glDrawPixels(piglit_width, piglit_height,
   format, type, pixels);
  /* Here GL_INVALID_OPERATION is an
   * expected GL error
   */
  pass = piglit_check_gl_error(
 GL_INVALID_OPERATION)
 && pass;
  continue;
  }


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


Re: [Piglit] [PATCH 50/50] general: add missing KHR_no_error status

2017-08-21 Thread Timothy Arceri



On 11/08/17 01:22, Samuel Pitoiset wrote:

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/general/draw-pixels.c   |  2 ++
  tests/general/geterror-inside-begin.c |  2 ++
  tests/general/geterror-invalid-enum.c |  2 ++
  tests/general/masked-clear.c  |  1 +
  tests/general/roundmode-pixelstore.c  | 10 +++---
  tests/general/select.c|  2 ++
  tests/general/tex-errors.c|  2 ++
  tests/general/texunits.c  | 24 ++--
  8 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/tests/general/draw-pixels.c b/tests/general/draw-pixels.c
index 65f512266..a6c06c4d9 100644
--- a/tests/general/draw-pixels.c
+++ b/tests/general/draw-pixels.c
@@ -57,6 +57,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
  
+	config.khr_no_error_support = PIGLIT_HAS_ERRORS;


I think you should just add a !piglit_khr_no_error to the 
is_format_type_mismatch(format, type) test rather than skipping the 
whole thing.


With that 46-50 are:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 45/50] gl-3.0: set KHR_no_error status

2017-08-21 Thread Timothy Arceri

You seem to have skipped over 2.1

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 43/50] arb_vertex_attrib_64bit: set KHR_no_error status

2017-08-21 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 44/50] gl-2.0: set KHR_no_error status

2017-08-21 Thread Timothy Arceri



On 11/08/17 01:22, Samuel Pitoiset wrote:

Signed-off-by: Samuel Pitoiset 
---
  tests/spec/gl-2.0/api/active-sampler-conflict.c |  1 +
  tests/spec/gl-2.0/api/clip-flag-behavior.c  | 33 ++---


You missed:

getattriblocation-conventional.c
attrib-assignments.c

There are also some more that need to be updated in the parent dir:

tests/spec/gl-2.0/




  2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/tests/spec/gl-2.0/api/active-sampler-conflict.c 
b/tests/spec/gl-2.0/api/active-sampler-conflict.c
index 74aed3689..848122ace 100644
--- a/tests/spec/gl-2.0/api/active-sampler-conflict.c
+++ b/tests/spec/gl-2.0/api/active-sampler-conflict.c
@@ -61,6 +61,7 @@
  PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 20;

+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/gl-2.0/api/clip-flag-behavior.c b/tests/spec/gl-2.0/api/clip-flag-behavior.c

index 25d7b4efd..c0e031e97 100644
--- a/tests/spec/gl-2.0/api/clip-flag-behavior.c
+++ b/tests/spec/gl-2.0/api/clip-flag-behavior.c
@@ -42,6 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 10;

config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
@@ -146,25 +147,27 @@ piglit_init(int argc, char **argv)

pass = check_enable_state(enum_name, enum_value, false) && pass;
}
  
-	/* Check behavior of GL_CLIP_PLANE0 + n where n == max_clip_planes */

-   enum_value = GL_CLIP_PLANE0 + max_clip_planes;
-   sprintf(enum_name, "GL_CLIP_PLANE0 + %d", max_clip_planes);
+   if (!piglit_khr_no_error) {
+   /* Check behavior of GL_CLIP_PLANE0 + n where n == 
max_clip_planes */
+   enum_value = GL_CLIP_PLANE0 + max_clip_planes;
+   sprintf(enum_name, "GL_CLIP_PLANE0 + %d", max_clip_planes);
  
-	printf("Trying glIsEnabled(%s): ", enum_name);

-   b = glIsEnabled(enum_value);
-   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass;
+   printf("Trying glIsEnabled(%s): ", enum_name);
+   b = glIsEnabled(enum_value);
+   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && 
pass;
  
-	printf("Trying glGetBooleanv(%s): ", enum_name);

-   glGetBooleanv(enum_value, );
-   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass;
+   printf("Trying glGetBooleanv(%s): ", enum_name);
+   glGetBooleanv(enum_value, );
+   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && 
pass;
  
-	printf("Trying glEnable(%s): ", enum_name);

-   glEnable(enum_value);
-   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass;
+   printf("Trying glEnable(%s): ", enum_name);
+   glEnable(enum_value);
+   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && 
pass;
  
-	printf("Trying glDisable(%s): ", enum_name);

-   glDisable(enum_value);
-   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && pass;
+   printf("Trying glDisable(%s): ", enum_name);
+   glDisable(enum_value);
+   pass = piglit_check_gl_error(GL_INVALID_ENUM) && print_ok() && 
pass;
+   }
  
  	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);

  }


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


Re: [Piglit] [PATCH 42/50] arb_texture_view: set KHR_no_error status

2017-08-21 Thread Timothy Arceri
L_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 31;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/rendering_levels.c b/tests/spec/arb_texture_view/rendering_levels.c

index 728e89af2..5f2208eb4 100644
--- a/tests/spec/arb_texture_view/rendering_levels.c
+++ b/tests/spec/arb_texture_view/rendering_levels.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 31;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c b/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c

index e6b49d164..1c219cc98 100644
--- a/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c
+++ b/tests/spec/arb_texture_view/sampling-2d-array-as-2d-layer.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 30;
config.supports_gl_es_version = 31;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c

index 6d7574c24..07e16d202 100644
--- a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c
+++ b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 30;
config.supports_gl_es_version = 31;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c

index fbfe99ab6..a7f02b5e0 100644
--- a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c
+++ b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 30;
config.supports_gl_es_version = 31;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/targets.c b/tests/spec/arb_texture_view/targets.c

index 2dc4c3e9a..03fec72ea 100644
--- a/tests/spec/arb_texture_view/targets.c
+++ b/tests/spec/arb_texture_view/targets.c
@@ -44,6 +44,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 31;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;


Here too it probably wouldn't hurt to do:

 if (!piglit_khr_no_error)
/* ensure TextureView  of illegal targets returns an error */
pass = pass && check_target_array(GL_INVALID_OPERATION,
  numIllegalTargets,
  illegalTargets,
  GL_RG16, tex, levels);
 }

Just to make sure the valid targets don't hit any segfaults or something 
nasty like that.


With those two changes 34-42 are:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/texsubimage-layers.c b/tests/spec/arb_texture_view/texsubimage-layers.c

index b1601be92..e7304e387 100644
--- a/tests/spec/arb_texture_view/texsubimage-layers.c
+++ b/tests/spec/arb_texture_view/texsubimage-layers.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 30;

config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/texsubimage-levels.c b/tests/spec/arb_texture_view/texsubimage-levels.c

index 7bbaf7f8b..d98640924 100644
--- a/tests/spec/arb_texture_view/texsubimage-levels.c
+++ b/tests/spec/arb_texture_view/texsubimage-levels.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 15;

config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_texture_view/texture-immutable-levels.c b/tests/spec/arb_texture_view/texture-immutable-levels.c

index 7ce7924fb..670d43c8b 100644
--- a/tests/spec/arb_texture_view/texture-immutable-levels.c
+++ b/tests/spec/arb_texture_view/texture-immutable-levels.c
@@ -42,6 +42,7 @@ PIGLIT_GL_TES

Re: [Piglit] [PATCH 33/50] arb_occlusion_query2: set KHR_no_error status

2017-08-21 Thread Timothy Arceri



On 11/08/17 01:22, Samuel Pitoiset wrote:

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/spec/arb_occlusion_query2/api.c| 34 +---
  tests/spec/arb_occlusion_query2/render.c |  1 +
  2 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/tests/spec/arb_occlusion_query2/api.c 
b/tests/spec/arb_occlusion_query2/api.c
index 429b6b3f8..2ba6877a3 100644
--- a/tests/spec/arb_occlusion_query2/api.c
+++ b/tests/spec/arb_occlusion_query2/api.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = (PIGLIT_GL_VISUAL_RGB |
PIGLIT_GL_VISUAL_DOUBLE |
PIGLIT_GL_VISUAL_DEPTH);
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
@@ -52,10 +53,14 @@ test_error_begin_while_other_active(void)

glBeginQuery(GL_SAMPLES_PASSED, oq[0]);
if (!piglit_check_gl_error(0))
pass = false;
-   glBeginQuery(GL_ANY_SAMPLES_PASSED, oq[1]);
-   if (!piglit_check_gl_error(GL_INVALID_OPERATION))
-   pass = false;
-   glEndQuery(GL_ANY_SAMPLES_PASSED);
+
+   if (!piglit_khr_no_error) {
+   glBeginQuery(GL_ANY_SAMPLES_PASSED, oq[1]);
+   if (!piglit_check_gl_error(GL_INVALID_OPERATION))
+   pass = false;
+   glEndQuery(GL_ANY_SAMPLES_PASSED);
+   }
+


You can drop this change.


glEndQuery(GL_SAMPLES_PASSED);
piglit_reset_gl_error();
  
@@ -66,10 +71,14 @@ test_error_begin_while_other_active(void)

glBeginQuery(GL_ANY_SAMPLES_PASSED, oq[0]);
if (!piglit_check_gl_error(0))
pass = false;
-   glBeginQuery(GL_SAMPLES_PASSED, oq[1]);
-   if (!piglit_check_gl_error(GL_INVALID_OPERATION))
-   pass = false;
-   glEndQuery(GL_SAMPLES_PASSED);
+
+   if (!piglit_khr_no_error) {
+   glBeginQuery(GL_SAMPLES_PASSED, oq[1]);
+   if (!piglit_check_gl_error(GL_INVALID_OPERATION))
+   pass = false;
+   glEndQuery(GL_SAMPLES_PASSED);
+   }
+


And this change.


glEndQuery(GL_ANY_SAMPLES_PASSED);
piglit_reset_gl_error();
  
@@ -269,9 +278,12 @@ piglit_display(void)
  
  	pass = test_counter_bits() && pass;

pass = test_current_query() && pass;
-   pass = test_error_begin_wrong_target() && pass;
-   pass = test_error_end_wrong_target() && pass;
-   pass = test_error_begin_while_other_active() && pass;
+
+   if (!piglit_khr_no_error) {
+   pass = test_error_begin_wrong_target() && pass;
+   pass = test_error_end_wrong_target() && pass;
+   pass = test_error_begin_while_other_active() && pass;


Because you are skipping calling the function here.

With that change:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>


+   }
  
  	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
  
diff --git a/tests/spec/arb_occlusion_query2/render.c b/tests/spec/arb_occlusion_query2/render.c

index 2d593fbfe..14eabdd44 100644
--- a/tests/spec/arb_occlusion_query2/render.c
+++ b/tests/spec/arb_occlusion_query2/render.c
@@ -33,6 +33,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 10;

config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE | 
PIGLIT_GL_VISUAL_DEPTH;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  


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


Re: [Piglit] [PATCH 32/50] arb_internalformat_query2: set KHR_no_error status

2017-08-21 Thread Timothy Arceri

31-32:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] glsl-es-1.00: constant initializer type mismatch causes an error

2017-08-15 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

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


Re: [Piglit] [PATCH 30/50] arb_framebuffer_no_attachments: set KHR_no_error status

2017-08-14 Thread Timothy Arceri

22-30:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 21/50] arb_timer_query: set KHR_no_error status

2017-08-14 Thread Timothy Arceri

16-21:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 15/50] arb_transform_feedback_overflow_query: set KHR_no_error status

2017-08-11 Thread Timothy Arceri

11-15:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 10/50] ext_texture_format_bgra8888: set KHR_no_error status

2017-08-10 Thread Timothy Arceri

1-10:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] arb_bindless_texture: add a test which sets mixed texture units/handles

2017-08-07 Thread Timothy Arceri

On 26/07/17 05:31, Samuel Pitoiset wrote:

This test currently fails to return the correct 64-bit handle value
with Mesa. This is because it ends up by performing the slower


^-- remove this :)

Otherwise:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>


convert-and-copy process instead of just memcpy'ing the value.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/spec/arb_bindless_texture/uniform.c | 89 +++
  1 file changed, 89 insertions(+)

diff --git a/tests/spec/arb_bindless_texture/uniform.c 
b/tests/spec/arb_bindless_texture/uniform.c
index 393b1dab5..aa3e0ec81 100644
--- a/tests/spec/arb_bindless_texture/uniform.c
+++ b/tests/spec/arb_bindless_texture/uniform.c
@@ -27,6 +27,8 @@
   * glUniformHandleui*64ARB(), glGetActiveUniform(), etc.
   */
  
+#include 

+
  #include "common.h"
  
  static struct piglit_gl_test_config *piglit_config;

@@ -355,6 +357,87 @@ check_Uniform_with_implicit_bound_image(void *data)
return PIGLIT_PASS;
  }
  
+static bool

+check_uniform_int(GLuint prog, int loc, int expect)
+{
+int v = 0xdeadcafe;
+
+glGetUniformiv(prog, loc, );
+if (v != expect) {
+fprintf(stderr, "Invalid value for uniform %d\n"
+"   Expected: %d\n"
+"   Observed: %d\n",
+loc, expect, v);
+return false;
+}
+return piglit_check_gl_error(GL_NO_ERROR);
+}
+
+static bool
+check_uniform_handle(GLuint prog, int loc, GLuint64 expect)
+{
+GLuint64 v = 0xdeadcafedeadcafe;
+
+glGetUniformui64vARB(prog, loc, );
+if (v != expect) {
+fprintf(stderr, "Invalid value for uniform %d\n"
+"   Expected: %"PRIx64"\n"
+"   Observed: %"PRIx64"\n",
+loc, expect, v);
+return false;
+}
+return piglit_check_gl_error(GL_NO_ERROR);
+}
+
+static enum piglit_result
+check_Uniform_with_texture_units_and_handles(void *data)
+{
+   const char *fs_src =
+   "#version 330\n"
+   "#extension GL_ARB_bindless_texture: require\n"
+   "\n"
+   "layout (bindless_sampler) uniform sampler2D texs[5];\n"
+   "uniform int i;\n"
+   "out vec4 color;\n"
+   "\n"
+   "void main()\n"
+   "{\n"
+   "  color = texture(texs[i], vec2(0, 0));\n"
+   "}\n";
+   int units[5] = { 4, 7, 8, 1, 5 };
+   GLuint64 handle = 0x1004002010040020;
+   GLuint vs, fs, prog;
+   bool pass = true;
+   GLint loc;
+
+   vs = piglit_compile_shader_text(GL_VERTEX_SHADER, passthrough_vs_src);
+   fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_src);
+   prog = piglit_link_simple_program(vs, fs);
+   glUseProgram(prog);
+
+   loc = glGetUniformLocation(prog, "texs");
+   if (loc == -1)
+   return PIGLIT_FAIL;
+
+   /* Check setting an array of texture units. */
+   glUniform1iv(loc, 5, units);
+
+   for (int i = 0; i < 5; i++) {
+   pass &= check_uniform_int(prog, loc + i, units[i]);
+   }
+
+   /* Check setting a texture handle. */
+   glUniformHandleui64ARB(loc, handle);
+   pass &= check_uniform_handle(prog, loc, handle);
+
+   /* Make sure setting the handle didn't overwrite other values. */
+   for (int i = 1; i < 5; i++) {
+   pass &= check_uniform_int(prog, loc + i, units[i]);
+   }
+
+   return pass ? PIGLIT_PASS : PIGLIT_FAIL;
+}
+
  static enum piglit_result
  use_glGetActiveUniform_with_sampler(void *data)
  {
@@ -464,6 +547,12 @@ static const struct piglit_subtest subtests[] = {
NULL
},
{
+   "Check glUniform*() with mixed texture units/handles",
+   "check_Uniform_with_texture_units_and_handles",
+   check_Uniform_with_texture_units_and_handles,
+   NULL
+   },
+   {
"Use glGetActiveUniform with a sampler type",
"use_glGetActiveUniform_with_sampler",
use_glGetActiveUniform_with_sampler,


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


Re: [Piglit] [PATCH] registry: update gl.xml

2017-08-06 Thread Timothy Arceri

Thanks.

Acked-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCHi V2] ext_memory_object: add some basic api error checks

2017-08-05 Thread Timothy Arceri
This only tests for errors when  is 0, but its a start.

v2:
 - make use of piglit_check_gl_error()
 - shorten spec quote

Cc: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---

 Please note the patch to update gl.xml was too big for the list
 so I just went ahead and pushed it.

 tests/all.py   |   6 +
 tests/spec/CMakeLists.txt  |   1 +
 tests/spec/ext_memory_object/CMakeLists.gl.txt |  14 ++
 tests/spec/ext_memory_object/CMakeLists.txt|   1 +
 tests/spec/ext_memory_object/api-errors.c  | 235 +
 5 files changed, 257 insertions(+)
 create mode 100644 tests/spec/ext_memory_object/CMakeLists.gl.txt
 create mode 100644 tests/spec/ext_memory_object/CMakeLists.txt
 create mode 100644 tests/spec/ext_memory_object/api-errors.c

diff --git a/tests/all.py b/tests/all.py
index 177957b0b..521a0fc50 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2361,20 +2361,26 @@ with profile.test_list.group_manager(
 g(['khr_debug-push-pop-group_gles2'], 'push-pop-group_gles2')
 g(['khr_debug-push-pop-group_gles3'], 'push-pop-group_gles3')
 
 # Group ARB_occlusion_query2
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ARB_occlusion_query2')) as g:
 g(['arb_occlusion_query2-api'], 'api')
 g(['arb_occlusion_query2-render'], 'render')
 
+# Group EXT_memory_object tests
+with profile.test_list.group_manager(
+PiglitGLTest,
+grouptools.join('spec', 'EXT_memory_object')) as g:
+g(['ext_memory_object-api-errors'], 'api-errors')
+
 # Group EXT_texture_format_BGRA tests
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'EXT_texture_format_BGRA')) as g:
 g(['ext_texture_format_bgra-api-errors'], 'api-errors')
 
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ARB_pixel_buffer_object')) as g:
 g(['cubemap', 'pbo'])
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index fea256163..28d2bb26e 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -78,20 +78,21 @@ add_subdirectory (arb_timer_query)
 add_subdirectory (arb_transform_feedback2)
 add_subdirectory (arb_transform_feedback3)
 add_subdirectory (arb_transform_feedback_overflow_query)
 add_subdirectory (arb_viewport_array)
 add_subdirectory (ati_envmap_bumpmap)
 add_subdirectory (ext_depth_bounds_test)
 add_subdirectory (ext_frag_depth)
 add_subdirectory (ext_fog_coord)
 add_subdirectory (ext_framebuffer_multisample)
 add_subdirectory (ext_framebuffer_multisample_blit_scaled)
+add_subdirectory (ext_memory_object)
 add_subdirectory (ext_packed_depth_stencil)
 add_subdirectory (ext_packed_float)
 add_subdirectory (ext_shader_samples_identical)
 add_subdirectory (ext_texture_swizzle)
 add_subdirectory (ext_timer_query)
 add_subdirectory (ext_transform_feedback)
 add_subdirectory (nv_conditional_render)
 add_subdirectory (nv_fill_rectangle)
 add_subdirectory (nv_image_formats)
 add_subdirectory (nv_texture_barrier)
diff --git a/tests/spec/ext_memory_object/CMakeLists.gl.txt 
b/tests/spec/ext_memory_object/CMakeLists.gl.txt
new file mode 100644
index 0..3a714e6af
--- /dev/null
+++ b/tests/spec/ext_memory_object/CMakeLists.gl.txt
@@ -0,0 +1,14 @@
+include_directories(
+   ${GLEXT_INCLUDE_DIR}
+   ${OPENGL_INCLUDE_PATH}
+)
+
+link_libraries (
+   piglitutil_${piglit_target_api}
+   ${OPENGL_gl_LIBRARY}
+)
+
+piglit_add_executable (ext_memory_object-api-errors api-errors.c)
+
+
+# vim: ft=cmake:
diff --git a/tests/spec/ext_memory_object/CMakeLists.txt 
b/tests/spec/ext_memory_object/CMakeLists.txt
new file mode 100644
index 0..144a306f4
--- /dev/null
+++ b/tests/spec/ext_memory_object/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/ext_memory_object/api-errors.c 
b/tests/spec/ext_memory_object/api-errors.c
new file mode 100644
index 0..df413c5ed
--- /dev/null
+++ b/tests/spec/ext_memory_object/api-errors.c
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2017 Timothy Arceri
+ *
+ * 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 PURPOS

Re: [Piglit] [PATCH 2/2] ext_memory_object: add some basic api error checks

2017-08-04 Thread Timothy Arceri

On 04/08/17 18:56, Samuel Pitoiset wrote:

1/2 got lost?


Yeah its in moderation (to big).

See https://github.com/tarceri/Piglit/compare/memobj



On 08/04/2017 03:43 AM, Timothy Arceri wrote:

This only tests for errors when  is 0, but its a start.
---
  tests/all.py   |   6 +
  tests/spec/CMakeLists.txt  |   1 +
  tests/spec/ext_memory_object/CMakeLists.gl.txt |  14 ++
  tests/spec/ext_memory_object/CMakeLists.txt|   1 +
  tests/spec/ext_memory_object/api-errors.c  | 241 
+

  5 files changed, 263 insertions(+)
  create mode 100644 tests/spec/ext_memory_object/CMakeLists.gl.txt
  create mode 100644 tests/spec/ext_memory_object/CMakeLists.txt
  create mode 100644 tests/spec/ext_memory_object/api-errors.c

diff --git a/tests/all.py b/tests/all.py
index 177957b0b..521a0fc50 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2361,20 +2361,26 @@ with profile.test_list.group_manager(
  g(['khr_debug-push-pop-group_gles2'], 'push-pop-group_gles2')
  g(['khr_debug-push-pop-group_gles3'], 'push-pop-group_gles3')
  # Group ARB_occlusion_query2
  with profile.test_list.group_manager(
  PiglitGLTest,
  grouptools.join('spec', 'ARB_occlusion_query2')) as g:
  g(['arb_occlusion_query2-api'], 'api')
  g(['arb_occlusion_query2-render'], 'render')
+# Group EXT_memory_object tests
+with profile.test_list.group_manager(
+PiglitGLTest,
+grouptools.join('spec', 'EXT_memory_object')) as g:
+g(['ext_memory_object-api-errors'], 'api-errors')
+
  # Group EXT_texture_format_BGRA tests
  with profile.test_list.group_manager(
  PiglitGLTest,
  grouptools.join('spec', 'EXT_texture_format_BGRA')) as g:
  g(['ext_texture_format_bgra-api-errors'], 'api-errors')
  with profile.test_list.group_manager(
  PiglitGLTest,
  grouptools.join('spec', 'ARB_pixel_buffer_object')) as g:
  g(['cubemap', 'pbo'])
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index fea256163..28d2bb26e 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -78,20 +78,21 @@ add_subdirectory (arb_timer_query)
  add_subdirectory (arb_transform_feedback2)
  add_subdirectory (arb_transform_feedback3)
  add_subdirectory (arb_transform_feedback_overflow_query)
  add_subdirectory (arb_viewport_array)
  add_subdirectory (ati_envmap_bumpmap)
  add_subdirectory (ext_depth_bounds_test)
  add_subdirectory (ext_frag_depth)
  add_subdirectory (ext_fog_coord)
  add_subdirectory (ext_framebuffer_multisample)
  add_subdirectory (ext_framebuffer_multisample_blit_scaled)
+add_subdirectory (ext_memory_object)
  add_subdirectory (ext_packed_depth_stencil)
  add_subdirectory (ext_packed_float)
  add_subdirectory (ext_shader_samples_identical)
  add_subdirectory (ext_texture_swizzle)
  add_subdirectory (ext_timer_query)
  add_subdirectory (ext_transform_feedback)
  add_subdirectory (nv_conditional_render)
  add_subdirectory (nv_fill_rectangle)
  add_subdirectory (nv_image_formats)
  add_subdirectory (nv_texture_barrier)
diff --git a/tests/spec/ext_memory_object/CMakeLists.gl.txt 
b/tests/spec/ext_memory_object/CMakeLists.gl.txt

new file mode 100644
index 0..3a714e6af
--- /dev/null
+++ b/tests/spec/ext_memory_object/CMakeLists.gl.txt
@@ -0,0 +1,14 @@
+include_directories(
+${GLEXT_INCLUDE_DIR}
+${OPENGL_INCLUDE_PATH}
+)
+
+link_libraries (
+piglitutil_${piglit_target_api}
+${OPENGL_gl_LIBRARY}
+)
+
+piglit_add_executable (ext_memory_object-api-errors api-errors.c)
+
+
+# vim: ft=cmake:
diff --git a/tests/spec/ext_memory_object/CMakeLists.txt 
b/tests/spec/ext_memory_object/CMakeLists.txt

new file mode 100644
index 0..144a306f4
--- /dev/null
+++ b/tests/spec/ext_memory_object/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/ext_memory_object/api-errors.c 
b/tests/spec/ext_memory_object/api-errors.c

new file mode 100644
index 0..58694b9fa
--- /dev/null
+++ b/tests/spec/ext_memory_object/api-errors.c
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2017 Timothy Arceri
+ *
+ * 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 

Re: [Piglit] RFC [PATCH] shader: Test to check conditional component access in loops

2017-08-03 Thread Timothy Arceri



On 04/08/17 00:15, Gert Wollny wrote:

Hi Brian,

thanks for the comments.





+u.z = 0.0;
+} while (a <= n);


Does the body of the loop need to be that complicated?


The test must achieve two things: On one hand, at least one component
of a temporary register must be written first at the beginning of the
loop, and another component conditionally later, but not every time.

Then the code must be complicated enough so that temporary registers
could be merged and that the optimizer doesn't simplify the code too
much before the merge step.

Specifically, the test should fail if the register is not tracked
component wise in the register merge step, and it actually took me some
time to achieve this.

I could add some comments to clarify this.


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


[Piglit] [PATCH 2/2] ext_memory_object: add some basic api error checks

2017-08-03 Thread Timothy Arceri
This only tests for errors when  is 0, but its a start.
---
 tests/all.py   |   6 +
 tests/spec/CMakeLists.txt  |   1 +
 tests/spec/ext_memory_object/CMakeLists.gl.txt |  14 ++
 tests/spec/ext_memory_object/CMakeLists.txt|   1 +
 tests/spec/ext_memory_object/api-errors.c  | 241 +
 5 files changed, 263 insertions(+)
 create mode 100644 tests/spec/ext_memory_object/CMakeLists.gl.txt
 create mode 100644 tests/spec/ext_memory_object/CMakeLists.txt
 create mode 100644 tests/spec/ext_memory_object/api-errors.c

diff --git a/tests/all.py b/tests/all.py
index 177957b0b..521a0fc50 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2361,20 +2361,26 @@ with profile.test_list.group_manager(
 g(['khr_debug-push-pop-group_gles2'], 'push-pop-group_gles2')
 g(['khr_debug-push-pop-group_gles3'], 'push-pop-group_gles3')
 
 # Group ARB_occlusion_query2
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ARB_occlusion_query2')) as g:
 g(['arb_occlusion_query2-api'], 'api')
 g(['arb_occlusion_query2-render'], 'render')
 
+# Group EXT_memory_object tests
+with profile.test_list.group_manager(
+PiglitGLTest,
+grouptools.join('spec', 'EXT_memory_object')) as g:
+g(['ext_memory_object-api-errors'], 'api-errors')
+
 # Group EXT_texture_format_BGRA tests
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'EXT_texture_format_BGRA')) as g:
 g(['ext_texture_format_bgra-api-errors'], 'api-errors')
 
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ARB_pixel_buffer_object')) as g:
 g(['cubemap', 'pbo'])
diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
index fea256163..28d2bb26e 100644
--- a/tests/spec/CMakeLists.txt
+++ b/tests/spec/CMakeLists.txt
@@ -78,20 +78,21 @@ add_subdirectory (arb_timer_query)
 add_subdirectory (arb_transform_feedback2)
 add_subdirectory (arb_transform_feedback3)
 add_subdirectory (arb_transform_feedback_overflow_query)
 add_subdirectory (arb_viewport_array)
 add_subdirectory (ati_envmap_bumpmap)
 add_subdirectory (ext_depth_bounds_test)
 add_subdirectory (ext_frag_depth)
 add_subdirectory (ext_fog_coord)
 add_subdirectory (ext_framebuffer_multisample)
 add_subdirectory (ext_framebuffer_multisample_blit_scaled)
+add_subdirectory (ext_memory_object)
 add_subdirectory (ext_packed_depth_stencil)
 add_subdirectory (ext_packed_float)
 add_subdirectory (ext_shader_samples_identical)
 add_subdirectory (ext_texture_swizzle)
 add_subdirectory (ext_timer_query)
 add_subdirectory (ext_transform_feedback)
 add_subdirectory (nv_conditional_render)
 add_subdirectory (nv_fill_rectangle)
 add_subdirectory (nv_image_formats)
 add_subdirectory (nv_texture_barrier)
diff --git a/tests/spec/ext_memory_object/CMakeLists.gl.txt 
b/tests/spec/ext_memory_object/CMakeLists.gl.txt
new file mode 100644
index 0..3a714e6af
--- /dev/null
+++ b/tests/spec/ext_memory_object/CMakeLists.gl.txt
@@ -0,0 +1,14 @@
+include_directories(
+   ${GLEXT_INCLUDE_DIR}
+   ${OPENGL_INCLUDE_PATH}
+)
+
+link_libraries (
+   piglitutil_${piglit_target_api}
+   ${OPENGL_gl_LIBRARY}
+)
+
+piglit_add_executable (ext_memory_object-api-errors api-errors.c)
+
+
+# vim: ft=cmake:
diff --git a/tests/spec/ext_memory_object/CMakeLists.txt 
b/tests/spec/ext_memory_object/CMakeLists.txt
new file mode 100644
index 0..144a306f4
--- /dev/null
+++ b/tests/spec/ext_memory_object/CMakeLists.txt
@@ -0,0 +1 @@
+piglit_include_target_api()
diff --git a/tests/spec/ext_memory_object/api-errors.c 
b/tests/spec/ext_memory_object/api-errors.c
new file mode 100644
index 0..58694b9fa
--- /dev/null
+++ b/tests/spec/ext_memory_object/api-errors.c
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2017 Timothy Arceri
+ *
+ * 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 VMWARE 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 

Re: [Piglit] [PATCH] egl: Add test for EGL_KHR_create_context_no_error

2017-08-03 Thread Timothy Arceri

On 03/08/17 20:48, Emil Velikov wrote:

On 3 August 2017 at 01:10, Timothy Arceri <tarc...@itsqueeze.com> wrote:

One thing that is missing is a check that an error is generated (or the
context is created successfully) when a shared context is created. Depending
on whether the no error attributes match.

I've got a partial Mesa implementation for the GLX version, so I'm keen to
port this test to GLX.


Heh, funny enough - I have a slightly more complete one locally. I
polish and send it to the list.


No problem. I guess you can port the piglit test too :P



-Emil


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


Re: [Piglit] [PATCH] egl: Add test for EGL_KHR_create_context_no_error

2017-08-02 Thread Timothy Arceri
One thing that is missing is a check that an error is generated (or the 
context is created successfully) when a shared context is created. 
Depending on whether the no error attributes match.


I've got a partial Mesa implementation for the GLX version, so I'm keen 
to port this test to GLX.


[1] https://github.com/tarceri/Mesa/compare/no_error

On 20/07/17 07:41, Grigori Goronzy wrote:

This test verifies context creation with the
EGL_KHR_create_context_no_error extension, which includes interaction
with debug and robustness flags. The test also verifies that the
KHR_no_error mode is successfully enabled with a check of context
flags and glGetError() behavior.

Both GL 2.0 and GLES2 are tested.
---
  tests/all.py   |   2 +
  .../egl_khr_create_context/CMakeLists.gles2.txt|   3 +
  tests/egl/spec/egl_khr_create_context/no-error.c   | 216 +
  3 files changed, 221 insertions(+)
  create mode 100644 tests/egl/spec/egl_khr_create_context/no-error.c

diff --git a/tests/all.py b/tests/all.py
index 4d19da1..4495c90 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4608,6 +4608,8 @@ with profile.test_list.group_manager(
run_concurrent=False)
  g(['egl-create-context-valid-flag-debug-gl', 'gl'], 'valid debug flag GL',
run_concurrent=False)
+g(['egl-create-context-no-error'], 'KHR_no_error enable',
+  run_concurrent=False)
  
  for api in ('gles1', 'gles2', 'gles3'):

  g(['egl-create-context-valid-flag-debug-gles', api],
diff --git a/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt 
b/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt
index 23bf145..a27ef2d 100644
--- a/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt
+++ b/tests/egl/spec/egl_khr_create_context/CMakeLists.gles2.txt
@@ -19,4 +19,7 @@ piglit_add_executable (egl-create-context-invalid-gl-version 
invalid-gl-version.
  piglit_add_executable (egl-create-context-verify-gl-flavor verify-gl-flavor.c 
common.c)
  piglit_add_executable (egl-create-context-valid-flag-debug-gles 
valid-flag-debug.c common.c)
  
+# Tests that use ES 2 and Desktop GL.

+piglit_add_executable (egl-create-context-no-error no-error.c common.c)
+
  # vim: ft=cmake:
diff --git a/tests/egl/spec/egl_khr_create_context/no-error.c 
b/tests/egl/spec/egl_khr_create_context/no-error.c
new file mode 100644
index 000..652c794
--- /dev/null
+++ b/tests/egl/spec/egl_khr_create_context/no-error.c
@@ -0,0 +1,216 @@
+/* Copyright 2017 Grigori Goronzy 
+ *
+ * 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.
+ */
+
+#include 
+#include 
+
+#include "piglit-util-gl.h"
+#include "piglit-util-egl.h"
+#include "common.h"
+
+#define BOOLSTR(x) ((x) ? "yes" : "no")
+
+static void
+fold_results(enum piglit_result *a, enum piglit_result b)
+{
+if (*a == PIGLIT_FAIL || b == PIGLIT_FAIL)
+*a = PIGLIT_FAIL;
+else if (*a == PIGLIT_PASS || b == PIGLIT_PASS)
+*a = PIGLIT_PASS;
+else
+*a = PIGLIT_SKIP;
+}
+
+static void
+check_extension(EGLint mask)
+{
+if (!EGL_KHR_create_context_setup(mask))
+piglit_report_result(PIGLIT_SKIP);
+
+piglit_require_egl_extension(egl_dpy, "EGL_KHR_create_context_no_error");
+
+EGL_KHR_create_context_teardown();
+}
+
+static enum piglit_result
+check_no_error(EGLenum api, bool no_error, bool debug, bool robust)
+{
+   static bool is_dispatch_init = false;
+enum piglit_result pass = PIGLIT_SKIP;
+EGLContext ctx;
+EGLint attribs[11];
+size_t ai = 0;
+GLint context_flags = 0;
+EGLint mask = (api == EGL_OPENGL_API) ? EGL_OPENGL_BIT : 
EGL_OPENGL_ES2_BIT;
+
+printf("info: %s no_error=%s debug=%s robustness=%s\n",
+   (api == EGL_OPENGL_API) ? "OpenGL" : "OpenGL ES",
+   BOOLSTR(no_error), BOOLSTR(debug), BOOLSTR(robust));
+
+if (!EGL_KHR_create_context_setup(mask))
+goto 

[Piglit] [PATCH] arb_arrays_of_arrays: test struct member offset calculation

2017-07-31 Thread Timothy Arceri
Simple test to make sure we calculate struct member offsets
correctly when the array contains an opaque member that maybe
not have any backing storage.

This triggers a recent regression in radeonsi.
---
 ...-struct-nonconst-non-opaque-members.shader_test | 68 ++
 1 file changed, 68 insertions(+)
 create mode 100644 
tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test

diff --git 
a/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test
 
b/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test
new file mode 100644
index 0..19538026e
--- /dev/null
+++ 
b/tests/spec/arb_arrays_of_arrays/execution/sampler/vs-struct-nonconst-non-opaque-members.shader_test
@@ -0,0 +1,68 @@
+# This test verifies that dynamically uniform indexing of sampler arrays
+# in the vertex shader behaves correctly, and the offests for the
+# non-opaque members are calculated correctly.
+
+[require]
+GLSL >= 1.50
+GL_ARB_arrays_of_arrays
+GL_ARB_gpu_shader5
+
+[vertex shader]
+#version 150
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_gpu_shader5: require
+
+struct S {
+   float a;
+   sampler2D tex;
+   float b;
+   float c;
+};
+
+uniform S s[2][2];
+
+uniform int n;
+uniform int m;
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+   gl_Position = piglit_vertex;
+   vec4 texcolor = texture(s[n][m].tex, vec2(0.75, 0.25));
+color = vec4(s[n][m].a, s[n][m].b, s[n][m].c, texcolor.x);
+}
+
+[fragment shader]
+#version 150
+#extension GL_ARB_gpu_shader5: require
+
+in vec4 color;
+out vec4 out_color;
+
+void main()
+{
+   out_color = color;
+}
+
+[test]
+clear color 0.2 0.2 0.2 0.2
+clear
+
+uniform int s[1][0].tex 3
+uniform float s[1][0].a 0.25
+uniform float s[1][0].b 0.5
+uniform float s[1][0].c 0.75
+
+
+texture checkerboard 3 0 (32, 32) (0.5, 0.0, 0.0, 0.0) (1.0, 0.0, 0.0, 0.0)
+texparameter 2D min nearest
+texparameter 2D mag nearest
+
+uniform int n 1
+uniform int m 0
+draw rect -1 -1 1 1
+
+relative probe rect rgba (0.0, 0.0, 0.5, 0.5) (0.25, 0.5, 0.75, 1.0)
+
-- 
2.13.3

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


Re: [Piglit] [PATCH 1/2] arb_shader_group_vote: Prefix tests with "cs-"

2017-07-20 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 21/07/17 09:54, Matt Turner wrote:

Going to add tests for other shader stages.
---
  tests/spec/arb_shader_group_vote/{all.shader_test => cs-all.shader_test} | 0
  tests/spec/arb_shader_group_vote/{any.shader_test => cs-any.shader_test} | 0
  tests/spec/arb_shader_group_vote/{eq.shader_test => cs-eq.shader_test}   | 0
  3 files changed, 0 insertions(+), 0 deletions(-)
  rename tests/spec/arb_shader_group_vote/{all.shader_test => 
cs-all.shader_test} (100%)
  rename tests/spec/arb_shader_group_vote/{any.shader_test => 
cs-any.shader_test} (100%)
  rename tests/spec/arb_shader_group_vote/{eq.shader_test => cs-eq.shader_test} 
(100%)

diff --git a/tests/spec/arb_shader_group_vote/all.shader_test 
b/tests/spec/arb_shader_group_vote/cs-all.shader_test
similarity index 100%
rename from tests/spec/arb_shader_group_vote/all.shader_test
rename to tests/spec/arb_shader_group_vote/cs-all.shader_test
diff --git a/tests/spec/arb_shader_group_vote/any.shader_test 
b/tests/spec/arb_shader_group_vote/cs-any.shader_test
similarity index 100%
rename from tests/spec/arb_shader_group_vote/any.shader_test
rename to tests/spec/arb_shader_group_vote/cs-any.shader_test
diff --git a/tests/spec/arb_shader_group_vote/eq.shader_test 
b/tests/spec/arb_shader_group_vote/cs-eq.shader_test
similarity index 100%
rename from tests/spec/arb_shader_group_vote/eq.shader_test
rename to tests/spec/arb_shader_group_vote/cs-eq.shader_test


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


Re: [Piglit] [PATCH 2/2] arb_shader_group_vote: Add simple vertex shader tests

2017-07-20 Thread Timothy Arceri
100644
index 0..549b158a8
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-eq-const.shader_test
@@ -0,0 +1,33 @@


# From the ARB_shader_group_vote spec:
#
#"The function allInvocationsEqualARB() returns true if  is
# the same for all active invocations in the group."
#


+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (allInvocationsEqualARB(true) && allInvocationsEqualARB(false))
+color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test 
b/tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test
new file mode 100644
index 0..f1b8d6de8
--- /dev/null
+++ b/tests/spec/arb_shader_group_vote/vs-eq-uniform.shader_test
@@ -0,0 +1,35 @@


# From the ARB_shader_group_vote spec:
#
#"The function allInvocationsEqualARB() returns true if  is
# the same for all active invocations in the group."
#


+[require]
+GL >= 3.2
+GLSL >= 1.50
+GL_ARB_shader_group_vote
+
+[vertex shader]
+#extension GL_ARB_shader_group_vote: enable
+
+uniform bool val;
+in vec4 piglit_vertex;
+out vec4 color;
+
+void main()
+{
+  gl_Position = piglit_vertex;
+
+  if (allInvocationsEqualARB(val) && allInvocationsEqualARB(!val))
+color = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+color = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[fragment shader]
+in vec4 color;
+out vec4 frag_color;
+
+void main()
+{
+  frag_color = color;
+}
+
+[test]
+uniform int val 1
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0



With the spec quotes above added this patch is:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] glsl-1.50: add linker test for unused in out blocks

2017-07-18 Thread Timothy Arceri

On 15/07/17 06:21, Józef Kucia wrote:

On Tue, May 30, 2017 at 4:23 PM, Józef Kucia  wrote:

This test exposes a Mesa GLSL linker bug. The test fails with the
following error message:

   error: Input block `blk' is not an output of the previous stage

Section 4.3.4 (Inputs) of the GLSL 1.50 spec says:

 "Only the input variables that are actually read need to be written
 by the previous stage; it is allowed to have superfluous
 declarations of input variables."
---
  .../interstage-multiple-shader-objects.shader_test | 38 ++
  1 file changed, 38 insertions(+)
  create mode 100644 
tests/spec/glsl-1.50/linker/interstage-multiple-shader-objects.shader_test


Ping. Could someone take a look?


I've push this patch. Thanks for the test :)


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


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


[Piglit] [PATCH] arb_texture_buffer_object: set KHR_no_error support

2017-07-05 Thread Timothy Arceri
Here we also move some of the config setup to the top of the
file as this is the layout of piglit tests everywhere else in
piglit.
---
 tests/spec/arb_texture_buffer_object/bufferstorage.c| 11 ++-
 tests/spec/arb_texture_buffer_object/data-sync.c|  1 +
 tests/spec/arb_texture_buffer_object/dlist.c|  1 +
 tests/spec/arb_texture_buffer_object/fetch-outside-bounds.c | 13 +++--
 tests/spec/arb_texture_buffer_object/formats.c  |  1 +
 tests/spec/arb_texture_buffer_object/get.c  |  1 +
 tests/spec/arb_texture_buffer_object/max-size.c | 11 ++-
 tests/spec/arb_texture_buffer_object/minmax.c   |  1 +
 tests/spec/arb_texture_buffer_object/negative-bad-bo.c  |  1 +
 tests/spec/arb_texture_buffer_object/negative-bad-format.c  |  1 +
 tests/spec/arb_texture_buffer_object/negative-bad-target.c  |  1 +
 tests/spec/arb_texture_buffer_object/negative-unsupported.c |  1 +
 tests/spec/arb_texture_buffer_object/render-no-bo.c | 13 +++--
 tests/spec/arb_texture_buffer_object/subdata-sync.c |  1 +
 tests/spec/arb_texture_buffer_object/unused-name.c  |  1 +
 15 files changed, 37 insertions(+), 22 deletions(-)

diff --git a/tests/spec/arb_texture_buffer_object/bufferstorage.c 
b/tests/spec/arb_texture_buffer_object/bufferstorage.c
index c46c70d..16e4dcd 100644
--- a/tests/spec/arb_texture_buffer_object/bufferstorage.c
+++ b/tests/spec/arb_texture_buffer_object/bufferstorage.c
@@ -27,6 +27,12 @@
 
 #include "piglit-util-gl.h"
 
+PIGLIT_GL_TEST_CONFIG_BEGIN
+   config.supports_gl_core_version = 31;
+   config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
+PIGLIT_GL_TEST_CONFIG_END
+
 static const float green[4] = {0, 1, 0, 0};
 static const float red[4] = {1, 0, 0, 0};
 static float *map;
@@ -138,8 +144,3 @@ piglit_init(int argc, char **argv)
  GL_FALSE, 0, NULL);
glEnableVertexAttribArray(vertex_location);
 }
-
-PIGLIT_GL_TEST_CONFIG_BEGIN
-   config.supports_gl_core_version = 31;
-   config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
-PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_texture_buffer_object/data-sync.c 
b/tests/spec/arb_texture_buffer_object/data-sync.c
index 5542734..511690d 100644
--- a/tests/spec/arb_texture_buffer_object/data-sync.c
+++ b/tests/spec/arb_texture_buffer_object/data-sync.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_core_version = 31;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 enum piglit_result
diff --git a/tests/spec/arb_texture_buffer_object/dlist.c 
b/tests/spec/arb_texture_buffer_object/dlist.c
index ea15f61..565dc24 100644
--- a/tests/spec/arb_texture_buffer_object/dlist.c
+++ b/tests/spec/arb_texture_buffer_object/dlist.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_buffer_object/fetch-outside-bounds.c 
b/tests/spec/arb_texture_buffer_object/fetch-outside-bounds.c
index c9aa6c4..c0e3976 100644
--- a/tests/spec/arb_texture_buffer_object/fetch-outside-bounds.c
+++ b/tests/spec/arb_texture_buffer_object/fetch-outside-bounds.c
@@ -39,6 +39,13 @@
 
 #include "piglit-util-gl.h"
 
+PIGLIT_GL_TEST_CONFIG_BEGIN
+   config.supports_gl_compat_version = 10;
+   config.supports_gl_core_version = 31;
+   config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
+PIGLIT_GL_TEST_CONFIG_END
+
 enum piglit_result
 piglit_display(void)
 {
@@ -113,9 +120,3 @@ piglit_init(int argc, char **argv)
if (piglit_get_gl_version() < 31)
piglit_require_extension("GL_ARB_texture_buffer_object");
 }
-
-PIGLIT_GL_TEST_CONFIG_BEGIN
-   config.supports_gl_compat_version = 10;
-   config.supports_gl_core_version = 31;
-   config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
-PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_texture_buffer_object/formats.c 
b/tests/spec/arb_texture_buffer_object/formats.c
index fad657d..f2960cd 100644
--- a/tests/spec/arb_texture_buffer_object/formats.c
+++ b/tests/spec/arb_texture_buffer_object/formats.c
@@ -719,4 +719,5 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 200;
config.window_height = 500;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
diff --git a/tests/spec/arb_texture_buffer_object/get.c 

[Piglit] [PATCH 8/8] ext_transform_feedback: set KHR_no_error status

2017-07-05 Thread Timothy Arceri
---
 tests/spec/ext_transform_feedback/alignment.c  | 1 +
 tests/spec/ext_transform_feedback/api-errors.c | 1 +
 tests/spec/ext_transform_feedback/buffer-usage.c   | 1 +
 tests/spec/ext_transform_feedback/builtin-varyings.c   | 1 +
 tests/spec/ext_transform_feedback/change-size.c| 1 +
 tests/spec/ext_transform_feedback/discard-api.c| 1 +
 tests/spec/ext_transform_feedback/discard-bitmap.c | 1 +
 tests/spec/ext_transform_feedback/discard-clear.c  | 1 +
 tests/spec/ext_transform_feedback/discard-copypixels.c | 1 +
 tests/spec/ext_transform_feedback/discard-drawpixels.c | 1 +
 tests/spec/ext_transform_feedback/generatemipmap.c | 1 +
 tests/spec/ext_transform_feedback/geometry-shaders-basic.c | 1 +
 tests/spec/ext_transform_feedback/get-buffer-state.c   | 1 +
 tests/spec/ext_transform_feedback/immediate-reuse-index-buffer.c   | 1 +
 tests/spec/ext_transform_feedback/immediate-reuse-uniform-buffer.c | 1 +
 tests/spec/ext_transform_feedback/immediate-reuse.c| 1 +
 tests/spec/ext_transform_feedback/intervening-read.c   | 1 +
 tests/spec/ext_transform_feedback/max-varyings.c   | 1 +
 tests/spec/ext_transform_feedback/negative-prims.c | 1 +
 tests/spec/ext_transform_feedback/nonflat-integral.c   | 1 +
 tests/spec/ext_transform_feedback/order.c  | 1 +
 tests/spec/ext_transform_feedback/overflow-edge-cases.c| 1 +
 tests/spec/ext_transform_feedback/pipeline-basic-primgen.c | 1 +
 tests/spec/ext_transform_feedback/primgen.c| 1 +
 tests/spec/ext_transform_feedback/structs.c| 1 +
 tests/spec/ext_transform_feedback/tessellation.c   | 1 +
 26 files changed, 26 insertions(+)

diff --git a/tests/spec/ext_transform_feedback/alignment.c 
b/tests/spec/ext_transform_feedback/alignment.c
index 6cf9e0e..0f03990 100644
--- a/tests/spec/ext_transform_feedback/alignment.c
+++ b/tests/spec/ext_transform_feedback/alignment.c
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/ext_transform_feedback/api-errors.c 
b/tests/spec/ext_transform_feedback/api-errors.c
index 3f277c9..0bbcd66 100644
--- a/tests/spec/ext_transform_feedback/api-errors.c
+++ b/tests/spec/ext_transform_feedback/api-errors.c
@@ -54,6 +54,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/ext_transform_feedback/buffer-usage.c 
b/tests/spec/ext_transform_feedback/buffer-usage.c
index 2596f29..d7fbe62 100644
--- a/tests/spec/ext_transform_feedback/buffer-usage.c
+++ b/tests/spec/ext_transform_feedback/buffer-usage.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/ext_transform_feedback/builtin-varyings.c 
b/tests/spec/ext_transform_feedback/builtin-varyings.c
index 026d557..34b091b 100644
--- a/tests/spec/ext_transform_feedback/builtin-varyings.c
+++ b/tests/spec/ext_transform_feedback/builtin-varyings.c
@@ -39,6 +39,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/ext_transform_feedback/change-size.c 
b/tests/spec/ext_transform_feedback/change-size.c
index 7378e5b..05682c7 100644
--- a/tests/spec/ext_transform_feedback/change-size.c
+++ b/tests/spec/ext_transform_feedback/change-size.c
@@ -83,6 +83,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/ext_transform_feedback/discard-api.c 
b/tests/spec/ext_transform_feedback/discard-api.c
index 5334c40..6a32bde 100644
--- a/tests/spec/ext_transform_feedback/discard-api.c
+++ b/tests/spec/ext_transform_feedback/discard-api.c
@@ -42,6 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   

[Piglit] [PATCH 7/8] texturing: set KHR_no_error status

2017-07-05 Thread Timothy Arceri
---
 tests/texturing/1-1-linear-texture.c|  1 +
 tests/texturing/array-depth-roundtrip.c |  1 +
 tests/texturing/array-texture.c |  1 +
 tests/texturing/copyteximage-border.c   |  1 +
 tests/texturing/copyteximage-clipping.c |  1 +
 tests/texturing/copytexsubimage.c   |  1 +
 tests/texturing/crossbar.c  |  1 +
 tests/texturing/cubemap-getteximage-pbo.c   |  1 +
 tests/texturing/cubemap-mismatch.c  |  1 +
 tests/texturing/cubemap-shader.c|  1 +
 tests/texturing/cubemap.c   |  1 +
 tests/texturing/depth-level-clamp.c |  1 +
 tests/texturing/depth-tex-compare.c |  1 +
 tests/texturing/depth-tex-modes-glsl.c  |  1 +
 tests/texturing/depth-tex-modes-rg.c|  1 +
 tests/texturing/depth-tex-modes.c   |  1 +
 tests/texturing/fragment-and-vertex-texturing.c |  1 +
 tests/texturing/fxt1-teximage.c |  1 +
 tests/texturing/gen-compressed-teximage.c   |  1 +
 tests/texturing/gen-nonzero-unit.c  |  1 +
 tests/texturing/gen-teximage.c  |  1 +
 tests/texturing/gen-texsubimage.c   |  1 +
 tests/texturing/generatemipmap-base-change.c|  1 +
 tests/texturing/generatemipmap-cubemap.c|  1 +
 tests/texturing/getteximage-depth.c |  1 +
 tests/texturing/getteximage-formats.c   |  1 +
 tests/texturing/getteximage-luminance.c |  1 +
 tests/texturing/getteximage-simple.c|  1 +
 tests/texturing/getteximage-targets.c   |  1 +
 tests/texturing/incomplete-cubemap.c|  1 +
 tests/texturing/incomplete-texture.c|  1 +
 tests/texturing/levelclamp.c|  1 +
 tests/texturing/lodbias.c   |  1 +
 tests/texturing/lodclamp-between-max.c  |  1 +
 tests/texturing/lodclamp-between.c  |  1 +
 tests/texturing/lodclamp.c  |  1 +
 tests/texturing/max-samplers.c  |  1 +
 tests/texturing/max-texture-size-level.c| 53 +
 tests/texturing/mipmap-setup.c  |  1 +
 tests/texturing/proxy-texture.c | 49 ---
 tests/texturing/rg-draw-pixels.c|  1 +
 tests/texturing/rg-teximage-01.c|  1 +
 tests/texturing/rg-teximage-02.c|  1 +
 tests/texturing/rgtc-teximage-01.c  |  1 +
 tests/texturing/rgtc-teximage-02.c  |  1 +
 tests/texturing/s3tc-errors.c   |  1 +
 tests/texturing/s3tc-targeted.c |  1 +
 tests/texturing/s3tc-teximage.c |  1 +
 tests/texturing/s3tc-texsubimage.c  |  1 +
 tests/texturing/sampler-cube-shadow.c   |  1 +
 tests/texturing/sized-texture-format-channels.c |  1 +
 tests/texturing/streaming-texture-leak.c|  1 +
 tests/texturing/tex-border-1.c  |  1 +
 tests/texturing/tex-miplevel-selection.c|  1 +
 tests/texturing/tex-srgb.c  |  1 +
 tests/texturing/tex3d-npot.c|  1 +
 tests/texturing/tex3d.c |  1 +
 tests/texturing/texdepth.c  |  1 +
 tests/texturing/texrect-many.c  |  1 +
 tests/texturing/texredefine.c   |  1 +
 tests/texturing/texsubimage-depth-formats.c |  1 +
 tests/texturing/texsubimage-unpack.c|  1 +
 tests/texturing/texture-al.c|  1 +
 tests/texturing/texture-packed-formats.c|  1 +
 tests/texturing/texture-rg.c|  1 +
 tests/texturing/texwrap.c   |  1 +
 tests/texturing/zero-tex-coord.c|  1 +
 67 files changed, 119 insertions(+), 48 deletions(-)

diff --git a/tests/texturing/1-1-linear-texture.c 
b/tests/texturing/1-1-linear-texture.c
index acaa818..498945d 100644
--- a/tests/texturing/1-1-linear-texture.c
+++ b/tests/texturing/1-1-linear-texture.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/texturing/array-depth-roundtrip.c 
b/tests/texturing/array-depth-roundtrip.c
index e40c880..0118b25 100644
--- a/tests/texturing/array-depth-roundtrip.c
+++ b/tests/texturing/array-depth-roundtrip.c
@@ -59,6 +59,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = TEX_WIDTH*NUM_TILES_ACROSS;
config.window_height = TEX_HEIGHT*NUM_TILES_DOWN;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/texturing/array-texture.c b/tests/texturing/array-texture.c
index f84116b..17b2504 100644
--- 

[Piglit] [PATCH 2/8] arb_shader_texture_lod: set KHR_no_error status

2017-07-05 Thread Timothy Arceri
---
 tests/spec/arb_shader_texture_lod/execution/texgrad.c | 1 +
 tests/spec/arb_shader_texture_lod/execution/texgradcube.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/spec/arb_shader_texture_lod/execution/texgrad.c 
b/tests/spec/arb_shader_texture_lod/execution/texgrad.c
index 99f8e65..f8ba284 100644
--- a/tests/spec/arb_shader_texture_lod/execution/texgrad.c
+++ b/tests/spec/arb_shader_texture_lod/execution/texgrad.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 512;
config.window_height = 256;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_shader_texture_lod/execution/texgradcube.c 
b/tests/spec/arb_shader_texture_lod/execution/texgradcube.c
index f3e2089..d0ed36e 100644
--- a/tests/spec/arb_shader_texture_lod/execution/texgradcube.c
+++ b/tests/spec/arb_shader_texture_lod/execution/texgradcube.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 512;
config.window_height = 256;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
-- 
2.9.4

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


[Piglit] [PATCH 6/8] texturing: remove empty test

2017-07-05 Thread Timothy Arceri
Cc: Ian Romanick 
---
 tests/texturing/rg-teximage-03.c | 35 ---
 1 file changed, 35 deletions(-)
 delete mode 100644 tests/texturing/rg-teximage-03.c

diff --git a/tests/texturing/rg-teximage-03.c b/tests/texturing/rg-teximage-03.c
deleted file mode 100644
index 9c73478..000
--- a/tests/texturing/rg-teximage-03.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright © 2010 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.
- */
-
-/**
- * \file rg-teximage-03.c
- * Probe various error cases.
- *
- * Verify that all of the sized and unsized RED and RG formats can be used as
- * internal formats for \c glTexImage1D, \c glTexImage2D, and \c glTexImage3D.
- *
- * Do \b not probe integer, float, or half-float formats in this test.  These
- * formats rely on other extensions.  The should be tested in other tests.
- *
- * \author Ian Romanick 
- */
-- 
2.9.4

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


[Piglit] [PATCH 4/8] arb_texture_multisample: set KHR_no_error status

2017-07-05 Thread Timothy Arceri
---
 tests/spec/arb_texture_multisample/clear.c   |  1 +
 tests/spec/arb_texture_multisample/errors.c  |  1 +
 tests/spec/arb_texture_multisample/fb-completeness.c |  1 +
 tests/spec/arb_texture_multisample/minmax.c  |  1 +
 tests/spec/arb_texture_multisample/negative-max-samples.c|  1 +
 tests/spec/arb_texture_multisample/sample-depth.c|  1 +
 tests/spec/arb_texture_multisample/sample-mask-execution.c   |  1 +
 tests/spec/arb_texture_multisample/sample-mask-value.c   | 11 +++
 tests/spec/arb_texture_multisample/sample-mask.c |  1 +
 tests/spec/arb_texture_multisample/sample-position.c |  1 +
 tests/spec/arb_texture_multisample/stencil-clear.c   |  1 +
 tests/spec/arb_texture_multisample/texelfetch.c  |  1 +
 tests/spec/arb_texture_multisample/teximage-2d-multisample.c | 11 +++
 tests/spec/arb_texture_multisample/teximage-3d-multisample.c | 11 +++
 tests/spec/arb_texture_multisample/texstate.c|  1 +
 15 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/tests/spec/arb_texture_multisample/clear.c 
b/tests/spec/arb_texture_multisample/clear.c
index f7ec826..1ef7907 100644
--- a/tests/spec/arb_texture_multisample/clear.c
+++ b/tests/spec/arb_texture_multisample/clear.c
@@ -43,6 +43,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 21;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/errors.c 
b/tests/spec/arb_texture_multisample/errors.c
index ba9f1e6..42cc2c1 100644
--- a/tests/spec/arb_texture_multisample/errors.c
+++ b/tests/spec/arb_texture_multisample/errors.c
@@ -27,6 +27,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_compat_version = 30;
 
 config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/fb-completeness.c 
b/tests/spec/arb_texture_multisample/fb-completeness.c
index 302b43d..1cb03a8 100644
--- a/tests/spec/arb_texture_multisample/fb-completeness.c
+++ b/tests/spec/arb_texture_multisample/fb-completeness.c
@@ -26,6 +26,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
 config.supports_gl_compat_version = 30;
 config.window_visual = PIGLIT_GL_VISUAL_RGB;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/minmax.c 
b/tests/spec/arb_texture_multisample/minmax.c
index 9d54e72..9729e9e 100644
--- a/tests/spec/arb_texture_multisample/minmax.c
+++ b/tests/spec/arb_texture_multisample/minmax.c
@@ -28,6 +28,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_compat_version = 10;
 config.supports_gl_core_version = 31;
 config.window_visual = PIGLIT_GL_VISUAL_RGB;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/negative-max-samples.c 
b/tests/spec/arb_texture_multisample/negative-max-samples.c
index 1f9a3ce..b5f0441 100644
--- a/tests/spec/arb_texture_multisample/negative-max-samples.c
+++ b/tests/spec/arb_texture_multisample/negative-max-samples.c
@@ -41,6 +41,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_compat_version = 10;
 
 config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/sample-depth.c 
b/tests/spec/arb_texture_multisample/sample-depth.c
index d6f5313..ef2be19 100644
--- a/tests/spec/arb_texture_multisample/sample-depth.c
+++ b/tests/spec/arb_texture_multisample/sample-depth.c
@@ -34,6 +34,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
 config.supports_gl_compat_version = 30;
 config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/sample-mask-execution.c 
b/tests/spec/arb_texture_multisample/sample-mask-execution.c
index 4605465..22775b7 100644
--- a/tests/spec/arb_texture_multisample/sample-mask-execution.c
+++ b/tests/spec/arb_texture_multisample/sample-mask-execution.c
@@ -27,6 +27,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_compat_version = 30;
 
 config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_texture_multisample/sample-mask-value.c 
b/tests/spec/arb_texture_multisample/sample-mask-value.c
index eefa48b..0465fe1 100644
--- a/tests/spec/arb_texture_multisample/sample-mask-value.c
+++ b/tests/spec/arb_texture_multisample/sample-mask-value.c
@@ -26,6 

[Piglit] [PATCH 3/8] arb_texture_barrier: set KHR_no_error status

2017-07-05 Thread Timothy Arceri
---
 tests/spec/arb_texture_barrier/blending-in-shader-arb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c 
b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
index 2b10791..0ec28ee 100644
--- a/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
+++ b/tests/spec/arb_texture_barrier/blending-in-shader-arb.c
@@ -53,6 +53,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_compat_version = 31;
 config.supports_gl_core_version = 31;
 config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
-- 
2.9.4

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


[Piglit] [PATCH 5/8] texelFetch: set KHR_no_error status

2017-07-05 Thread Timothy Arceri
---
 tests/texturing/shaders/texelFetch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/texturing/shaders/texelFetch.c 
b/tests/texturing/shaders/texelFetch.c
index 2e1d223..1e3a0dc 100644
--- a/tests/texturing/shaders/texelFetch.c
+++ b/tests/texturing/shaders/texelFetch.c
@@ -87,6 +87,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 900;
config.window_height = 600;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
piglit_gl_process_args(, argv, );
 
-- 
2.9.4

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


Re: [Piglit] [PATCH] es3: add tests for verifying overloading behavior

2017-07-05 Thread Timothy Arceri

Thanks!

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 06/07/17 10:05, Ilia Mirkin wrote:

An existing bug in mesa made it so that overloads of any functions that
might be builtins in any language version or extension would not be
overridable in ESSL 3.00 shaders. This adds tests to ensure that
builtins available in ESSL 3.00 are rejected properly, but builtins from
future versions or non-enabled (or available) extensions are allowed to
be specified.

Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu>
---
  tests/spec/glsl-es-3.00/compiler/overload-builtin.frag| 14 ++
  .../glsl-es-3.00/compiler/overload-future-builtin.frag| 15 +++
  2 files changed, 29 insertions(+)
  create mode 100644 tests/spec/glsl-es-3.00/compiler/overload-builtin.frag
  create mode 100644 
tests/spec/glsl-es-3.00/compiler/overload-future-builtin.frag

diff --git a/tests/spec/glsl-es-3.00/compiler/overload-builtin.frag 
b/tests/spec/glsl-es-3.00/compiler/overload-builtin.frag
new file mode 100644
index 0..8ed837655
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/overload-builtin.frag
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 3.00
+// [end config]
+//
+// Check that builtins may not be overloaded, even with different parameters.
+//
+// From GLSL ES 3.0 spec, chapter 6.1 "Function Definitions", page 71:
+//
+// "A shader cannot redefine or overload built-in functions."
+//
+#version 300 es
+
+int sqrt(int x) { return x; }
diff --git a/tests/spec/glsl-es-3.00/compiler/overload-future-builtin.frag 
b/tests/spec/glsl-es-3.00/compiler/overload-future-builtin.frag
new file mode 100644
index 0..a3b3ae1cf
--- /dev/null
+++ b/tests/spec/glsl-es-3.00/compiler/overload-future-builtin.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.00
+// [end config]
+//
+// Check that builtins that are not available in ESSL 3.00 may be defined
+// or overloaded as needed.
+//
+#version 300 es
+precision highp float;
+
+int bitfieldExtract(int x) { return x; }
+int imageAtomicAdd(int x) { return x; }
+void barrier() { }
+uint packUnorm4x8(vec4 v) { return uint(v.x); }


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


[Piglit] [PATCH 10/10] glsl-1.50: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 .../glsl-1.50/execution/geometry/end-primitive.c   |  1 +
 ...ometry-end-primitive-optional-with-points-out.c |  1 +
 .../execution/geometry/getshaderiv-may-return-GS.c |  1 +
 .../execution/geometry/gs-emits-too-few-verts.c|  1 +
 .../geometry/gs-input-layout-qualifiers.c  |  1 +
 .../execution/geometry/gs-max-output-components.c  |  1 +
 .../execution/geometry/gs-mismatch-prim-type.c |  1 +
 .../geometry/gs-output-layout-qualifiers.c |  1 +
 .../execution/geometry/primitive-id-restart.c  |  1 +
 .../glsl-1.50/execution/geometry/primitive-types.c |  1 +
 .../execution/geometry/query-gs-prim-types.c   | 41 --
 .../geometry/transform-feedback-builtins.c |  1 +
 .../geometry/transform-feedback-type-and-size.c|  1 +
 .../geometry/transform-feedback-vertex-id.c|  1 +
 .../tri-strip-ordering-with-prim-restart.c |  1 +
 .../glsl-1.50/execution/get-active-attrib-array.c  |  1 +
 .../glsl-1.50/execution/interface-block-centroid.c |  1 +
 .../interface-blocks-api-access-members.c  |  1 +
 tests/spec/glsl-1.50/execution/vs-input-arrays.c   |  1 +
 .../glsl-1.50/execution/vs-named-block-no-modify.c |  1 +
 20 files changed, 42 insertions(+), 18 deletions(-)

diff --git a/tests/spec/glsl-1.50/execution/geometry/end-primitive.c 
b/tests/spec/glsl-1.50/execution/geometry/end-primitive.c
index b54e7c7..a670b56 100644
--- a/tests/spec/glsl-1.50/execution/geometry/end-primitive.c
+++ b/tests/spec/glsl-1.50/execution/geometry/end-primitive.c
@@ -76,6 +76,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 2*PATTERN_SIZE;
config.window_height = PATTERN_SIZE;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
 
b/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
index a881330..0e67092 100644
--- 
a/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
+++ 
b/tests/spec/glsl-1.50/execution/geometry/geometry-end-primitive-optional-with-points-out.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/glsl-1.50/execution/geometry/getshaderiv-may-return-GS.c 
b/tests/spec/glsl-1.50/execution/geometry/getshaderiv-may-return-GS.c
index 5d8f4ec..26bc184 100644
--- a/tests/spec/glsl-1.50/execution/geometry/getshaderiv-may-return-GS.c
+++ b/tests/spec/glsl-1.50/execution/geometry/getshaderiv-may-return-GS.c
@@ -42,6 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-emits-too-few-verts.c 
b/tests/spec/glsl-1.50/execution/geometry/gs-emits-too-few-verts.c
index 56723d9..545f49d 100644
--- a/tests/spec/glsl-1.50/execution/geometry/gs-emits-too-few-verts.c
+++ b/tests/spec/glsl-1.50/execution/geometry/gs-emits-too-few-verts.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c 
b/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c
index 290f85f..33bd2ab 100644
--- a/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c
+++ b/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c
@@ -43,6 +43,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-max-output-components.c 
b/tests/spec/glsl-1.50/execution/geometry/gs-max-output-components.c
index 67a8475..b517968 100644
--- a/tests/spec/glsl-1.50/execution/geometry/gs-max-output-components.c
+++ b/tests/spec/glsl-1.50/execution/geometry/gs-max-output-components.c
@@ -41,6 +41,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 2*PATTERN_SIZE;
config.window_height = PATTERN_SIZE;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 

[Piglit] [PATCH 01/10] arb_shader_atomic_counters: fix KHR_no_error support for buffer binding test

2017-07-04 Thread Timothy Arceri
---
 tests/spec/arb_shader_atomic_counters/buffer-binding.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/spec/arb_shader_atomic_counters/buffer-binding.c 
b/tests/spec/arb_shader_atomic_counters/buffer-binding.c
index 7eeaae9..de4e9d1 100644
--- a/tests/spec/arb_shader_atomic_counters/buffer-binding.c
+++ b/tests/spec/arb_shader_atomic_counters/buffer-binding.c
@@ -141,10 +141,12 @@ piglit_init(int argc, char **argv)
 "implementation limit",
 run_test_bind_at, ls.bindings - 1);
 
-atomic_counters_subtest(, GL_NONE,
-"Atomic buffer binding above the "
-"implementation limit",
-!run_test_bind_at, ls.bindings);
+if (!piglit_khr_no_error) {
+atomic_counters_subtest(, GL_NONE,
+"Atomic buffer binding above the "
+"implementation limit",
+!run_test_bind_at, ls.bindings);
+}
 
 atomic_counters_subtest(, GL_NONE,
 "Atomic buffer range binding",
-- 
2.9.4

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


[Piglit] [PATCH 08/10] glsl-1.30: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c | 1 +
 tests/spec/glsl-1.30/execution/fs-discard-exit-2.c   | 1 +
 tests/spec/glsl-1.30/execution/fs-execution-ordering.c   | 1 +
 tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c| 1 +
 tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c  | 1 +
 tests/spec/glsl-1.30/execution/fs-textureOffset-2D.c | 1 +
 tests/spec/glsl-1.30/execution/isinf-and-isnan.c | 1 +
 tests/spec/glsl-1.30/execution/vertexid-beginend.c   | 1 +
 tests/spec/glsl-1.30/texel-offset-limits.c   | 1 +
 9 files changed, 9 insertions(+)

diff --git a/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c 
b/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c
index 21821f7..6258984 100644
--- a/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c
+++ b/tests/spec/glsl-1.30/execution/clipping/max-clip-distances.c
@@ -64,6 +64,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c 
b/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c
index 0ce32dc..b539286 100644
--- a/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c
+++ b/tests/spec/glsl-1.30/execution/fs-discard-exit-2.c
@@ -49,6 +49,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/fs-execution-ordering.c 
b/tests/spec/glsl-1.30/execution/fs-execution-ordering.c
index a40ded2..c71dc46 100644
--- a/tests/spec/glsl-1.30/execution/fs-execution-ordering.c
+++ b/tests/spec/glsl-1.30/execution/fs-execution-ordering.c
@@ -42,6 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c 
b/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c
index 86edff7..b5789ba 100644
--- a/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c
+++ b/tests/spec/glsl-1.30/execution/fs-texelFetch-2D.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 90;
config.window_height = 150;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c 
b/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c
index dfbadc7..f165bb0 100644
--- a/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c
+++ b/tests/spec/glsl-1.30/execution/fs-texelFetchOffset-2D.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/fs-textureOffset-2D.c 
b/tests/spec/glsl-1.30/execution/fs-textureOffset-2D.c
index 69cfa10..3677590 100644
--- a/tests/spec/glsl-1.30/execution/fs-textureOffset-2D.c
+++ b/tests/spec/glsl-1.30/execution/fs-textureOffset-2D.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/isinf-and-isnan.c 
b/tests/spec/glsl-1.30/execution/isinf-and-isnan.c
index a726b1d..099b5c2 100644
--- a/tests/spec/glsl-1.30/execution/isinf-and-isnan.c
+++ b/tests/spec/glsl-1.30/execution/isinf-and-isnan.c
@@ -115,6 +115,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/execution/vertexid-beginend.c 
b/tests/spec/glsl-1.30/execution/vertexid-beginend.c
index d7aead8..3996f0d 100644
--- a/tests/spec/glsl-1.30/execution/vertexid-beginend.c
+++ b/tests/spec/glsl-1.30/execution/vertexid-beginend.c
@@ -33,6 +33,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/glsl-1.30/texel-offset-limits.c 

[Piglit] [PATCH 06/10] arb_sample_shading: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/spec/arb_sample_shading/execution/api.c| 1 +
 tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp   | 1 +
 tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp | 1 +
 .../arb_sample_shading/execution/builtin-gl-sample-mask-mrt-alpha.cpp| 1 +
 .../spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp  | 1 +
 tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp   | 1 +
 tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp   | 1 +
 tests/spec/arb_sample_shading/execution/ignore-centroid-qualifier.cpp| 1 +
 .../spec/arb_sample_shading/execution/interpolate-at-sample-position.cpp | 1 +
 9 files changed, 9 insertions(+)

diff --git a/tests/spec/arb_sample_shading/execution/api.c 
b/tests/spec/arb_sample_shading/execution/api.c
index ccff753..3338444 100644
--- a/tests/spec/arb_sample_shading/execution/api.c
+++ b/tests/spec/arb_sample_shading/execution/api.c
@@ -34,6 +34,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
index 0124f67..52965bf 100644
--- a/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
+++ b/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = pattern_width;
config.window_height = pattern_height;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp
index 22265cf..c318b14 100644
--- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp
+++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = pattern_width;
config.window_height = pattern_height;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-mrt-alpha.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-mrt-alpha.cpp
index ce5f6c3..47ad180 100644
--- 
a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-mrt-alpha.cpp
+++ 
b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-mrt-alpha.cpp
@@ -42,6 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 config.supports_gl_core_version = 31;
 
 config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp
index 2fc9c44..42ce67d 100644
--- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp
+++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_core_version = 31;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp
index fe8a739..48ed525 100644
--- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp
+++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = pattern_width;
config.window_height = pattern_height;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp
index 4ab6319..ede6514 100644
--- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp
+++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp
@@ -41,6 +41,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = pattern_width;
config.window_height = pattern_height;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = 

[Piglit] [PATCH 04/10] arb_color_buffer_float: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/spec/arb_color_buffer_float/common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/arb_color_buffer_float/common.h 
b/tests/spec/arb_color_buffer_float/common.h
index da59df9..c354303 100644
--- a/tests/spec/arb_color_buffer_float/common.h
+++ b/tests/spec/arb_color_buffer_float/common.h
@@ -39,6 +39,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 128;
config.window_height = 128;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
-- 
2.9.4

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


[Piglit] [PATCH 09/10] glsl-1.40: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/spec/glsl-1.40/tf-no-position.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/glsl-1.40/tf-no-position.c 
b/tests/spec/glsl-1.40/tf-no-position.c
index 85abcc5..eed67f1 100644
--- a/tests/spec/glsl-1.40/tf-no-position.c
+++ b/tests/spec/glsl-1.40/tf-no-position.c
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 10;
config.window_height = 10;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
-- 
2.9.4

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


[Piglit] [PATCH 03/10] hiz: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/hiz/hiz-depth-read-fbo-d24-s0.c | 1 +
 tests/hiz/hiz-depth-read-fbo-d24-s8.c | 1 +
 tests/hiz/hiz-depth-read-fbo-d24s8.c  | 1 +
 tests/hiz/hiz-depth-read-window-stencil0.c| 1 +
 tests/hiz/hiz-depth-read-window-stencil1.c| 1 +
 tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c  | 1 +
 tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c | 1 +
 tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c | 1 +
 tests/hiz/hiz-depth-stencil-test-fbo-d24s8.c  | 1 +
 tests/hiz/hiz-depth-test-fbo-d24-s0.c | 1 +
 tests/hiz/hiz-depth-test-fbo-d24-s8.c | 1 +
 tests/hiz/hiz-depth-test-fbo-d24s8.c  | 1 +
 tests/hiz/hiz-depth-test-window-stencil0.c| 1 +
 tests/hiz/hiz-depth-test-window-stencil1.c| 1 +
 tests/hiz/hiz-stencil-read-fbo-d0-s8.c| 1 +
 tests/hiz/hiz-stencil-read-fbo-d24-s8.c   | 1 +
 tests/hiz/hiz-stencil-read-fbo-d24s8.c| 1 +
 tests/hiz/hiz-stencil-read-window-depth0.c| 1 +
 tests/hiz/hiz-stencil-read-window-depth1.c| 1 +
 tests/hiz/hiz-stencil-test-fbo-d0-s8.c| 1 +
 tests/hiz/hiz-stencil-test-fbo-d24-s8.c   | 1 +
 tests/hiz/hiz-stencil-test-fbo-d24s8.c| 1 +
 tests/hiz/hiz-stencil-test-window-depth0.c| 1 +
 tests/hiz/hiz-stencil-test-window-depth1.c| 1 +
 24 files changed, 24 insertions(+)

diff --git a/tests/hiz/hiz-depth-read-fbo-d24-s0.c 
b/tests/hiz/hiz-depth-read-fbo-d24-s0.c
index 256def6..9968e48 100644
--- a/tests/hiz/hiz-depth-read-fbo-d24-s0.c
+++ b/tests/hiz/hiz-depth-read-fbo-d24-s0.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-read-fbo-d24-s8.c 
b/tests/hiz/hiz-depth-read-fbo-d24-s8.c
index 14cc461..9bcc7a6 100644
--- a/tests/hiz/hiz-depth-read-fbo-d24-s8.c
+++ b/tests/hiz/hiz-depth-read-fbo-d24-s8.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-read-fbo-d24s8.c 
b/tests/hiz/hiz-depth-read-fbo-d24s8.c
index b84a108..e67b7d5 100644
--- a/tests/hiz/hiz-depth-read-fbo-d24s8.c
+++ b/tests/hiz/hiz-depth-read-fbo-d24s8.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-read-window-stencil0.c 
b/tests/hiz/hiz-depth-read-window-stencil0.c
index 14adfb3..327ce89 100644
--- a/tests/hiz/hiz-depth-read-window-stencil0.c
+++ b/tests/hiz/hiz-depth-read-window-stencil0.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-read-window-stencil1.c 
b/tests/hiz/hiz-depth-read-window-stencil1.c
index e211892..2d74f24 100644
--- a/tests/hiz/hiz-depth-read-window-stencil1.c
+++ b/tests/hiz/hiz-depth-read-window-stencil1.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DEPTH | 
PIGLIT_GL_VISUAL_STENCIL;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c 
b/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c
index 6fd2fbd..aaf017e 100644
--- a/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c
+++ b/tests/hiz/hiz-depth-stencil-test-fbo-d0-s8.c
@@ -45,6 +45,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c 
b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c
index f06995c..7edda1e 100644
--- a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c
+++ b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s0.c
@@ -45,6 +45,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c 
b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c
index 20cdc7b..8a98974 100644
--- a/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c
+++ b/tests/hiz/hiz-depth-stencil-test-fbo-d24-s8.c
@@ -49,6 +49,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 400;
config.window_height = 400;
config.window_visual 

[Piglit] [PATCH 07/10] glsl-1.30: alphabetise build list

2017-07-04 Thread Timothy Arceri
---
 tests/spec/glsl-1.30/execution/CMakeLists.gl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt 
b/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt
index 9cf2586..2aadedc 100644
--- a/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt
+++ b/tests/spec/glsl-1.30/execution/CMakeLists.gl.txt
@@ -10,6 +10,7 @@ link_libraries (
 )
 
 piglit_add_executable (fs-discard-exit-2 fs-discard-exit-2.c)
+piglit_add_executable (fs-execution-ordering fs-execution-ordering.c)
 piglit_add_executable (fs-texelFetch-2D fs-texelFetch-2D.c)
 piglit_add_executable (fs-texelFetchOffset-2D fs-texelFetchOffset-2D.c)
 piglit_add_executable (fs-textureOffset-2D fs-textureOffset-2D.c)
@@ -17,4 +18,3 @@ piglit_add_executable (isinf-and-isnan isinf-and-isnan.c)
 piglit_add_executable (vertexid-beginend vertexid-beginend.c)
 piglit_add_executable (vertexid-drawarrays vertexid-drawarrays.c)
 piglit_add_executable (vertexid-drawelements vertexid-drawelements.c)
-piglit_add_executable (fs-execution-ordering fs-execution-ordering.c)
-- 
2.9.4

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


[Piglit] [PATCH 02/10] fast_color_clear: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/fast_color_clear/blit-between-clears.c  | 1 +
 tests/fast_color_clear/front-buffer-distraction.c | 1 +
 tests/fast_color_clear/read-after-clear.c | 1 +
 tests/fast_color_clear/read-to-pbo-after-clear.c  | 1 +
 4 files changed, 4 insertions(+)

diff --git a/tests/fast_color_clear/blit-between-clears.c 
b/tests/fast_color_clear/blit-between-clears.c
index 12c23e7..97a4529 100644
--- a/tests/fast_color_clear/blit-between-clears.c
+++ b/tests/fast_color_clear/blit-between-clears.c
@@ -41,6 +41,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = RB_WIDTH;
config.window_height = RB_HEIGHT;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
diff --git a/tests/fast_color_clear/front-buffer-distraction.c 
b/tests/fast_color_clear/front-buffer-distraction.c
index c8e059b..e823627 100644
--- a/tests/fast_color_clear/front-buffer-distraction.c
+++ b/tests/fast_color_clear/front-buffer-distraction.c
@@ -43,6 +43,7 @@
 PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 11;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
diff --git a/tests/fast_color_clear/read-after-clear.c 
b/tests/fast_color_clear/read-after-clear.c
index 98c7169..390d5b7 100644
--- a/tests/fast_color_clear/read-after-clear.c
+++ b/tests/fast_color_clear/read-after-clear.c
@@ -58,6 +58,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = TEX_WIDTH;
config.window_height = TEX_HEIGHT;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
diff --git a/tests/fast_color_clear/read-to-pbo-after-clear.c 
b/tests/fast_color_clear/read-to-pbo-after-clear.c
index 522b53a..87de9f3 100644
--- a/tests/fast_color_clear/read-to-pbo-after-clear.c
+++ b/tests/fast_color_clear/read-to-pbo-after-clear.c
@@ -46,6 +46,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = TEX_WIDTH;
config.window_height = TEX_HEIGHT;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
-- 
2.9.4

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


[Piglit] [PATCH 05/10] arb_gpu_shader5: set KHR_no_error status

2017-07-04 Thread Timothy Arceri
---
 tests/spec/arb_gpu_shader5/execution/emitstreamvertex_nodraw.c  | 1 +
 tests/spec/arb_gpu_shader5/execution/invocation-id.c| 1 +
 tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c  | 1 +
 tests/spec/arb_gpu_shader5/execution/xfb-streams.c  | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtCentroid-centroid.c | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtCentroid-flat.c | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtCentroid-noperspective.c| 1 +
 tests/spec/arb_gpu_shader5/interpolateAtCentroid-packing.c  | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtCentroid.c  | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtOffset-nonconst.c   | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtOffset.c| 1 +
 tests/spec/arb_gpu_shader5/interpolateAtSample-different.c  | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtSample-dynamically-nonuniform.c | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtSample-nonconst.c   | 1 +
 tests/spec/arb_gpu_shader5/interpolateAtSample.c| 1 +
 tests/spec/arb_gpu_shader5/minmax.c | 1 +
 16 files changed, 16 insertions(+)

diff --git a/tests/spec/arb_gpu_shader5/execution/emitstreamvertex_nodraw.c 
b/tests/spec/arb_gpu_shader5/execution/emitstreamvertex_nodraw.c
index f581d22..896d3b8 100644
--- a/tests/spec/arb_gpu_shader5/execution/emitstreamvertex_nodraw.c
+++ b/tests/spec/arb_gpu_shader5/execution/emitstreamvertex_nodraw.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
config.window_width = 100;
config.window_height = 100;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_gpu_shader5/execution/invocation-id.c 
b/tests/spec/arb_gpu_shader5/execution/invocation-id.c
index 1a2d70e..fa646ce 100644
--- a/tests/spec/arb_gpu_shader5/execution/invocation-id.c
+++ b/tests/spec/arb_gpu_shader5/execution/invocation-id.c
@@ -32,6 +32,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version   = 32;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 
a/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c 
b/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c
index d163faf..37ca7a1 100644
--- a/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c
+++ b/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version = 32;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_gpu_shader5/execution/xfb-streams.c 
b/tests/spec/arb_gpu_shader5/execution/xfb-streams.c
index 9aa36c3..4443def 100644
--- a/tests/spec/arb_gpu_shader5/execution/xfb-streams.c
+++ b/tests/spec/arb_gpu_shader5/execution/xfb-streams.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version = 32;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_gpu_shader5/interpolateAtCentroid-centroid.c 
b/tests/spec/arb_gpu_shader5/interpolateAtCentroid-centroid.c
index e4889b2..66edc3b 100644
--- a/tests/spec/arb_gpu_shader5/interpolateAtCentroid-centroid.c
+++ b/tests/spec/arb_gpu_shader5/interpolateAtCentroid-centroid.c
@@ -45,6 +45,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_gpu_shader5/interpolateAtCentroid-flat.c 
b/tests/spec/arb_gpu_shader5/interpolateAtCentroid-flat.c
index 0496779..c019b65 100644
--- a/tests/spec/arb_gpu_shader5/interpolateAtCentroid-flat.c
+++ b/tests/spec/arb_gpu_shader5/interpolateAtCentroid-flat.c
@@ -46,6 +46,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_gpu_shader5/interpolateAtCentroid-noperspective.c 
b/tests/spec/arb_gpu_shader5/interpolateAtCentroid-noperspective.c
index 0aa8471..9711fe1 100644
--- a/tests/spec/arb_gpu_shader5/interpolateAtCentroid-noperspective.c
+++ b/tests/spec/arb_gpu_shader5/interpolateAtCentroid-noperspective.c
@@ -46,6 +46,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_core_version = 32;
 

Re: [Piglit] [RFC] glean: remove pixel formats test

2017-07-02 Thread Timothy Arceri

On 30/06/17 23:11, Brian Paul wrote:

On 06/29/2017 11:01 PM, Timothy Arceri wrote:

On 30/06/17 14:49, Timothy Arceri wrote:

In the bug for porting glean tests to piglit this is
listed as "covered by Piglit" "Check & Remove".

Since that list was made we also now have a public CTS.

This is another of the extra slow glean tests. Can we
assume this is all covered and remove?


For the record, a quick grep shows that all the extensions used in this
test are covered in piglit at least in some form.


I suspect this test does hit some code that may not be hit by other 
Piglit tests (do we test glDrawPixels with all the format/type combos 
otherwise?).


When you run piglit, are you using tests/all.py or tests/quick.py?

The pixelFormats test only takes a few seconds with the --quick flag.


Sometimes running all.py is required. quick.py is nice for most things, 
but sometimes all picks up extra issues e.g. when you are messing around 
with things that have an impact on asm programs.


On my 8 core Ryzan I can run through 90% of the test under all.py in a 
few minutes (which is amazing after switching from a dual core machine).


The only things that slows down the run is the remaining glean tests, it 
would be nice to be able to just run everything to be on the cautious 
side without having to wait on the tests.


Anyway I'll leave this test for now. Maybe I'll take a closer look in 
the future if I can be bothered.


Thanks,
Tim



-Brian

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

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


Re: [Piglit] [RFC] glean: remove pixel formats test

2017-06-29 Thread Timothy Arceri

On 30/06/17 14:49, Timothy Arceri wrote:

In the bug for porting glean tests to piglit this is
listed as "covered by Piglit" "Check & Remove".

Since that list was made we also now have a public CTS.

This is another of the extra slow glean tests. Can we
assume this is all covered and remove?


For the record, a quick grep shows that all the extensions used in this 
test are covered in piglit at least in some form.




https://bugs.freedesktop.org/show_bug.cgi?id=65676
---
  tests/all.py  |1 -
  tests/glean/CMakeLists.gl.txt |1 -
  tests/glean/tpixelformats.cpp | 1675 -
  tests/glean/tpixelformats.h   |   98 ---
  4 files changed, 1775 deletions(-)
  delete mode 100644 tests/glean/tpixelformats.cpp
  delete mode 100644 tests/glean/tpixelformats.h

diff --git a/tests/all.py b/tests/all.py
index 4d19da1..c5d0672 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -292,21 +292,20 @@ for basedir in [os.path.join(TESTS_DIR, 'apitrace', 
'traces')]:
  MSAA_SAMPLE_COUNTS = ['2', '4', '6', '8', '16', '32']
  
  with profile.test_list.group_manager(GleanTest, 'glean') as g:

  g('basic')
  g('api2')
  g('makeCurrent')
  g('bufferObject')
  g('depthStencil')
  g('fbo')
  g('getString')
-g('pixelFormats')
  g('pointSprite')
  # exactRGBA is not included intentionally, because it's too strict and
  # the equivalent functionality is covered by other tests
  g('shaderAPI')
  g('texCombine')
  g('texCube')
  g('texEnv')
  g('texgen')
  g('texCombine4')
  g('texture_srgb')
diff --git a/tests/glean/CMakeLists.gl.txt b/tests/glean/CMakeLists.gl.txt
index 9bbf324..7a9ccb0 100644
--- a/tests/glean/CMakeLists.gl.txt
+++ b/tests/glean/CMakeLists.gl.txt
@@ -27,21 +27,20 @@ piglit_add_executable (glean
options.cpp
rc.cpp
tapi2.cpp
tbasic.cpp
tbinding.cpp
test.cpp
tfbo.cpp
tfragprog1.cpp
tglsl1.cpp
tmultitest.cpp
-   tpixelformats.cpp
tpointsprite.cpp
tshaderapi.cpp
ttexcombine.cpp
ttexcombine4.cpp
ttexcube.cpp
ttexenv.cpp
ttexgen.cpp
ttexture_srgb.cpp
ttexunits.cpp
tvertarraybgra.cpp
diff --git a/tests/glean/tpixelformats.cpp b/tests/glean/tpixelformats.cpp
deleted file mode 100644
index d9818dc..000
--- a/tests/glean/tpixelformats.cpp
+++ /dev/null
@@ -1,1675 +0,0 @@
-// BEGIN_COPYRIGHT -*- glean -*-
-//
-// Copyright (C) 1999  Allen Akin   All Rights Reserved.
-//
-// 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 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 ALLEN AKIN 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.
-//
-// END_COPYRIGHT
-
-
-#include 
-#include 
-#include 
-#include "tpixelformats.h"
-#include "../util/rgb9e5.h"
-#include "piglit-util-gl.h"
-
-
-// Set to 1 to help debug test failures:
-// Also, when a test failure is found, rearrange the order of the
-// formats, types, internformats below so the failure case comes first.
-#define DEBUG 0
-
-
-// just for extra debugging
-// Maybe add fragment program path as a 3rd envMode (below) someday.
-#define USE_FRAG_PROG 0
-
-#define abort() do { printf("%s:%i\n", __FUNCTION__, __LINE__); abort(); } 
while (0)
-
-namespace GLEAN {
-
-
-struct NameTokenComps {
-   const char *Name;
-   GLenum Token;
-   GLuint Components;
-};
-
-
-static const NameTokenComps Types[] =
-{
-   { "GL_UNSIGNED_BYTE", GL_UNSIGNED_BYTE, 0 },
-   { "GL_BYTE", GL_BYTE, 0 },
-   { "GL_UNSIGNED_INT", GL_UNSIGNED_INT, 0 },
-   { "GL_SHORT", GL_SHORT, 0 },
-   { "GL_UNSIGNED_SHORT", GL_UNSIGNED_SHORT, 0 },
-   { "GL_INT", GL_INT, 0 },
-   { "GL_FLOAT", GL_FLOAT, 0 },
-   { "GL_HALF_FLOAT_ARB", GL_HALF_FLOAT_ARB, 0 },
-
-   { "GL_UNSIGNED_INT_8_8_8_8", 

[Piglit] [RFC] glean: remove pixel formats test

2017-06-29 Thread Timothy Arceri
In the bug for porting glean tests to piglit this is
listed as "covered by Piglit" "Check & Remove".

Since that list was made we also now have a public CTS.

This is another of the extra slow glean tests. Can we
assume this is all covered and remove?

https://bugs.freedesktop.org/show_bug.cgi?id=65676
---
 tests/all.py  |1 -
 tests/glean/CMakeLists.gl.txt |1 -
 tests/glean/tpixelformats.cpp | 1675 -
 tests/glean/tpixelformats.h   |   98 ---
 4 files changed, 1775 deletions(-)
 delete mode 100644 tests/glean/tpixelformats.cpp
 delete mode 100644 tests/glean/tpixelformats.h

diff --git a/tests/all.py b/tests/all.py
index 4d19da1..c5d0672 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -292,21 +292,20 @@ for basedir in [os.path.join(TESTS_DIR, 'apitrace', 
'traces')]:
 MSAA_SAMPLE_COUNTS = ['2', '4', '6', '8', '16', '32']
 
 with profile.test_list.group_manager(GleanTest, 'glean') as g:
 g('basic')
 g('api2')
 g('makeCurrent')
 g('bufferObject')
 g('depthStencil')
 g('fbo')
 g('getString')
-g('pixelFormats')
 g('pointSprite')
 # exactRGBA is not included intentionally, because it's too strict and
 # the equivalent functionality is covered by other tests
 g('shaderAPI')
 g('texCombine')
 g('texCube')
 g('texEnv')
 g('texgen')
 g('texCombine4')
 g('texture_srgb')
diff --git a/tests/glean/CMakeLists.gl.txt b/tests/glean/CMakeLists.gl.txt
index 9bbf324..7a9ccb0 100644
--- a/tests/glean/CMakeLists.gl.txt
+++ b/tests/glean/CMakeLists.gl.txt
@@ -27,21 +27,20 @@ piglit_add_executable (glean
options.cpp
rc.cpp
tapi2.cpp
tbasic.cpp
tbinding.cpp
test.cpp
tfbo.cpp
tfragprog1.cpp
tglsl1.cpp
tmultitest.cpp
-   tpixelformats.cpp
tpointsprite.cpp
tshaderapi.cpp
ttexcombine.cpp
ttexcombine4.cpp
ttexcube.cpp
ttexenv.cpp
ttexgen.cpp
ttexture_srgb.cpp
ttexunits.cpp
tvertarraybgra.cpp
diff --git a/tests/glean/tpixelformats.cpp b/tests/glean/tpixelformats.cpp
deleted file mode 100644
index d9818dc..000
--- a/tests/glean/tpixelformats.cpp
+++ /dev/null
@@ -1,1675 +0,0 @@
-// BEGIN_COPYRIGHT -*- glean -*-
-// 
-// Copyright (C) 1999  Allen Akin   All Rights Reserved.
-// 
-// 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 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 ALLEN AKIN 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.
-// 
-// END_COPYRIGHT
-
-
-#include 
-#include 
-#include 
-#include "tpixelformats.h"
-#include "../util/rgb9e5.h"
-#include "piglit-util-gl.h"
-
-
-// Set to 1 to help debug test failures:
-// Also, when a test failure is found, rearrange the order of the
-// formats, types, internformats below so the failure case comes first.
-#define DEBUG 0
-
-
-// just for extra debugging
-// Maybe add fragment program path as a 3rd envMode (below) someday.
-#define USE_FRAG_PROG 0
-
-#define abort() do { printf("%s:%i\n", __FUNCTION__, __LINE__); abort(); } 
while (0)
-
-namespace GLEAN {
-
-
-struct NameTokenComps {
-   const char *Name;
-   GLenum Token;
-   GLuint Components;
-};
-
-
-static const NameTokenComps Types[] =
-{
-   { "GL_UNSIGNED_BYTE", GL_UNSIGNED_BYTE, 0 },
-   { "GL_BYTE", GL_BYTE, 0 },
-   { "GL_UNSIGNED_INT", GL_UNSIGNED_INT, 0 },
-   { "GL_SHORT", GL_SHORT, 0 },
-   { "GL_UNSIGNED_SHORT", GL_UNSIGNED_SHORT, 0 },
-   { "GL_INT", GL_INT, 0 },
-   { "GL_FLOAT", GL_FLOAT, 0 },
-   { "GL_HALF_FLOAT_ARB", GL_HALF_FLOAT_ARB, 0 },
-
-   { "GL_UNSIGNED_INT_8_8_8_8", GL_UNSIGNED_INT_8_8_8_8, 4 },
-   { "GL_UNSIGNED_INT_8_8_8_8_REV", GL_UNSIGNED_INT_8_8_8_8_REV, 4 },
-   { "GL_UNSIGNED_INT_10_10_10_2", GL_UNSIGNED_INT_10_10_10_2, 4 },
-   { "GL_UNSIGNED_INT_2_10_10_10_REV", GL_UNSIGNED_INT_2_10_10_10_REV, 4 },
-   { "GL_UNSIGNED_SHORT_5_5_5_1", GL_UNSIGNED_SHORT_5_5_5_1, 4 },
-   { "GL_UNSIGNED_SHORT_1_5_5_5_REV", 

[Piglit] [PATCH] glsl-1.20: better test indirect indexing of literal array of structs

2017-06-29 Thread Timothy Arceri
This exposes some existing bugs in gallium and also provides more
coverage for when we start packing uniforms.
---
 ...iteral-array-of-structs-vec4-member.shader_test | 39 +++
 ...s-with-multiple-members-large-array.shader_test | 57 ++
 ...ay-of-structs-with-multiple-members.shader_test | 44 +
 3 files changed, 140 insertions(+)
 create mode 100644 
tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-vec4-member.shader_test
 create mode 100644 
tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members-large-array.shader_test
 create mode 100644 
tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test

diff --git 
a/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-vec4-member.shader_test
 
b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-vec4-member.shader_test
new file mode 100644
index 000..a403f6f
--- /dev/null
+++ 
b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-vec4-member.shader_test
@@ -0,0 +1,39 @@
+# Verify that an array of structs appearing in the shader as a literal
+# can be successfully dereferenced to access the values inside the
+# structs.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+void main()
+{
+  gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+struct Foo {
+  ivec4 value;
+};
+
+uniform int i;
+uniform ivec4 expected_value;
+
+void main()
+{
+  ivec4 actual_value = Foo[2](Foo(ivec4(100, 200, 300, 400)),
+  Foo(ivec4(500, 600, 700, 800)))[i].value;
+  if (actual_value == expected_value)
+gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[test]
+uniform int i 0
+uniform ivec4 expected_value 100 200 300 400
+draw rect -1 -1 2 1
+uniform int i 1
+uniform ivec4 expected_value 500 600 700 800
+draw rect -1 0 2 1
+probe all rgba 0.0 1.0 0.0 1.0
diff --git 
a/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members-large-array.shader_test
 
b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members-large-array.shader_test
new file mode 100644
index 000..ff2b34d
--- /dev/null
+++ 
b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members-large-array.shader_test
@@ -0,0 +1,57 @@
+# Verify that an array of structs appearing in the shader as a literal
+# can be successfully dereferenced to access the values inside the
+# structs.
+#
+# This test has a slightly larger array to better check that we calculate
+# offsets correctly. This exposed a bug in the glsl to tgsi pass in gallium
+# based drivers.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+void main()
+{
+  gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+struct Foo {
+  int value;
+
+  /* A second member of a differnt size ensures we calculate member offsets
+   * correctly.
+   */
+  ivec2 value2;
+};
+
+uniform int i;
+uniform ivec2 expected_value;
+
+void main()
+{
+  ivec2 actual_value = Foo[4](Foo(100, ivec2(200, 300)),
+  Foo(400, ivec2(500, 600)),
+  Foo(700, ivec2(800, 900)),
+  Foo(1000, ivec2(1100, 1200)))[i].value2;
+  if (actual_value == expected_value)
+gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[test]
+uniform int i 0
+uniform ivec2 expected_value 200 300
+draw rect -1 -1 1 1
+uniform int i 1
+uniform ivec2 expected_value 500 600
+draw rect 0 -1 1 1
+probe all rgba 0.0 1.0 0.0 1.0
+uniform int i 0
+uniform ivec2 expected_value 800 900
+draw rect -1 0 1 1
+uniform int i 1
+uniform ivec2 expected_value 1100 1200
+draw rect 0 0 1 1
+probe all rgba 0.0 1.0 0.0 1.0
diff --git 
a/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test
 
b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test
new file mode 100644
index 000..c7d0e3a
--- /dev/null
+++ 
b/tests/spec/glsl-1.20/execution/fs-deref-literal-array-of-structs-with-multiple-members.shader_test
@@ -0,0 +1,44 @@
+# Verify that an array of structs appearing in the shader as a literal
+# can be successfully dereferenced to access the values inside the
+# structs.
+
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+void main()
+{
+  gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+struct Foo {
+  int value;
+
+  /* A second member of a differnt size helps ensures we calculate member
+   * offsets correctly.
+   */
+  ivec2 value2;
+};
+
+uniform int i;
+uniform ivec2 expected_value;
+
+void main()
+{
+  ivec2 actual_value = Foo[2](Foo(100, ivec2(200, 300)),
+  Foo(400, ivec2(500, 600)))[i].value2;
+  if (actual_value == expected_value)
+gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+  else
+gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
+[test]
+uniform int 

[Piglit] [PATCH] ARB_blend_func_extended: set KHR_no_error status

2017-06-29 Thread Timothy Arceri
---
 .../api/bindfragdataindexed-invalid-parameters.c  |  1 +
 tests/spec/arb_blend_func_extended/api/blend-api.c|  1 +
 tests/spec/arb_blend_func_extended/api/builtins.c |  1 +
 .../spec/arb_blend_func_extended/api/error-at-begin.c |  1 +
 .../arb_blend_func_extended/api/getfragdataindex.c| 19 +++
 .../arb_blend_func_extended/api/output-location.c |  1 +
 .../execution/fbo-extended-blend-explicit.c   |  1 +
 .../execution/fbo-extended-blend-pattern.c|  1 +
 .../execution/fbo-extended-blend.c|  1 +
 9 files changed, 19 insertions(+), 8 deletions(-)

diff --git 
a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
 
b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
index c4a8d53..27ae062 100644
--- 
a/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
+++ 
b/tests/spec/arb_blend_func_extended/api/bindfragdataindexed-invalid-parameters.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 30;
 #endif
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_blend_func_extended/api/blend-api.c 
b/tests/spec/arb_blend_func_extended/api/blend-api.c
index 4c34bc7..9160862 100644
--- a/tests/spec/arb_blend_func_extended/api/blend-api.c
+++ b/tests/spec/arb_blend_func_extended/api/blend-api.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 20;
 #endif
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_blend_func_extended/api/builtins.c 
b/tests/spec/arb_blend_func_extended/api/builtins.c
index 7525244..f4eac95 100644
--- a/tests/spec/arb_blend_func_extended/api/builtins.c
+++ b/tests/spec/arb_blend_func_extended/api/builtins.c
@@ -27,6 +27,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_es_version = 20;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_blend_func_extended/api/error-at-begin.c 
b/tests/spec/arb_blend_func_extended/api/error-at-begin.c
index da09501..7acf333 100644
--- a/tests/spec/arb_blend_func_extended/api/error-at-begin.c
+++ b/tests/spec/arb_blend_func_extended/api/error-at-begin.c
@@ -38,6 +38,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/arb_blend_func_extended/api/getfragdataindex.c 
b/tests/spec/arb_blend_func_extended/api/getfragdataindex.c
index a30263e..3c0efd0 100644
--- a/tests/spec/arb_blend_func_extended/api/getfragdataindex.c
+++ b/tests/spec/arb_blend_func_extended/api/getfragdataindex.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 30;
 #endif
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
@@ -132,18 +133,20 @@ void piglit_init(int argc, char **argv)
 * OPERATION is generated. If name is not a varying out variable,
 * or if an error occurs, -1 will be returned."
 */
-   printf("Querying index before linking...\n");
+   if (!piglit_khr_no_error) {
+   printf("Querying index before linking...\n");
 #ifdef PIGLIT_USE_OPENGL
-   idx = glGetFragDataIndex(prog, "v");
+   idx = glGetFragDataIndex(prog, "v");
 #else // PIGLIT_USE_OPENGLES3
-   idx = glGetFragDataIndexEXT(prog, "v");
+   idx = glGetFragDataIndexEXT(prog, "v");
 #endif
-   if (!piglit_check_gl_error(GL_INVALID_OPERATION))
-   piglit_report_result(PIGLIT_FAIL);
+   if (!piglit_check_gl_error(GL_INVALID_OPERATION))
+   piglit_report_result(PIGLIT_FAIL);
 
-   if (idx != -1) {
-   fprintf(stderr, "Expected index = -1, got %d\n", idx);
-   piglit_report_result(PIGLIT_FAIL);
+   if (idx != -1) {
+   fprintf(stderr, "Expected index = -1, got %d\n", idx);
+   piglit_report_result(PIGLIT_FAIL);
+   }
}
 
glLinkProgram(prog);
diff --git a/tests/spec/arb_blend_func_extended/api/output-location.c 
b/tests/spec/arb_blend_func_extended/api/output-location.c
index 4d01818..dbda66f 100644
--- a/tests/spec/arb_blend_func_extended/api/output-location.c
+++ b/tests/spec/arb_blend_func_extended/api/output-location.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
   

[Piglit] [PATCH] gl-1.0: set KHR_no_error support for remaining gl-1.0 tests

2017-06-29 Thread Timothy Arceri
---
 tests/spec/gl-1.0/blend.c   |  1 +
 tests/spec/gl-1.0/dlist-bitmap.c|  1 +
 tests/spec/gl-1.0/dlist-shademodel.c|  1 +
 tests/spec/gl-1.0/drawpixels-color-index.c  |  1 +
 tests/spec/gl-1.0/edgeflag-const.c  |  1 +
 tests/spec/gl-1.0/edgeflag-quads.c  |  1 +
 tests/spec/gl-1.0/edgeflag.c|  1 +
 tests/spec/gl-1.0/fpexceptions.c|  1 +
 tests/spec/gl-1.0/front-invalidate-back.c   |  1 +
 tests/spec/gl-1.0/logicop.c |  1 +
 tests/spec/gl-1.0/long-dlist.c  |  1 +
 tests/spec/gl-1.0/no-op-paths.c | 15 ++-
 tests/spec/gl-1.0/orthpos.c |  1 +
 tests/spec/gl-1.0/polygon-line-aa.c |  1 +
 tests/spec/gl-1.0/push-no-attribs.c |  1 +
 tests/spec/gl-1.0/rastercolor.c |  1 +
 tests/spec/gl-1.0/readpix.c |  1 +
 tests/spec/gl-1.0/readpixels-oob.c  |  1 +
 tests/spec/gl-1.0/scissor-bitmap.c  |  1 +
 tests/spec/gl-1.0/scissor-clear.c   |  1 +
 tests/spec/gl-1.0/scissor-copypixels.c  |  1 +
 tests/spec/gl-1.0/scissor-depth-clear-negative-xy.c |  1 +
 tests/spec/gl-1.0/scissor-depth-clear.c |  1 +
 tests/spec/gl-1.0/scissor-many.c|  1 +
 tests/spec/gl-1.0/scissor-offscreen.c   |  1 +
 tests/spec/gl-1.0/scissor-polygon.c |  1 +
 tests/spec/gl-1.0/scissor-stencil-clear.c   |  1 +
 tests/spec/gl-1.0/simple-readbuffer.c   |  1 +
 tests/spec/gl-1.0/spot-light.c  |  1 +
 tests/spec/gl-1.0/swapbuffers-behavior.c|  1 +
 30 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/tests/spec/gl-1.0/blend.c b/tests/spec/gl-1.0/blend.c
index 68f3fc4..c1796a5 100644
--- a/tests/spec/gl-1.0/blend.c
+++ b/tests/spec/gl-1.0/blend.c
@@ -80,6 +80,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | 
PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/gl-1.0/dlist-bitmap.c b/tests/spec/gl-1.0/dlist-bitmap.c
index 203a9d9..512fde7 100644
--- a/tests/spec/gl-1.0/dlist-bitmap.c
+++ b/tests/spec/gl-1.0/dlist-bitmap.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
config.window_width = 900;
config.window_height = 300;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
diff --git a/tests/spec/gl-1.0/dlist-shademodel.c 
b/tests/spec/gl-1.0/dlist-shademodel.c
index 1be193f..9af4072 100644
--- a/tests/spec/gl-1.0/dlist-shademodel.c
+++ b/tests/spec/gl-1.0/dlist-shademodel.c
@@ -34,6 +34,7 @@
 PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
diff --git a/tests/spec/gl-1.0/drawpixels-color-index.c 
b/tests/spec/gl-1.0/drawpixels-color-index.c
index b9572a5..275d022 100644
--- a/tests/spec/gl-1.0/drawpixels-color-index.c
+++ b/tests/spec/gl-1.0/drawpixels-color-index.c
@@ -33,6 +33,7 @@
 PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
diff --git a/tests/spec/gl-1.0/edgeflag-const.c 
b/tests/spec/gl-1.0/edgeflag-const.c
index e3ea927..60fc00d 100644
--- a/tests/spec/gl-1.0/edgeflag-const.c
+++ b/tests/spec/gl-1.0/edgeflag-const.c
@@ -28,6 +28,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/gl-1.0/edgeflag-quads.c 
b/tests/spec/gl-1.0/edgeflag-quads.c
index dd8d4a2..0b0285f 100644
--- a/tests/spec/gl-1.0/edgeflag-quads.c
+++ b/tests/spec/gl-1.0/edgeflag-quads.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/spec/gl-1.0/edgeflag.c b/tests/spec/gl-1.0/edgeflag.c
index bd9845c..c9cfc77 100644
--- a/tests/spec/gl-1.0/edgeflag.c
+++ b/tests/spec/gl-1.0/edgeflag.c
@@ -33,6 +33,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   

[Piglit] [PATCH] bugs: set KHR_no_error support for remaining bugs tests

2017-06-28 Thread Timothy Arceri
---
 tests/bugs/crash-cubemap-order.c| 1 +
 tests/bugs/crash-texparameter-before-teximage.c | 1 +
 tests/bugs/drawbuffer-modes.c   | 1 +
 tests/bugs/fdo10370.c   | 1 +
 tests/bugs/fdo14575.c   | 1 +
 tests/bugs/fdo20701.c   | 1 +
 tests/bugs/fdo23489.c   | 1 +
 tests/bugs/fdo23670-depth_test.c| 1 +
 tests/bugs/fdo23670-drawpix_stencil.c   | 1 +
 tests/bugs/fdo24066.c   | 1 +
 tests/bugs/fdo25614-genmipmap.c | 1 +
 tests/bugs/fdo28551.c   | 1 +
 tests/bugs/fdo31934.c   | 1 +
 tests/bugs/point-sprite.c   | 1 +
 tests/bugs/r300-readcache.c | 1 +
 tests/bugs/tex1d-2dborder.c | 1 +
 tests/bugs/tri-tex-crash.c  | 1 +
 tests/bugs/vbo-buffer-unmap.c   | 1 +
 18 files changed, 18 insertions(+)

diff --git a/tests/bugs/crash-cubemap-order.c b/tests/bugs/crash-cubemap-order.c
index c6b3882..7b733be 100644
--- a/tests/bugs/crash-cubemap-order.c
+++ b/tests/bugs/crash-cubemap-order.c
@@ -13,6 +13,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/crash-texparameter-before-teximage.c 
b/tests/bugs/crash-texparameter-before-teximage.c
index 1842f81..0fd4a9e 100644
--- a/tests/bugs/crash-texparameter-before-teximage.c
+++ b/tests/bugs/crash-texparameter-before-teximage.c
@@ -14,6 +14,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/drawbuffer-modes.c b/tests/bugs/drawbuffer-modes.c
index 3fbda26..94d9796 100644
--- a/tests/bugs/drawbuffer-modes.c
+++ b/tests/bugs/drawbuffer-modes.c
@@ -42,6 +42,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
config.requires_displayed_window = true;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/fdo10370.c b/tests/bugs/fdo10370.c
index 7826543..322f94d 100644
--- a/tests/bugs/fdo10370.c
+++ b/tests/bugs/fdo10370.c
@@ -10,6 +10,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/fdo14575.c b/tests/bugs/fdo14575.c
index a6125dc..3215942 100644
--- a/tests/bugs/fdo14575.c
+++ b/tests/bugs/fdo14575.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/fdo20701.c b/tests/bugs/fdo20701.c
index b06d815..6f3c3f1 100644
--- a/tests/bugs/fdo20701.c
+++ b/tests/bugs/fdo20701.c
@@ -41,6 +41,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/fdo23489.c b/tests/bugs/fdo23489.c
index e1bd95c..848a190 100644
--- a/tests/bugs/fdo23489.c
+++ b/tests/bugs/fdo23489.c
@@ -12,6 +12,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_width = 250;
config.window_height = 250;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/fdo23670-depth_test.c b/tests/bugs/fdo23670-depth_test.c
index 86b792f..3e9dfad 100644
--- a/tests/bugs/fdo23670-depth_test.c
+++ b/tests/bugs/fdo23670-depth_test.c
@@ -31,6 +31,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB | 
PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git a/tests/bugs/fdo23670-drawpix_stencil.c 
b/tests/bugs/fdo23670-drawpix_stencil.c
index 95cd9ac..4dcb9e0 100644
--- a/tests/bugs/fdo23670-drawpix_stencil.c
+++ b/tests/bugs/fdo23670-drawpix_stencil.c
@@ -31,6 +31,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB | 
PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 

Re: [Piglit] [PATCH] ARB_point_parameters: port glean test pointatten to piglit

2017-06-28 Thread Timothy Arceri

Ping. Any comments on  this?

If not I'll probably push this soon as its one of the bigger bottle 
necks in my piglit runs.


On 21/06/17 10:33, Timothy Arceri wrote:

---
  tests/all.py   |   6 +-
  tests/glean/CMakeLists.gl.txt  |   1 -
  tests/glean/tpointatten.cpp| 294 -
  tests/glean/tpointatten.h  |  78 --
  tests/llvmpipe.py  |   1 -
  tests/spec/CMakeLists.txt  |   1 +
  tests/spec/arb_point_parameters/CMakeLists.gl.txt  |  13 +
  tests/spec/arb_point_parameters/CMakeLists.txt |   1 +
  .../spec/arb_point_parameters/point-attenuation.c  | 232 
  9 files changed, 252 insertions(+), 375 deletions(-)
  delete mode 100644 tests/glean/tpointatten.cpp
  delete mode 100644 tests/glean/tpointatten.h
  create mode 100644 tests/spec/arb_point_parameters/CMakeLists.gl.txt
  create mode 100644 tests/spec/arb_point_parameters/CMakeLists.txt
  create mode 100644 tests/spec/arb_point_parameters/point-attenuation.c

diff --git a/tests/all.py b/tests/all.py
index f0a7c05..9e19e1f 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -293,21 +293,20 @@ MSAA_SAMPLE_COUNTS = ['2', '4', '6', '8', '16', '32']
  
  with profile.test_list.group_manager(GleanTest, 'glean') as g:

  g('basic')
  g('api2')
  g('makeCurrent')
  g('bufferObject')
  g('depthStencil')
  g('fbo')
  g('getString')
  g('pixelFormats')
-g('pointAtten')
  g('pointSprite')
  # exactRGBA is not included intentionally, because it's too strict and
  # the equivalent functionality is covered by other tests
  g('shaderAPI')
  g('texCombine')
  g('texCube')
  g('texEnv')
  g('texgen')
  g('texCombine4')
  g('texture_srgb')
@@ -2232,20 +2231,25 @@ with profile.test_list.group_manager(
  grouptools.join('spec', 'ARB_occlusion_query')) as g:
  g(['occlusion_query'])
  g(['occlusion_query_conform'])
  g(['occlusion_query_lifetime'])
  g(['occlusion_query_meta_fragments'])
  g(['occlusion_query_meta_no_fragments'])
  g(['occlusion_query_meta_save'])
  g(['occlusion_query_order'])
  g(['gen_delete_while_active'])
  
+with profile.test_list.group_manager(

+PiglitGLTest,
+grouptools.join('spec', 'ARB_point_parameters')) as g:
+g(['arb_point_parameters-point-attenuation'])
+
  # Group ARB_separate_shader_objects
  with profile.test_list.group_manager(
  PiglitGLTest,
  grouptools.join('spec', 'ARB_separate_shader_objects')) as g:
  g(['arb_separate_shader_object-ActiveShaderProgram-invalid-program'],
'ActiveShaderProgram with invalid program')
  g(['arb_separate_shader_object-GetProgramPipelineiv'],
'GetProgramPipelineiv')
  g(['arb_separate_shader_object-dlist'], 'Display lists (Compat)')
  g(['arb_separate_shader_object-IsProgramPipeline'],
diff --git a/tests/glean/CMakeLists.gl.txt b/tests/glean/CMakeLists.gl.txt
index 576cde1..9bbf324 100644
--- a/tests/glean/CMakeLists.gl.txt
+++ b/tests/glean/CMakeLists.gl.txt
@@ -28,21 +28,20 @@ piglit_add_executable (glean
rc.cpp
tapi2.cpp
tbasic.cpp
tbinding.cpp
test.cpp
tfbo.cpp
tfragprog1.cpp
tglsl1.cpp
tmultitest.cpp
tpixelformats.cpp
-   tpointatten.cpp
tpointsprite.cpp
tshaderapi.cpp
ttexcombine.cpp
ttexcombine4.cpp
ttexcube.cpp
ttexenv.cpp
ttexgen.cpp
ttexture_srgb.cpp
ttexunits.cpp
tvertarraybgra.cpp
diff --git a/tests/glean/tpointatten.cpp b/tests/glean/tpointatten.cpp
deleted file mode 100644
index 49d9dac..000
--- a/tests/glean/tpointatten.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-// BEGIN_COPYRIGHT -*- glean -*-
-//
-// Copyright (C) 1999  Allen Akin   All Rights Reserved.
-//
-// 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 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 ALLEN AKIN BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF

Re: [Piglit] [PATCH] ext_packed_depth_stencil: set KHR_no_error compatibility

2017-06-27 Thread Timothy Arceri

On 28/06/17 00:20, Samuel Pitoiset wrote:


Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c | 1 +
  tests/spec/ext_packed_depth_stencil/errors.c| 8 ++--
  tests/spec/ext_packed_depth_stencil/getteximage.c   | 1 +
  tests/spec/ext_packed_depth_stencil/readdrawpixels.c| 1 +
  tests/spec/ext_packed_depth_stencil/readpixels-24_8.c   | 1 +
  tests/spec/ext_packed_depth_stencil/texsubimage.c   | 1 +
  6 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c 
b/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c
index 62f461a47..64c1893f6 100644
--- a/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c
+++ b/tests/spec/ext_packed_depth_stencil/depth-stencil-texture.c
@@ -53,6 +53,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  #endif
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGBA;

+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/ext_packed_depth_stencil/errors.c b/tests/spec/ext_packed_depth_stencil/errors.c

index 74d40cca8..d1e51c1e1 100644
--- a/tests/spec/ext_packed_depth_stencil/errors.c
+++ b/tests/spec/ext_packed_depth_stencil/errors.c
@@ -33,6 +33,8 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = (PIGLIT_GL_VISUAL_RGBA |
PIGLIT_GL_VISUAL_DEPTH |
PIGLIT_GL_VISUAL_STENCIL);
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
+
  PIGLIT_GL_TEST_CONFIG_END
  
  
@@ -93,8 +95,10 @@ piglit_init(int argc, char **argv)
  
  	piglit_require_extension("GL_EXT_packed_depth_stencil");
  
-	pass = test_drawpixels() && pass;

-   pass = test_readpixels() && pass;
+   if (!piglit_khr_no_error) {
+   pass = test_drawpixels() && pass;
+   pass = test_readpixels() && pass;
+   }


I'm not sure the 3rd test belongs here, but it's already there so:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

  
  	/* The EXT_packed_depth_stencil spec says:

 *
diff --git a/tests/spec/ext_packed_depth_stencil/getteximage.c 
b/tests/spec/ext_packed_depth_stencil/getteximage.c
index 2302e6f82..40a12af4c 100644
--- a/tests/spec/ext_packed_depth_stencil/getteximage.c
+++ b/tests/spec/ext_packed_depth_stencil/getteximage.c
@@ -37,6 +37,7 @@
  PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 12;
config.window_visual = PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  PIGLIT_GL_TEST_CONFIG_END
  
  
diff --git a/tests/spec/ext_packed_depth_stencil/readdrawpixels.c b/tests/spec/ext_packed_depth_stencil/readdrawpixels.c

index 10c8a6182..7be6664c5 100644
--- a/tests/spec/ext_packed_depth_stencil/readdrawpixels.c
+++ b/tests/spec/ext_packed_depth_stencil/readdrawpixels.c
@@ -33,6 +33,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.window_visual = (PIGLIT_GL_VISUAL_RGBA |
PIGLIT_GL_VISUAL_DEPTH |
PIGLIT_GL_VISUAL_STENCIL);
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  PIGLIT_GL_TEST_CONFIG_END
  
  
diff --git a/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c b/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c

index 7fb9ad8ac..db71dba8b 100644
--- a/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c
+++ b/tests/spec/ext_packed_depth_stencil/readpixels-24_8.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 10;

config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/ext_packed_depth_stencil/texsubimage.c b/tests/spec/ext_packed_depth_stencil/texsubimage.c

index 6b9a917ab..999d2e0bc 100644
--- a/tests/spec/ext_packed_depth_stencil/texsubimage.c
+++ b/tests/spec/ext_packed_depth_stencil/texsubimage.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 13;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  


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


Re: [Piglit] [PATCH] fbo: set KHR_no_error compatibility for remaining fbo tests

2017-06-27 Thread Timothy Arceri

On 27/06/17 17:58, Samuel Pitoiset wrote:




On 06/27/2017 02:19 AM, Timothy Arceri wrote:

On 26/06/17 19:04, Samuel Pitoiset wrote:


Looks like you forgot to update fbo-storage-formats.c.


It's updated. Did you mean something else?


I meant, there is a GL_INVALID_ENUM which is not handled correctly, no?

Ok, I see it this time. Thanks.







With that fixed, patch is:

Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>

Thanks!

On 06/26/2017 08:00 AM, Timothy Arceri wrote:

---
  tests/fbo/fbo-1d.c |  1 +
  tests/fbo/fbo-3d.c |  1 +
  tests/fbo/fbo-alpha.c  |  1 +
  tests/fbo/fbo-alphatest-formats.c  |  1 +
  tests/fbo/fbo-alphatest-nocolor-ff.c   |  1 +
  tests/fbo/fbo-alphatest-nocolor.c  |  1 +
  tests/fbo/fbo-array.c  |  1 +
  tests/fbo/fbo-bind-renderbuffer.c  |  9 --
  tests/fbo/fbo-blending-formats.c   |  1 +
  tests/fbo/fbo-blit-d24s8.c |  1 +
  tests/fbo/fbo-blit-stretch.cpp |  1 +
  tests/fbo/fbo-blit.c   |  1 +
  tests/fbo/fbo-clear-formats.c  |  1 +
  tests/fbo/fbo-clearmipmap.c|  1 +
  tests/fbo/fbo-colormask-formats.c  |  1 +
  tests/fbo/fbo-copypix.c|  1 +
  tests/fbo/fbo-copyteximage-simple.c|  1 +
  tests/fbo/fbo-copyteximage.c   |  1 +
  tests/fbo/fbo-cubemap.c|  1 +
  tests/fbo/fbo-depth-array.c|  1 +
  tests/fbo/fbo-depth-tex1d.c|  1 +
  tests/fbo/fbo-depth.c  |  1 +
  tests/fbo/fbo-depthtex.c   |  1 +
  tests/fbo/fbo-deriv.c  |  1 +
  tests/fbo/fbo-draw-buffers-blend.c |  1 +
  tests/fbo/fbo-drawbuffers-arbfp.c  |  1 +
  tests/fbo/fbo-drawbuffers-blend-add.c  |  1 +
  tests/fbo/fbo-drawbuffers-fragcolor.c  |  1 +
  tests/fbo/fbo-drawbuffers-maxtargets.c |  1 +
  tests/fbo/fbo-drawbuffers.c|  1 +
  tests/fbo/fbo-drawbuffers2-blend.c |  1 +
  tests/fbo/fbo-drawbuffers2-colormask.c |  1 +
  tests/fbo/fbo-finish-deleted.c |  1 +
  tests/fbo/fbo-flushing-2.c |  1 +
  tests/fbo/fbo-flushing.c   |  1 +
  tests/fbo/fbo-fragcoord.c  |  1 +
  tests/fbo/fbo-fragcoord2.c |  1 +
  tests/fbo/fbo-generatemipmap-filtering.c   |  1 +
  tests/fbo/fbo-generatemipmap-formats.c |  1 +
  tests/fbo/fbo-generatemipmap-noimage.c |  1 +
  tests/fbo/fbo-generatemipmap-nonsquare.c   |  1 +
  tests/fbo/fbo-generatemipmap-npot.c|  1 +
  tests/fbo/fbo-generatemipmap-scissor.c |  1 +
  tests/fbo/fbo-generatemipmap-swizzle.c |  1 +
  tests/fbo/fbo-generatemipmap-viewport.c|  1 +
  tests/fbo/fbo-generatemipmap.c |  1 +
  .../fbo/fbo-getframebufferattachmentparameter-01.c | 36 
+-

  tests/fbo/fbo-gl_pointcoord.c  |  1 +
  tests/fbo/fbo-incomplete-invalid-texture.c |  1 +
  tests/fbo/fbo-incomplete-texture-01.c  |  1 +
  tests/fbo/fbo-incomplete-texture-02.c  |  1 +
  tests/fbo/fbo-incomplete-texture-03.c  |  1 +
  tests/fbo/fbo-incomplete-texture-04.c  |  1 +
  tests/fbo/fbo-incomplete.cpp   |  1 +
  tests/fbo/fbo-integer.c|  1 +
  tests/fbo/fbo-luminance-alpha.c|  1 +
  tests/fbo/fbo-maxsize.c|  1 +
  tests/fbo/fbo-mipmap-copypix.c |  1 +
  tests/fbo/fbo-mrt-alphatest.c  |  1 +
  tests/fbo/fbo-mrt-new-bind.c   |  1 +
  tests/fbo/fbo-nodepth-test.c   |  1 +
  tests/fbo/fbo-nostencil-test.c |  1 +
  tests/fbo/fbo-pbo-readpixels-small.c   |  1 +
  tests/fbo/fbo-readdrawpix.c|  1 +
  tests/fbo/fbo-readpixels-depth-formats.c   |  1 +
  tests/fbo/fbo-readpixels.c |  1 +
  tests/fbo/fbo-rg.c |  1 +
  tests/fbo/fbo-scissor-bitmap.c |  1 +
  tests/fbo/fbo-scissor-blit.c   |  1 +
  tests/fbo/fbo-srgb.c   |  1 +
  tests/fbo/fbo-stencil.c|  1 +
  tests/fbo/fbo-storage-completeness.c   |  5 +--
  tests/fbo/fbo-storage-formats.c|  5 +--
  tests/fbo/fbo-sys-blit.c   |  1 +
  tests/fbo/fbo-s

Re: [Piglit] [PATCH] fbo: set KHR_no_error compatibility for remaining fbo tests

2017-06-26 Thread Timothy Arceri

On 26/06/17 19:04, Samuel Pitoiset wrote:


Looks like you forgot to update fbo-storage-formats.c.


It's updated. Did you mean something else?



With that fixed, patch is:

Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>

Thanks!

On 06/26/2017 08:00 AM, Timothy Arceri wrote:

---
  tests/fbo/fbo-1d.c |  1 +
  tests/fbo/fbo-3d.c |  1 +
  tests/fbo/fbo-alpha.c  |  1 +
  tests/fbo/fbo-alphatest-formats.c  |  1 +
  tests/fbo/fbo-alphatest-nocolor-ff.c   |  1 +
  tests/fbo/fbo-alphatest-nocolor.c  |  1 +
  tests/fbo/fbo-array.c  |  1 +
  tests/fbo/fbo-bind-renderbuffer.c  |  9 --
  tests/fbo/fbo-blending-formats.c   |  1 +
  tests/fbo/fbo-blit-d24s8.c |  1 +
  tests/fbo/fbo-blit-stretch.cpp |  1 +
  tests/fbo/fbo-blit.c   |  1 +
  tests/fbo/fbo-clear-formats.c  |  1 +
  tests/fbo/fbo-clearmipmap.c|  1 +
  tests/fbo/fbo-colormask-formats.c  |  1 +
  tests/fbo/fbo-copypix.c|  1 +
  tests/fbo/fbo-copyteximage-simple.c|  1 +
  tests/fbo/fbo-copyteximage.c   |  1 +
  tests/fbo/fbo-cubemap.c|  1 +
  tests/fbo/fbo-depth-array.c|  1 +
  tests/fbo/fbo-depth-tex1d.c|  1 +
  tests/fbo/fbo-depth.c  |  1 +
  tests/fbo/fbo-depthtex.c   |  1 +
  tests/fbo/fbo-deriv.c  |  1 +
  tests/fbo/fbo-draw-buffers-blend.c |  1 +
  tests/fbo/fbo-drawbuffers-arbfp.c  |  1 +
  tests/fbo/fbo-drawbuffers-blend-add.c  |  1 +
  tests/fbo/fbo-drawbuffers-fragcolor.c  |  1 +
  tests/fbo/fbo-drawbuffers-maxtargets.c |  1 +
  tests/fbo/fbo-drawbuffers.c|  1 +
  tests/fbo/fbo-drawbuffers2-blend.c |  1 +
  tests/fbo/fbo-drawbuffers2-colormask.c |  1 +
  tests/fbo/fbo-finish-deleted.c |  1 +
  tests/fbo/fbo-flushing-2.c |  1 +
  tests/fbo/fbo-flushing.c   |  1 +
  tests/fbo/fbo-fragcoord.c  |  1 +
  tests/fbo/fbo-fragcoord2.c |  1 +
  tests/fbo/fbo-generatemipmap-filtering.c   |  1 +
  tests/fbo/fbo-generatemipmap-formats.c |  1 +
  tests/fbo/fbo-generatemipmap-noimage.c |  1 +
  tests/fbo/fbo-generatemipmap-nonsquare.c   |  1 +
  tests/fbo/fbo-generatemipmap-npot.c|  1 +
  tests/fbo/fbo-generatemipmap-scissor.c |  1 +
  tests/fbo/fbo-generatemipmap-swizzle.c |  1 +
  tests/fbo/fbo-generatemipmap-viewport.c|  1 +
  tests/fbo/fbo-generatemipmap.c |  1 +
  .../fbo/fbo-getframebufferattachmentparameter-01.c | 36 
+-

  tests/fbo/fbo-gl_pointcoord.c  |  1 +
  tests/fbo/fbo-incomplete-invalid-texture.c |  1 +
  tests/fbo/fbo-incomplete-texture-01.c  |  1 +
  tests/fbo/fbo-incomplete-texture-02.c  |  1 +
  tests/fbo/fbo-incomplete-texture-03.c  |  1 +
  tests/fbo/fbo-incomplete-texture-04.c  |  1 +
  tests/fbo/fbo-incomplete.cpp   |  1 +
  tests/fbo/fbo-integer.c|  1 +
  tests/fbo/fbo-luminance-alpha.c|  1 +
  tests/fbo/fbo-maxsize.c|  1 +
  tests/fbo/fbo-mipmap-copypix.c |  1 +
  tests/fbo/fbo-mrt-alphatest.c  |  1 +
  tests/fbo/fbo-mrt-new-bind.c   |  1 +
  tests/fbo/fbo-nodepth-test.c   |  1 +
  tests/fbo/fbo-nostencil-test.c |  1 +
  tests/fbo/fbo-pbo-readpixels-small.c   |  1 +
  tests/fbo/fbo-readdrawpix.c|  1 +
  tests/fbo/fbo-readpixels-depth-formats.c   |  1 +
  tests/fbo/fbo-readpixels.c |  1 +
  tests/fbo/fbo-rg.c |  1 +
  tests/fbo/fbo-scissor-bitmap.c |  1 +
  tests/fbo/fbo-scissor-blit.c   |  1 +
  tests/fbo/fbo-srgb.c   |  1 +
  tests/fbo/fbo-stencil.c|  1 +
  tests/fbo/fbo-storage-completeness.c   |  5 +--
  tests/fbo/fbo-storage-formats.c|  5 +--
  tests/fbo/fbo-sys-blit.c   |  1 +
  tests/fbo/fbo-sys-sub-blit.c   |  1 +
  tests/fbo/fbo-viewport.c   |  1 +
  76 files changed, 105 insertions(+), 22 deletions(-)

diff --git a/tests/fbo/fbo-1d.c b/tests/fbo/fb

[Piglit] [PATCH] fbo: set KHR_no_error compatibility for remaining fbo tests

2017-06-26 Thread Timothy Arceri
---
 tests/fbo/fbo-1d.c |  1 +
 tests/fbo/fbo-3d.c |  1 +
 tests/fbo/fbo-alpha.c  |  1 +
 tests/fbo/fbo-alphatest-formats.c  |  1 +
 tests/fbo/fbo-alphatest-nocolor-ff.c   |  1 +
 tests/fbo/fbo-alphatest-nocolor.c  |  1 +
 tests/fbo/fbo-array.c  |  1 +
 tests/fbo/fbo-bind-renderbuffer.c  |  9 --
 tests/fbo/fbo-blending-formats.c   |  1 +
 tests/fbo/fbo-blit-d24s8.c |  1 +
 tests/fbo/fbo-blit-stretch.cpp |  1 +
 tests/fbo/fbo-blit.c   |  1 +
 tests/fbo/fbo-clear-formats.c  |  1 +
 tests/fbo/fbo-clearmipmap.c|  1 +
 tests/fbo/fbo-colormask-formats.c  |  1 +
 tests/fbo/fbo-copypix.c|  1 +
 tests/fbo/fbo-copyteximage-simple.c|  1 +
 tests/fbo/fbo-copyteximage.c   |  1 +
 tests/fbo/fbo-cubemap.c|  1 +
 tests/fbo/fbo-depth-array.c|  1 +
 tests/fbo/fbo-depth-tex1d.c|  1 +
 tests/fbo/fbo-depth.c  |  1 +
 tests/fbo/fbo-depthtex.c   |  1 +
 tests/fbo/fbo-deriv.c  |  1 +
 tests/fbo/fbo-draw-buffers-blend.c |  1 +
 tests/fbo/fbo-drawbuffers-arbfp.c  |  1 +
 tests/fbo/fbo-drawbuffers-blend-add.c  |  1 +
 tests/fbo/fbo-drawbuffers-fragcolor.c  |  1 +
 tests/fbo/fbo-drawbuffers-maxtargets.c |  1 +
 tests/fbo/fbo-drawbuffers.c|  1 +
 tests/fbo/fbo-drawbuffers2-blend.c |  1 +
 tests/fbo/fbo-drawbuffers2-colormask.c |  1 +
 tests/fbo/fbo-finish-deleted.c |  1 +
 tests/fbo/fbo-flushing-2.c |  1 +
 tests/fbo/fbo-flushing.c   |  1 +
 tests/fbo/fbo-fragcoord.c  |  1 +
 tests/fbo/fbo-fragcoord2.c |  1 +
 tests/fbo/fbo-generatemipmap-filtering.c   |  1 +
 tests/fbo/fbo-generatemipmap-formats.c |  1 +
 tests/fbo/fbo-generatemipmap-noimage.c |  1 +
 tests/fbo/fbo-generatemipmap-nonsquare.c   |  1 +
 tests/fbo/fbo-generatemipmap-npot.c|  1 +
 tests/fbo/fbo-generatemipmap-scissor.c |  1 +
 tests/fbo/fbo-generatemipmap-swizzle.c |  1 +
 tests/fbo/fbo-generatemipmap-viewport.c|  1 +
 tests/fbo/fbo-generatemipmap.c |  1 +
 .../fbo/fbo-getframebufferattachmentparameter-01.c | 36 +-
 tests/fbo/fbo-gl_pointcoord.c  |  1 +
 tests/fbo/fbo-incomplete-invalid-texture.c |  1 +
 tests/fbo/fbo-incomplete-texture-01.c  |  1 +
 tests/fbo/fbo-incomplete-texture-02.c  |  1 +
 tests/fbo/fbo-incomplete-texture-03.c  |  1 +
 tests/fbo/fbo-incomplete-texture-04.c  |  1 +
 tests/fbo/fbo-incomplete.cpp   |  1 +
 tests/fbo/fbo-integer.c|  1 +
 tests/fbo/fbo-luminance-alpha.c|  1 +
 tests/fbo/fbo-maxsize.c|  1 +
 tests/fbo/fbo-mipmap-copypix.c |  1 +
 tests/fbo/fbo-mrt-alphatest.c  |  1 +
 tests/fbo/fbo-mrt-new-bind.c   |  1 +
 tests/fbo/fbo-nodepth-test.c   |  1 +
 tests/fbo/fbo-nostencil-test.c |  1 +
 tests/fbo/fbo-pbo-readpixels-small.c   |  1 +
 tests/fbo/fbo-readdrawpix.c|  1 +
 tests/fbo/fbo-readpixels-depth-formats.c   |  1 +
 tests/fbo/fbo-readpixels.c |  1 +
 tests/fbo/fbo-rg.c |  1 +
 tests/fbo/fbo-scissor-bitmap.c |  1 +
 tests/fbo/fbo-scissor-blit.c   |  1 +
 tests/fbo/fbo-srgb.c   |  1 +
 tests/fbo/fbo-stencil.c|  1 +
 tests/fbo/fbo-storage-completeness.c   |  5 +--
 tests/fbo/fbo-storage-formats.c|  5 +--
 tests/fbo/fbo-sys-blit.c   |  1 +
 tests/fbo/fbo-sys-sub-blit.c   |  1 +
 tests/fbo/fbo-viewport.c   |  1 +
 76 files changed, 105 insertions(+), 22 deletions(-)

diff --git a/tests/fbo/fbo-1d.c b/tests/fbo/fbo-1d.c
index 63f36be..dfb9567 100644
--- a/tests/fbo/fbo-1d.c
+++ b/tests/fbo/fbo-1d.c
@@ -40,6 +40,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_DEPTH;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
diff --git 

Re: [Piglit] [PATCH 3/3] arb_viewport_array: set KHR_no_error compatibility

2017-06-24 Thread Timothy Arceri

Thanks! Series:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 24/06/17 00:23, Samuel Pitoiset wrote:

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/spec/arb_viewport_array/bounds.c | 53 --
  tests/spec/arb_viewport_array/clear.c  |  1 +
  .../spec/arb_viewport_array/depth_range_indices.c  | 45 +-
  tests/spec/arb_viewport_array/minmax.c |  1 +
  tests/spec/arb_viewport_array/queries.c| 31 +++--
  tests/spec/arb_viewport_array/render_depthrange.c  |  1 +
  tests/spec/arb_viewport_array/render_scissor.c |  1 +
  tests/spec/arb_viewport_array/render_viewport.c|  1 +
  tests/spec/arb_viewport_array/render_viewport_2.c  |  1 +
  tests/spec/arb_viewport_array/scissor_check.c  |  1 +
  tests/spec/arb_viewport_array/scissor_indices.c| 28 +++-
  tests/spec/arb_viewport_array/viewport_indices.c   | 52 +++--
  12 files changed, 122 insertions(+), 94 deletions(-)

diff --git a/tests/spec/arb_viewport_array/bounds.c 
b/tests/spec/arb_viewport_array/bounds.c
index 9a8e8697d..8d43e9f97 100644
--- a/tests/spec/arb_viewport_array/bounds.c
+++ b/tests/spec/arb_viewport_array/bounds.c
@@ -37,6 +37,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 31;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
@@ -116,18 +117,20 @@ viewport_bounds(GLint maxVP)
  
  	pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
  
-	/* negative width, height gives gl error */

-   vp[2] = -10.3;
-   vp[3] = 0.0;
-   for (i = 0; i < 2; i++) {
-   glViewportArrayv(0, 1, vp);
-   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-   glViewportIndexedf(1, vp[0], vp[1], vp[2], vp[3]);
-   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-   glViewportIndexedfv(2, vp);
-   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-   vp[2] = 5.0;
-   vp[3] = -12345.7;
+   if (!piglit_khr_no_error) {
+   /* negative width, height gives gl error */
+   vp[2] = -10.3;
+   vp[3] = 0.0;
+   for (i = 0; i < 2; i++) {
+   glViewportArrayv(0, 1, vp);
+   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+   glViewportIndexedf(1, vp[0], vp[1], vp[2], vp[3]);
+   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+   glViewportIndexedfv(2, vp);
+   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+   vp[2] = 5.0;
+   vp[3] = -12345.7;
+   }
}
  
  	return pass;

@@ -232,18 +235,20 @@ scissor_bounds(GLint maxVP)
glScissorIndexed(0, 0x8000, 0x8000, 0x7, 0x7fff);
pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
  
-	/* negative width, height gives gl error */

-   sc[2] = -10;
-   sc[3] = 0;
-   for (i = 0; i < 2; i++) {
-   glScissorArrayv(0, 1, sc);
-   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-   glScissorIndexed(1, sc[0], sc[1], sc[2], sc[3]);
-   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-   glScissorIndexedv(2, sc);
-   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-   sc[2] = 5;
-   sc[3] = -12345;
+   if (!piglit_khr_no_error) {
+   /* negative width, height gives gl error */
+   sc[2] = -10;
+   sc[3] = 0;
+   for (i = 0; i < 2; i++) {
+   glScissorArrayv(0, 1, sc);
+   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+   glScissorIndexed(1, sc[0], sc[1], sc[2], sc[3]);
+   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+   glScissorIndexedv(2, sc);
+   pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+   sc[2] = 5;
+   sc[3] = -12345;
+   }
}
  
  	return pass;

diff --git a/tests/spec/arb_viewport_array/clear.c 
b/tests/spec/arb_viewport_array/clear.c
index aee9bcab9..3d6200cc6 100644
--- a/tests/spec/arb_viewport_array/clear.c
+++ b/tests/spec/arb_viewport_array/clear.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
config.supports_gl_es_version = 31;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  

[Piglit] [PATCH] ARB_point_parameters: port glean test pointatten to piglit

2017-06-20 Thread Timothy Arceri
---
 tests/all.py   |   6 +-
 tests/glean/CMakeLists.gl.txt  |   1 -
 tests/glean/tpointatten.cpp| 294 -
 tests/glean/tpointatten.h  |  78 --
 tests/llvmpipe.py  |   1 -
 tests/spec/CMakeLists.txt  |   1 +
 tests/spec/arb_point_parameters/CMakeLists.gl.txt  |  13 +
 tests/spec/arb_point_parameters/CMakeLists.txt |   1 +
 .../spec/arb_point_parameters/point-attenuation.c  | 232 
 9 files changed, 252 insertions(+), 375 deletions(-)
 delete mode 100644 tests/glean/tpointatten.cpp
 delete mode 100644 tests/glean/tpointatten.h
 create mode 100644 tests/spec/arb_point_parameters/CMakeLists.gl.txt
 create mode 100644 tests/spec/arb_point_parameters/CMakeLists.txt
 create mode 100644 tests/spec/arb_point_parameters/point-attenuation.c

diff --git a/tests/all.py b/tests/all.py
index f0a7c05..9e19e1f 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -293,21 +293,20 @@ MSAA_SAMPLE_COUNTS = ['2', '4', '6', '8', '16', '32']
 
 with profile.test_list.group_manager(GleanTest, 'glean') as g:
 g('basic')
 g('api2')
 g('makeCurrent')
 g('bufferObject')
 g('depthStencil')
 g('fbo')
 g('getString')
 g('pixelFormats')
-g('pointAtten')
 g('pointSprite')
 # exactRGBA is not included intentionally, because it's too strict and
 # the equivalent functionality is covered by other tests
 g('shaderAPI')
 g('texCombine')
 g('texCube')
 g('texEnv')
 g('texgen')
 g('texCombine4')
 g('texture_srgb')
@@ -2232,20 +2231,25 @@ with profile.test_list.group_manager(
 grouptools.join('spec', 'ARB_occlusion_query')) as g:
 g(['occlusion_query'])
 g(['occlusion_query_conform'])
 g(['occlusion_query_lifetime'])
 g(['occlusion_query_meta_fragments'])
 g(['occlusion_query_meta_no_fragments'])
 g(['occlusion_query_meta_save'])
 g(['occlusion_query_order'])
 g(['gen_delete_while_active'])
 
+with profile.test_list.group_manager(
+PiglitGLTest,
+grouptools.join('spec', 'ARB_point_parameters')) as g:
+g(['arb_point_parameters-point-attenuation'])
+
 # Group ARB_separate_shader_objects
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ARB_separate_shader_objects')) as g:
 g(['arb_separate_shader_object-ActiveShaderProgram-invalid-program'],
   'ActiveShaderProgram with invalid program')
 g(['arb_separate_shader_object-GetProgramPipelineiv'],
   'GetProgramPipelineiv')
 g(['arb_separate_shader_object-dlist'], 'Display lists (Compat)')
 g(['arb_separate_shader_object-IsProgramPipeline'],
diff --git a/tests/glean/CMakeLists.gl.txt b/tests/glean/CMakeLists.gl.txt
index 576cde1..9bbf324 100644
--- a/tests/glean/CMakeLists.gl.txt
+++ b/tests/glean/CMakeLists.gl.txt
@@ -28,21 +28,20 @@ piglit_add_executable (glean
rc.cpp
tapi2.cpp
tbasic.cpp
tbinding.cpp
test.cpp
tfbo.cpp
tfragprog1.cpp
tglsl1.cpp
tmultitest.cpp
tpixelformats.cpp
-   tpointatten.cpp
tpointsprite.cpp
tshaderapi.cpp
ttexcombine.cpp
ttexcombine4.cpp
ttexcube.cpp
ttexenv.cpp
ttexgen.cpp
ttexture_srgb.cpp
ttexunits.cpp
tvertarraybgra.cpp
diff --git a/tests/glean/tpointatten.cpp b/tests/glean/tpointatten.cpp
deleted file mode 100644
index 49d9dac..000
--- a/tests/glean/tpointatten.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-// BEGIN_COPYRIGHT -*- glean -*-
-//
-// Copyright (C) 1999  Allen Akin   All Rights Reserved.
-//
-// 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 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 ALLEN AKIN 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.
-//
-// END_COPYRIGHT
-
-// tpointatten.h:  Test GL_ARB_point_parameters extension.
-// Brian Paul  6 October 2005
-
-
-#include "tpointatten.h"
-#include 

Re: [Piglit] [PATCH 3/3] arb_gpu_shader5: interpolateAt* must reject inputs in structs

2017-06-18 Thread Timothy Arceri

Can we add a spec quote to these? Otherwise series:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 17/06/17 06:34, Nicolai Hähnle wrote:

From: Nicolai Hähnle <nicolai.haeh...@amd.com>

---
  .../fs-interpolateAtCentroid-struct.frag| 17 +
  .../fs-interpolateAtOffset-struct.frag  | 17 +
  .../fs-interpolateAtSampler-struct.frag | 17 +
  3 files changed, 51 insertions(+)
  create mode 100644 
tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtCentroid-struct.frag
  create mode 100644 
tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtOffset-struct.frag
  create mode 100644 
tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtSampler-struct.frag

diff --git 
a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtCentroid-struct.frag
 
b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtCentroid-struct.frag
new file mode 100644
index 000..453c2db
--- /dev/null
+++ 
b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtCentroid-struct.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// [end config]
+
+#version 150
+#extension GL_ARB_gpu_shader5: require
+
+in struct {
+   vec4 a;
+} a;
+
+void main()
+{
+   interpolateAtCentroid(a.a);
+}
diff --git 
a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtOffset-struct.frag
 
b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtOffset-struct.frag
new file mode 100644
index 000..9b7ee7e
--- /dev/null
+++ 
b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtOffset-struct.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// [end config]
+
+#version 150
+#extension GL_ARB_gpu_shader5: require
+
+in struct {
+   vec4 a;
+} a;
+
+void main()
+{
+   interpolateAtOffset(a.a, vec2(0));
+}
diff --git 
a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtSampler-struct.frag
 
b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtSampler-struct.frag
new file mode 100644
index 000..78a844e
--- /dev/null
+++ 
b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/fs-interpolateAtSampler-struct.frag
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_gpu_shader5
+// [end config]
+
+#version 150
+#extension GL_ARB_gpu_shader5: require
+
+in struct {
+   vec4 a;
+} a;
+
+void main()
+{
+   interpolateAtSample(a.a, 0);
+}


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


Re: [Piglit] [PATCH] arb_bindless_texture: set KHR_no_error compatibility

2017-06-15 Thread Timothy Arceri

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 10/06/17 00:27, Samuel Pitoiset wrote:

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/spec/arb_bindless_texture/border-color.c   |  7 +++
  tests/spec/arb_bindless_texture/conversions.c|  1 +
  tests/spec/arb_bindless_texture/errors.c |  1 +
  tests/spec/arb_bindless_texture/handles.c| 16 
  tests/spec/arb_bindless_texture/illegal.c|  1 +
  tests/spec/arb_bindless_texture/legal.c  |  1 +
  tests/spec/arb_bindless_texture/limit.c  |  1 +
  tests/spec/arb_bindless_texture/uint64_attribs.c |  1 +
  tests/spec/arb_bindless_texture/uniform.c| 13 +
  9 files changed, 42 insertions(+)

diff --git a/tests/spec/arb_bindless_texture/border-color.c 
b/tests/spec/arb_bindless_texture/border-color.c
index 2cd37ade2..da366a19e 100644
--- a/tests/spec/arb_bindless_texture/border-color.c
+++ b/tests/spec/arb_bindless_texture/border-color.c
@@ -48,6 +48,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
piglit_config = 
config.supports_gl_compat_version = 33;
config.supports_gl_core_version = 33;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
@@ -91,6 +92,9 @@ check_invalid_integer_border_colors(void *data)

GLuint sampler, texture;
GLint i;
  
+	if (piglit_khr_no_error)

+   return PIGLIT_SKIP;
+
texture = piglit_integer_texture(GL_RGBA32I, 16, 16, 0, 0);
sampler = new_sampler();
glBindTexture(GL_TEXTURE_2D, 0);
@@ -147,6 +151,9 @@ check_invalid_float_border_colors(void *data)
GLuint sampler, texture;
GLint i;
  
+	if (piglit_khr_no_error)

+   return PIGLIT_SKIP;
+
texture = piglit_rgbw_texture(GL_RGBA32F, 16, 16, GL_FALSE, GL_FALSE,
  GL_UNSIGNED_NORMALIZED);
sampler = new_sampler();
diff --git a/tests/spec/arb_bindless_texture/conversions.c 
b/tests/spec/arb_bindless_texture/conversions.c
index 4d5f83a6c..7947a73be 100644
--- a/tests/spec/arb_bindless_texture/conversions.c
+++ b/tests/spec/arb_bindless_texture/conversions.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
piglit_config = 
config.supports_gl_core_version = 33;
config.supports_gl_compat_version = 33;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_bindless_texture/errors.c b/tests/spec/arb_bindless_texture/errors.c

index d80ba26d0..fa66c9f2c 100644
--- a/tests/spec/arb_bindless_texture/errors.c
+++ b/tests/spec/arb_bindless_texture/errors.c
@@ -35,6 +35,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
piglit_config = 
config.supports_gl_compat_version = 33;
config.supports_gl_core_version = 33;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_bindless_texture/handles.c b/tests/spec/arb_bindless_texture/handles.c

index eafb4e569..054fccb03 100644
--- a/tests/spec/arb_bindless_texture/handles.c
+++ b/tests/spec/arb_bindless_texture/handles.c
@@ -36,6 +36,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
piglit_config = 
config.supports_gl_compat_version = 33;
config.supports_gl_core_version = 33;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
@@ -45,6 +46,9 @@ check_GetTextureHandle_zero_handle(void *data)

bool pass = true;
GLuint64 handle;
  
+	if (piglit_khr_no_error)

+   return PIGLIT_SKIP;
+
/* The ARB_bindless_texture spec says:
 *
 * "If an error occurs, a handle of zero is returned."
@@ -173,6 +177,9 @@ delete_texture_sampler_while_handle_is_allocated(void *data)
GLuint texture, sampler;
GLuint64 handle;
  
+	if (piglit_khr_no_error)

+   return PIGLIT_SKIP;
+
/* The ARB_bindless_texture spec says:
 *
 * "(5) Is there a way to release a texture or image handle after it
@@ -222,6 +229,9 @@ delete_texture_sampler_while_handle_is_resident(void *data)
GLuint64 handle;
GLboolean ret;
  
+	if (piglit_khr_no_error)

+   return PIGLIT_SKIP;
+
/* The ARB_bindless_texture_spec says:
 *
 * "(7) What happens if you try to delete a texture or sampler object
@@ -288,6 +298,9 @@ check_GetImageHandle_zero_handle(void *data)
if (!piglit_is_extension_supported("GL_ARB_shader_image_load_store"))
return PIGLIT_SKIP;
  
+	if (piglit_khr_no_error)

+   return PIGLIT_SKIP;
+
/* The ARB_bindless_texture spec says:
 *
 * "A 64-bit unsigned integer handle is returned if the command
@@ -411,6 +424,9 @@ delete_texture_while_image_handle_resident(void *data)
if (!piglit_is_extension_supported("GL_ARB_shader_image_load_store"))
   

Re: [Piglit] Status of Glean test rewrites?

2017-06-14 Thread Timothy Arceri

On 15/06/17 10:57, Dylan Baker wrote:

I have (a now fairly old) series to port either the arb fp or vp tests to
shader_runner on the list. I have no idea how much work they'd need to land, or
if they're really relavent.

Ian had patches (I have no idea how far done) to generate arb_fp and arb_vp
tests which would superscede both glean and my work. I don't think those patches
ever went to the list or how much work was remaining.


They seem mostly ok, and I'd been keen to land them but there are 
comments about changing the input/output values that were never addressed.


Was there any reason for not sending a new series? As far as I can see 
it shouldn't be too much work to get these commit worthy.





Dylan

Quoting Timothy Arceri (2017-06-14 17:48:24)

Hi All,

I recently got a cpu with more than 2 cores \o/ and it's become even
more obvious just how much of a bottle neck the glean tests are.

Anyway what is the currently status of the rewrite? Have all the current
patches landed or are there still patchs waiting review/yet to be finished?

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

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


[Piglit] Status of Glean test rewrites?

2017-06-14 Thread Timothy Arceri

Hi All,

I recently got a cpu with more than 2 cores \o/ and it's become even 
more obvious just how much of a bottle neck the glean tests are.


Anyway what is the currently status of the rewrite? Have all the current 
patches landed or are there still patchs waiting review/yet to be finished?


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


Re: [Piglit] [PATCH 3/4] texturing/tex3d-maxsize: set KHR_no_error status

2017-06-04 Thread Timothy Arceri

On 05/06/17 10:19, Timothy Arceri wrote:

---
  tests/texturing/tex3d-maxsize.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/tests/texturing/tex3d-maxsize.c b/tests/texturing/tex3d-maxsize.c
index 60c9c63..781ac27 100644
--- a/tests/texturing/tex3d-maxsize.c
+++ b/tests/texturing/tex3d-maxsize.c
@@ -26,20 +26,21 @@
   * Tests 3D textures.
   */
  
  #include "piglit-util-gl.h"
  
  PIGLIT_GL_TEST_CONFIG_BEGIN
  
  	config.supports_gl_compat_version = 12;
  
  	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;

+   config.khr_no_error_support = PIGLIT_NO_ERRORS


There is a missing ; here. Fixed locally.

  
  PIGLIT_GL_TEST_CONFIG_END
  
  
  static GLint MaxSize;
  
  
  
  /**

   * Compute size (in megabytes) of a texture of the given dimensions and


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


[Piglit] [PATCH 4/4] TexSubImage1D tests: set KHR_no_error status

2017-06-04 Thread Timothy Arceri
---
 tests/fbo/fbo-generatemipmap-1d.c  | 1 +
 tests/spec/arb_texture_view/lifetime_format.c  | 1 +
 tests/spec/arb_texture_view/rendering_target.c | 1 +
 tests/texturing/max-texture-size.c | 1 +
 tests/texturing/teximage-errors.c  | 1 +
 5 files changed, 5 insertions(+)

diff --git a/tests/fbo/fbo-generatemipmap-1d.c 
b/tests/fbo/fbo-generatemipmap-1d.c
index 8561bb1..8aab390 100644
--- a/tests/fbo/fbo-generatemipmap-1d.c
+++ b/tests/fbo/fbo-generatemipmap-1d.c
@@ -31,20 +31,21 @@
 #include "piglit-util-gl.h"
 
 #define TEX_SIZE 128
 #define TEX_LEVELS 8
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 20;
 
config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char *fs_1d =
"uniform sampler1D tex; \n"
"void main() \n"
"{ \n"
"   gl_FragColor = texture1D(tex, gl_TexCoord[0].x); \n"
"} \n";
 
diff --git a/tests/spec/arb_texture_view/lifetime_format.c 
b/tests/spec/arb_texture_view/lifetime_format.c
index 2879c03..62f3dd0 100644
--- a/tests/spec/arb_texture_view/lifetime_format.c
+++ b/tests/spec/arb_texture_view/lifetime_format.c
@@ -31,20 +31,21 @@
 
 #include "piglit-util-gl.h"
 #include "common.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 15;
config.supports_gl_core_version = 31;
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 /* Texture formats. The format_list variable has these fields: */
 struct format_desc {
const char  *name;
GLenum  internalfmt;
GLenum  storagefmt;
GLenum  imagefmt;
GLenum  imagetype;
diff --git a/tests/spec/arb_texture_view/rendering_target.c 
b/tests/spec/arb_texture_view/rendering_target.c
index af050b2..44a6a3f 100644
--- a/tests/spec/arb_texture_view/rendering_target.c
+++ b/tests/spec/arb_texture_view/rendering_target.c
@@ -31,20 +31,21 @@
 
 #include "piglit-util-gl.h"
 #include "common.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 30;
config.supports_gl_es_version = 31;
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char *TestName = "arb_texture_view-rendering-target";
 static int prog3D, prog2Darray, prog2D, prog1D;
 
 /**
  * Simple views  of textures; test rendering with various texture view targets
  */
 static bool
diff --git a/tests/texturing/max-texture-size.c 
b/tests/texturing/max-texture-size.c
index e9f5c6b..4dc97f2 100644
--- a/tests/texturing/max-texture-size.c
+++ b/tests/texturing/max-texture-size.c
@@ -42,20 +42,21 @@
  */
 
 #include "piglit-util-gl.h"
 #define COLOR_COMPONENTS 4 /*GL_RGBA*/
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const GLenum target[] = {
GL_TEXTURE_1D,
GL_TEXTURE_2D,
GL_TEXTURE_RECTANGLE,
GL_TEXTURE_CUBE_MAP,
GL_TEXTURE_3D,
 };
diff --git a/tests/texturing/teximage-errors.c 
b/tests/texturing/teximage-errors.c
index fe95c82..444ef34 100644
--- a/tests/texturing/teximage-errors.c
+++ b/tests/texturing/teximage-errors.c
@@ -27,20 +27,21 @@
  * Tests glTexImage functions for invalid values, error reporting.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 10;
config.supports_gl_core_version = 31;
config.window_visual = PIGLIT_GL_VISUAL_RGB;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 struct format_desc {
GLenum internalformat;
GLenum format;
GLenum type;
 };
 
 static const struct format_desc formats_allowed[] = {
-- 
2.9.4

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


[Piglit] [PATCH 3/4] texturing/tex3d-maxsize: set KHR_no_error status

2017-06-04 Thread Timothy Arceri
---
 tests/texturing/tex3d-maxsize.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/texturing/tex3d-maxsize.c b/tests/texturing/tex3d-maxsize.c
index 60c9c63..781ac27 100644
--- a/tests/texturing/tex3d-maxsize.c
+++ b/tests/texturing/tex3d-maxsize.c
@@ -26,20 +26,21 @@
  * Tests 3D textures.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 12;
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS
 
 PIGLIT_GL_TEST_CONFIG_END
 
 
 static GLint MaxSize;
 
 
 
 /**
  * Compute size (in megabytes) of a texture of the given dimensions and
-- 
2.9.4

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


[Piglit] [PATCH 1/4] ARB_invalidate_subdata: set KHR_no_error status

2017-06-04 Thread Timothy Arceri
---
 tests/spec/arb_invalidate_subdata/buffer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/arb_invalidate_subdata/buffer.c 
b/tests/spec/arb_invalidate_subdata/buffer.c
index 637596a..dedb937 100644
--- a/tests/spec/arb_invalidate_subdata/buffer.c
+++ b/tests/spec/arb_invalidate_subdata/buffer.c
@@ -28,20 +28,21 @@
  * No-op is a conforming implementation of glInvalidateBuffer(Sub)Data, so
  * this test only checks error conditions.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_core_version = 31;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 /*
  * Section 6.5 (Invalidating Buffer Data) of the OpenGL 4.5 (Compatibility
  * Profile) spec:
  *
  * * An INVALID_VALUE error is generated if buffer is zero or is not the
  * name of an existing buffer object.
  * * An INVALID_VALUE error is generated if offset or length is negative,
-- 
2.9.4

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


[Piglit] [PATCH 2/4] gl-3.2/layered-rendering: set KHR_no_error status

2017-06-04 Thread Timothy Arceri
---
 tests/spec/gl-3.2/layered-rendering/blit.c |  1 +
 tests/spec/gl-3.2/layered-rendering/clear-color-all-types.c|  1 +
 .../layered-rendering/clear-color-mismatched-layer-count.c |  1 +
 tests/spec/gl-3.2/layered-rendering/clear-color.c  |  1 +
 tests/spec/gl-3.2/layered-rendering/clear-depth.c  |  1 +
 .../layered-rendering/framebuffer-layer-attachment-mismatch.c  |  1 +
 .../spec/gl-3.2/layered-rendering/framebuffer-layer-complete.c |  1 +
 .../layered-rendering/framebuffer-layer-count-mismatch.c   |  1 +
 .../gl-3.2/layered-rendering/framebuffer-layered-attachments.c |  1 +
 .../layered-rendering/framebuffertexture-buffer-textures.c | 10 +++---
 .../gl-3.2/layered-rendering/framebuffertexture-defaults.c |  1 +
 tests/spec/gl-3.2/layered-rendering/framebuffertexture.c   |  1 +
 tests/spec/gl-3.2/layered-rendering/gl-layer-cube-map.c|  1 +
 tests/spec/gl-3.2/layered-rendering/gl-layer-not-layered.c |  1 +
 tests/spec/gl-3.2/layered-rendering/gl-layer-render-clipped.c  |  1 +
 tests/spec/gl-3.2/layered-rendering/gl-layer-render-storage.c  |  1 +
 tests/spec/gl-3.2/layered-rendering/gl-layer-render.c  |  1 +
 tests/spec/gl-3.2/layered-rendering/gl-layer.c |  1 +
 tests/spec/gl-3.2/layered-rendering/readpixels.c   |  1 +
 19 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/tests/spec/gl-3.2/layered-rendering/blit.c 
b/tests/spec/gl-3.2/layered-rendering/blit.c
index e5d865e..db17124 100644
--- a/tests/spec/gl-3.2/layered-rendering/blit.c
+++ b/tests/spec/gl-3.2/layered-rendering/blit.c
@@ -49,20 +49,21 @@
  *   *---*---*
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 /* Values Set in piglit init */
 static const int texWidth  = 32;
 static const int texHeight = 32;
 static const int texDepth  = 2;
 
 static const float srcColors[2][3] = {
{0.5, 0.4, 0.3}, {0, 1, 0}
diff --git a/tests/spec/gl-3.2/layered-rendering/clear-color-all-types.c 
b/tests/spec/gl-3.2/layered-rendering/clear-color-all-types.c
index 403bc04..bc1d0fd 100644
--- a/tests/spec/gl-3.2/layered-rendering/clear-color-all-types.c
+++ b/tests/spec/gl-3.2/layered-rendering/clear-color-all-types.c
@@ -64,20 +64,21 @@
 
 #define TEX_LEVELS 6
 #define TEX_SIZE (1 << (TEX_LEVELS - 1))
 #define TEX_DEPTH 4
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 
 static GLenum texture_type;
 static int num_layers;
 static int layer_height;
 static GLuint probe_fbo = 0;
 static bool mipmapped;
 static int num_miplevels;
diff --git 
a/tests/spec/gl-3.2/layered-rendering/clear-color-mismatched-layer-count.c 
b/tests/spec/gl-3.2/layered-rendering/clear-color-mismatched-layer-count.c
index 63a43f3..d9b2cd5 100644
--- a/tests/spec/gl-3.2/layered-rendering/clear-color-mismatched-layer-count.c
+++ b/tests/spec/gl-3.2/layered-rendering/clear-color-mismatched-layer-count.c
@@ -47,20 +47,21 @@
 #include "piglit-util-gl.h"
 #include "piglit-util.h"
 
 #define TEX_SIZE 128
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version = 32;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 
 static void
 check_completeness(const char *when, GLenum target)
 {
GLenum fbstatus = glCheckFramebufferStatus(target);
if (fbstatus != GL_FRAMEBUFFER_COMPLETE) {
printf("Framebuffer incomplete when %s: %s\n", when,
diff --git a/tests/spec/gl-3.2/layered-rendering/clear-color.c 
b/tests/spec/gl-3.2/layered-rendering/clear-color.c
index 31233e3..32572b0 100644
--- a/tests/spec/gl-3.2/layered-rendering/clear-color.c
+++ b/tests/spec/gl-3.2/layered-rendering/clear-color.c
@@ -43,20 +43,21 @@
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.supports_gl_compat_version = 32;
config.supports_gl_core_version = 32;
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+   config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static GLuint fbo[2];
 static GLuint texture[2];
 static const int layers = 3;
 
 bool
 display_layered_texture(int x, int y, int w, int h, int texWidth, int 
texHeight,
GLenum textureType, GLuint texture, int layers) {
diff --git a/tests/spec/gl-3.2/layered-rendering/clear-depth.c 

Re: [Piglit] [PATCH] arb_shader_image_load_store: set KHR_no_error compatibility

2017-05-30 Thread Timothy Arceri

Looks good to me:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

On 26/05/17 06:21, Samuel Pitoiset wrote:

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  tests/spec/arb_shader_image_load_store/atomicity.c  | 1 +
  tests/spec/arb_shader_image_load_store/bitcast.c| 1 +
  tests/spec/arb_shader_image_load_store/coherency.c  | 1 +
  tests/spec/arb_shader_image_load_store/dead-fragments.c | 1 +
  tests/spec/arb_shader_image_load_store/early-z.c| 1 +
  tests/spec/arb_shader_image_load_store/host-mem-barrier.c   | 1 +
  tests/spec/arb_shader_image_load_store/indexing.c   | 1 +
  tests/spec/arb_shader_image_load_store/invalid.c| 1 +
  tests/spec/arb_shader_image_load_store/layer.c  | 1 +
  tests/spec/arb_shader_image_load_store/level.c  | 1 +
  tests/spec/arb_shader_image_load_store/max-images.c | 1 +
  tests/spec/arb_shader_image_load_store/max-size.c   | 1 +
  tests/spec/arb_shader_image_load_store/minmax.c | 1 +
  tests/spec/arb_shader_image_load_store/qualifiers.c | 1 +
  tests/spec/arb_shader_image_load_store/restrict.c   | 1 +
  tests/spec/arb_shader_image_load_store/semantics.c  | 1 +
  tests/spec/arb_shader_image_load_store/shader-mem-barrier.c | 1 +
  tests/spec/arb_shader_image_load_store/state.c  | 1 +
  tests/spec/arb_shader_image_load_store/unused.c | 1 +
  19 files changed, 19 insertions(+)

diff --git a/tests/spec/arb_shader_image_load_store/atomicity.c 
b/tests/spec/arb_shader_image_load_store/atomicity.c
index fe6bdb3e1..f53dddaa2 100644
--- a/tests/spec/arb_shader_image_load_store/atomicity.c
+++ b/tests/spec/arb_shader_image_load_store/atomicity.c
@@ -65,6 +65,7 @@ config.supports_gl_core_version = 32;
  config.window_width = W;
  config.window_height = H;
  config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_shader_image_load_store/bitcast.c b/tests/spec/arb_shader_image_load_store/bitcast.c

index 9180e79c0..5f3e2c124 100644
--- a/tests/spec/arb_shader_image_load_store/bitcast.c
+++ b/tests/spec/arb_shader_image_load_store/bitcast.c
@@ -46,6 +46,7 @@ config.supports_gl_core_version = 32;
  config.window_width = W;
  config.window_height = H;
  config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_shader_image_load_store/coherency.c b/tests/spec/arb_shader_image_load_store/coherency.c

index d1ecbe8b4..a3ef5fe1a 100644
--- a/tests/spec/arb_shader_image_load_store/coherency.c
+++ b/tests/spec/arb_shader_image_load_store/coherency.c
@@ -72,6 +72,7 @@ config.supports_gl_core_version = 32;
  config.window_width = L;
  config.window_height = L;
  config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_shader_image_load_store/dead-fragments.c b/tests/spec/arb_shader_image_load_store/dead-fragments.c

index 70c8f3f7a..c06aaa002 100644
--- a/tests/spec/arb_shader_image_load_store/dead-fragments.c
+++ b/tests/spec/arb_shader_image_load_store/dead-fragments.c
@@ -53,6 +53,7 @@ config.supports_gl_core_version = 32;
  config.window_width = W;
  config.window_height = H;
  config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_shader_image_load_store/early-z.c b/tests/spec/arb_shader_image_load_store/early-z.c

index 913a220df..c55d81a87 100644
--- a/tests/spec/arb_shader_image_load_store/early-z.c
+++ b/tests/spec/arb_shader_image_load_store/early-z.c
@@ -63,6 +63,7 @@ config.supports_gl_core_version = 32;
  config.window_width = W;
  config.window_height = H;
  config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_shader_image_load_store/host-mem-barrier.c b/tests/spec/arb_shader_image_load_store/host-mem-barrier.c

index 12b966a13..cceaf28ca 100644
--- a/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
+++ b/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
@@ -60,6 +60,7 @@ config.supports_gl_core_version = 32;
  config.window_width = L;
  config.window_height = L;
  config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  
  PIGLIT_GL_TEST_CONFIG_END
  
diff --git a/tests/spec/arb_shader_image_load_store/indexing.c b/tests/spec/arb_shader_image_load_store/indexing.c

index bf4a56976..acef2db17 100644
--- a/tests/spec/arb_shader_image_load_store/indexing.c
+++ b/tests/spec/arb_shader_imag

Re: [Piglit] [PATCH 2/7] gl-4.4: set KHR_no_error compatibility

2017-05-29 Thread Timothy Arceri

On 19/05/17 19:08, Samuel Pitoiset wrote:

On 05/18/2017 04:00 AM, Timothy Arceri wrote:

---
  tests/spec/gl-4.4/gl_max_vertex_attrib_stride.c | 13 -
  1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/spec/gl-4.4/gl_max_vertex_attrib_stride.c 
b/tests/spec/gl-4.4/gl_max_vertex_attrib_stride.c

index 85113c8..71343d0 100644
--- a/tests/spec/gl-4.4/gl_max_vertex_attrib_stride.c
+++ b/tests/spec/gl-4.4/gl_max_vertex_attrib_stride.c
@@ -21,20 +21,21 @@
   * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   * SOFTWARE.
   */
  #include "piglit-util-gl.h"
  #include "minmax-test.h"
  PIGLIT_GL_TEST_CONFIG_BEGIN
  config.supports_gl_core_version = 44;
+config.khr_no_error_support = PIGLIT_NO_ERRORS;
  PIGLIT_GL_TEST_CONFIG_END
  static bool check_stride(char *function, bool check_valid)
  {
  bool pass = true;
  if (check_valid) {
  if (!piglit_check_gl_error(GL_NO_ERROR)) {
  fprintf(stderr, "error when testing valid "
@@ -138,24 +139,26 @@ void piglit_init(int argc, char **argv)
  pass = piglit_minmax_pass;
  /* Try passing the max stride value */
  pass = test_stride_bind_buffer(stride_max, true) && pass;
  pass = test_stride_bind_buffers(stride_max, true) && pass;
  pass = test_stride_vertex_attrib(stride_max, true) && pass;
  pass = test_stride_vertex_attribi(stride_max, true) && pass;
  pass = test_stride_vertex_attribl(stride_max, true) && pass;
  /* Try passing a stride value that is to large */
-pass = test_stride_bind_buffer(stride_max_plus_one, false) && pass;
-pass = test_stride_bind_buffers(stride_max_plus_one, false) && pass;
-pass = test_stride_vertex_attrib(stride_max_plus_one, false) && 
pass;
-pass = test_stride_vertex_attribi(stride_max_plus_one, false) && 
pass;
-pass = test_stride_vertex_attribl(stride_max_plus_one, false) && 
pass;

+if (!piglit_khr_no_error) {
+pass = test_stride_bind_buffer(stride_max_plus_one, false) && 
pass;
+pass = test_stride_bind_buffers(stride_max_plus_one, false) 
&& pass;
+pass = test_stride_vertex_attrib(stride_max_plus_one, false) 
&& pass;
+pass = test_stride_vertex_attribi(stride_max_plus_one, false) 
&& pass;
+pass = test_stride_vertex_attribl(stride_max_plus_one, false) 
&& pass;

+}


How about moving the piglit_khr_no_error check directly in 
check_stride() ? With that changed, patch is:


Hey sorry, these fell off my radar. I've gone ahead and pushed this one 
unchanged without your review. The problem with the suggestion is that 
with KHR_no_error the idea is to never call the api in a way that can 
cause an error. Your suggesting would mean we call the api in an invalid 
way and just skip the error checks, this can mean we end up crashing, 
causing buffer overruns etc.


Thanks for the reviews I've pushed the other patches with you r-b.



Reviewed-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>


  piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
  }
  enum piglit_result
  piglit_display(void)
  {
  return PIGLIT_PASS;
  }


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


<    1   2   3   4   5   6   7   >