[Piglit] [PATCH 2/2] ext_polygon_offset_clamp: add a gles2 version of draw test

2016-04-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin 
---
 tests/all.py |  1 +
 .../ext_polygon_offset_clamp/CMakeLists.gles2.txt|  3 +++
 tests/spec/ext_polygon_offset_clamp/draw.c   | 20 +++-
 3 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 tests/spec/ext_polygon_offset_clamp/CMakeLists.gles2.txt

diff --git a/tests/all.py b/tests/all.py
index bc886a1..b4cb597 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4254,6 +4254,7 @@ with profile.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ext_polygon_offset_clamp')) as g:
 g(['ext_polygon_offset_clamp-draw'])
+g(['ext_polygon_offset_clamp-draw_gles2'])
 g(['ext_polygon_offset_clamp-dlist'])
 
 with profile.group_manager(
diff --git a/tests/spec/ext_polygon_offset_clamp/CMakeLists.gles2.txt 
b/tests/spec/ext_polygon_offset_clamp/CMakeLists.gles2.txt
new file mode 100644
index 000..4ff8d17
--- /dev/null
+++ b/tests/spec/ext_polygon_offset_clamp/CMakeLists.gles2.txt
@@ -0,0 +1,3 @@
+link_libraries(piglitutil_${piglit_target_api})
+
+piglit_add_executable (ext_polygon_offset_clamp-draw_gles2 draw.c)
diff --git a/tests/spec/ext_polygon_offset_clamp/draw.c 
b/tests/spec/ext_polygon_offset_clamp/draw.c
index f17cfb8..5c73825 100644
--- a/tests/spec/ext_polygon_offset_clamp/draw.c
+++ b/tests/spec/ext_polygon_offset_clamp/draw.c
@@ -40,8 +40,11 @@
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
-
+#if PIGLIT_USE_OPENGL
config.supports_gl_compat_version = 21;
+#else
+   config.supports_gl_es_version = 20;
+#endif
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DEPTH | 
PIGLIT_GL_VISUAL_DOUBLE;
 
 PIGLIT_GL_TEST_CONFIG_END
@@ -65,7 +68,11 @@ piglit_display(void)
 
glUniform1f(zflip, 1.0);
glClearColor(0, 0, 1, 1);
+#ifdef PIGLIT_USE_OPENGL
glClearDepth(0.5);
+#else
+   glClearDepthf(0.5);
+#endif
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
/* NOTE: It appears that at least nvidia hw will end up
@@ -152,11 +159,22 @@ piglit_init(int argc, char **argv)
piglit_require_extension("GL_EXT_polygon_offset_clamp");
 
prog = piglit_build_simple_program(
+#ifdef PIGLIT_USE_OPENGL
"#version 120\n"
+#else
+   "#version 100\n"
+   "attribute vec4 vertex;\n"
+   "#define gl_Vertex vertex\n"
+#endif
"uniform float zflip;\n"
"void main() { gl_Position = gl_Vertex * vec4(1, 1, 
zflip, 1); }\n",
 
+#ifdef PIGLIT_USE_OPENGL
"#version 120\n"
+#else
+   "#version 100\n"
+   "precision highp float;\n"
+#endif
"uniform vec4 color;\n"
"void main() { gl_FragColor = color; }\n");
color = glGetUniformLocation(prog, "color");
-- 
2.7.3

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


[Piglit] [PATCH 1/2] registery: update gl.xml to r32598

2016-04-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin 
---
 registry/gl.xml | 83 -
 1 file changed, 77 insertions(+), 6 deletions(-)

diff --git a/registry/gl.xml b/registry/gl.xml
index be231c7..579a8e4 100644
--- a/registry/gl.xml
+++ b/registry/gl.xml
@@ -1,7 +1,7 @@
 
 
 
-Copyright (c) 2013-2015 The Khronos Group Inc.
+Copyright (c) 2013-2016 The Khronos Group Inc.
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and/or associated documentation files (the
@@ -2090,6 +2090,7 @@ typedef unsigned int GLhandleARB;
 
 
 
+
 
 
 
@@ -7897,7 +7898,10 @@ typedef unsigned int GLhandleARB;
 
 
 
-
+
+
+
+
 
 
 
@@ -8481,7 +8485,18 @@ typedef unsigned int GLhandleARB;
 
 
 
-
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 
-
-
+
+
 
 
 
@@ -9868,6 +9883,12 @@ typedef unsigned int GLhandleARB;
 const GLuint *value
 
 
+void glClearPixelLocalStorageuiEXT
+GLsizei offset
+GLsizei n
+const GLuint *values
+
+
 void glClearStencil
 GLint 
s
 
@@ -13538,6 +13559,11 @@ typedef unsigned int GLhandleARB;
 GLint param
 
 
+void 
glFramebufferPixelLocalStorageSizeEXT
+GLuint target
+GLsizei size
+
+
 void glFramebufferReadBufferEXT
 GLuint 
framebuffer
 GLenum 
mode
@@ -13626,6 +13652,16 @@ typedef unsigned int GLhandleARB;
 
 
 
+void 
glFramebufferTexture2DDownsampleIMG
+GLenum target
+GLenum attachment
+GLenum textarget
+GLuint texture
+GLint level
+GLint xscale
+GLint yscale
+
+
 void 
glFramebufferTexture2DMultisampleEXT
 GLenum target
 GLenum attachment
@@ -13743,6 +13779,16 @@ typedef unsigned int GLhandleARB;
 
 
 
+void 
glFramebufferTextureLayerDownsampleIMG
+GLenum 
target
+GLenum 
attachment
+GLuint 
texture
+GLint 
level
+GLint 
layer
+GLint xscale
+GLint yscale
+
+
 void 
glFramebufferTextureMultisampleMultiviewOVR
 GLenum 
target
 GLenum 
attachment
@@ -14768,6 +14814,10 @@ typedef unsigned int GLhandleARB;
 GLint 
*params
 
 
+GLsizei 
glGetFramebufferPixelLocalStorageSizeEXT
+GLuint target
+
+
 GLenum 
glGetGraphicsResetStatus
 
 
@@ -40936,7 +40986,7 @@ typedef unsigned int GLhandleARB;
 
 
 
-
+
 
 
 
@@ -41135,6 +41185,7 @@ typedef unsigned int GLhandleARB;
 
 
 
+
 
 
 
@@ -41207,6 +41258,16 @@ typedef unsigned int GLhandleARB;
 
 
 
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -42218,6 +42279,16 @@ typedef unsigned int GLhandleARB;
 
 
 
+
+
+
+
+
+
+
+
+
+
 
 
 
-- 
2.7.3

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


[Piglit] [PATCH 2/2] EXT_base_instance: add GL ES version of ARB_base_instance tests

2016-04-03 Thread Ilia Mirkin
This adapts the ARB_base_instance tests to run on GL ES 3.0. Just a
question of setting different versions; the dispatch code takes care of
everything for us.

Signed-off-by: Ilia Mirkin 
---
 tests/all.py   |  7 +++
 tests/spec/arb_base_instance/CMakeLists.gles3.txt  |  4 
 .../baseinstance-doesnt-affect-gl-instance-id.c| 18 +-
 tests/spec/arb_base_instance/drawarrays.c  | 18 ++
 4 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 tests/spec/arb_base_instance/CMakeLists.gles3.txt

diff --git a/tests/all.py b/tests/all.py
index a36b006..bc886a1 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4120,6 +4120,13 @@ with profile.group_manager(
 
 with profile.group_manager(
 PiglitGLTest,
+grouptools.join('spec', 'ext_base_instance')) as g:
+g(['arb_base_instance-baseinstance-doesnt-affect-gl-instance-id_gles3'],
+  run_concurrent=False)
+g(['arb_base_instance-drawarrays_gles3'])
+
+with profile.group_manager(
+PiglitGLTest,
 grouptools.join('spec', 'arb_buffer_storage')) as g:
 for mode in ['read', 'draw']:
 g(['bufferstorage-persistent', mode])
diff --git a/tests/spec/arb_base_instance/CMakeLists.gles3.txt 
b/tests/spec/arb_base_instance/CMakeLists.gles3.txt
new file mode 100644
index 000..8d2f919
--- /dev/null
+++ b/tests/spec/arb_base_instance/CMakeLists.gles3.txt
@@ -0,0 +1,4 @@
+link_libraries(piglitutil_${piglit_target_api})
+
+piglit_add_executable 
(arb_base_instance-baseinstance-doesnt-affect-gl-instance-id_gles3 
baseinstance-doesnt-affect-gl-instance-id.c)
+piglit_add_executable (arb_base_instance-drawarrays_gles3 drawarrays.c)
diff --git 
a/tests/spec/arb_base_instance/baseinstance-doesnt-affect-gl-instance-id.c 
b/tests/spec/arb_base_instance/baseinstance-doesnt-affect-gl-instance-id.c
index 354a750..8e223cd 100644
--- a/tests/spec/arb_base_instance/baseinstance-doesnt-affect-gl-instance-id.c
+++ b/tests/spec/arb_base_instance/baseinstance-doesnt-affect-gl-instance-id.c
@@ -29,15 +29,22 @@
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
-
+#ifdef PIGLIT_USE_OPENGL
config.supports_gl_core_version = 31;
+#else
+   config.supports_gl_es_version = 30;
+#endif
 
config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char *vstext =
+#ifdef PIGLIT_USE_OPENGL
"#version 140\n"
+#else
+   "#version 300 es\n"
+#endif
"in vec3 vertex;\n"
"out vec4 passColor;\n"
"void main() {\n"
@@ -47,7 +54,12 @@ static const char *vstext =
"}\n";
 
 static const char *fstext =
+#ifdef PIGLIT_USE_OPENGL
"#version 140\n"
+#else
+   "#version 300 es\n"
+   "precision highp float;\n"
+#endif
"in vec4 passColor;\n"
"out vec4 color;\n"
"void main() {\n"
@@ -78,7 +90,11 @@ piglit_init(int argc, char **argv)
 {
GLuint vertIndex;
 
+#ifdef PIGLIT_USE_OPENGL
piglit_require_extension("GL_ARB_base_instance");
+#else
+   piglit_require_extension("GL_EXT_base_instance");
+#endif
 
prog = piglit_build_simple_program(vstext, fstext);
 
diff --git a/tests/spec/arb_base_instance/drawarrays.c 
b/tests/spec/arb_base_instance/drawarrays.c
index 140e3f7..44e63dc 100644
--- a/tests/spec/arb_base_instance/drawarrays.c
+++ b/tests/spec/arb_base_instance/drawarrays.c
@@ -31,7 +31,11 @@
 #include "piglit-matrix.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
+#ifdef PIGLIT_USE_OPENGL
config.supports_gl_core_version = 31;
+#else
+   config.supports_gl_es_version = 30;
+#endif
config.window_width = 400;
config.window_height = 400;
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
@@ -56,8 +60,13 @@ static float modelview[16], projection[16], 
modelviewproj[16];
  * instanced array.
  */
 static const char *VertShaderText =
+#ifdef PIGLIT_USE_OPENGL
"#version 130 \n"
"#extension GL_ARB_draw_instanced: enable \n"
+#else
+   "#version 300 es\n"
+   "#define gl_InstanceIDARB gl_InstanceID\n"
+#endif
"in vec4 Vertex, Color; \n"
"uniform vec2 Pos[8]; \n"
"uniform mat4 MVP; \n"
@@ -73,7 +82,12 @@ static const char *VertShaderText =
 
 /* Simple color pass-through */
 static const char *FragShaderText =
+#ifdef PIGLIT_USE_OPENGL
"#version 130 \n"
+#else
+   "#version 300 es \n"
+   "precision highp float;\n"
+#endif
"in vec4 ColorVarying; \n"
"out vec4 FragColor; \n"
"void main() \n"
@@ -208,9 +222,13 @@ piglit_init(int argc, char **argv)
 {
GLuint vao;
 
+#ifdef PIGLIT_USE_OPENGL
piglit_require_extension("GL_ARB_draw_instanced");
piglit_require_extension("GL_ARB_instanced_arrays");
piglit_require_extension("GL_ARB_base_instance");
+#else
+   piglit_require_extension("GL_EXT_base_instance");

[Piglit] [PATCH 1/2] util: GL ES doesn't like glReadPixels(GL_RGB). Always use RGBA instead.

2016-04-03 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin 
---
 tests/util/piglit-util-gl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index d636810..dbdfb13 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -1223,11 +1223,11 @@ piglit_probe_rect_rgb(int x, int y, int w, int h, const 
float *expected)
GLfloat *probe;
GLfloat *pixels;
 
-   pixels = piglit_read_pixels_float(x, y, w, h, GL_RGB, NULL);
+   pixels = piglit_read_pixels_float(x, y, w, h, GL_RGBA, NULL);
 
for (j = 0; j < h; j++) {
for (i = 0; i < w; i++) {
-   probe = [(j*w+i)*3];
+   probe = [(j*w+i)*4];
 
for (p = 0; p < 3; ++p) {
if (fabs(probe[p] - expected[p]) >= 
piglit_tolerance[p]) {
-- 
2.7.3

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


[Piglit] [PATCH 5/8] piglit: Fix spelling mistakes

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 piglit | 2 +-
 piglit-resume.py   | 2 +-
 piglit-run.py  | 2 +-
 piglit-summary-html.py | 2 +-
 piglit-summary.py  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/piglit b/piglit
index cc05bcc..e3c1f51 100755
--- a/piglit
+++ b/piglit
@@ -23,7 +23,7 @@
 """ Wrapper for piglit executables
 
 This imports functions from the framework and calls them with the argument
-parts that the parser defined here doesn't konw how to parse.
+parts that the parser defined here doesn't know how to parse.
 
 It is very important that the final parser not generate a help message
 (add_help=False in the constructor arguments), otherwise this parser will
diff --git a/piglit-resume.py b/piglit-resume.py
index c8f0fe2..43db8fa 100755
--- a/piglit-resume.py
+++ b/piglit-resume.py
@@ -22,7 +22,7 @@
 
 """ Resume an interupted piglit run
 
-Deprecated compatability wrapper
+Deprecated compatibility wrapper
 
 """
 
diff --git a/piglit-run.py b/piglit-run.py
index 7f6cf1a..d1bd69d 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -22,7 +22,7 @@
 
 """ Run a piglit test profile
 
-Deprecated compatability wrapper
+Deprecated compatibility wrapper
 
 """
 
diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index 163d006..cb4e78c 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -20,7 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-""" Deprecated compatability wrapper for html summary """
+""" Deprecated compatibility wrapper for html summary """
 
 from __future__ import (
 absolute_import, division, print_function, unicode_literals
diff --git a/piglit-summary.py b/piglit-summary.py
index 62f29ce..307d804 100755
--- a/piglit-summary.py
+++ b/piglit-summary.py
@@ -20,7 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-""" Deprecated compatability wrapper for console summary """
+""" Deprecated compatibility wrapper for console summary """
 
 from __future__ import (
 absolute_import, division, print_function, unicode_literals
-- 
2.8.0

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


[Piglit] [PATCH 3/8] framework: Fix spelling mistakes

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 framework/backends/__init__.py |  4 ++--
 framework/backends/abstract.py |  2 +-
 framework/backends/json.py | 12 ++--
 framework/core.py  |  2 +-
 framework/dmesg.py |  2 +-
 framework/exceptions.py|  2 +-
 framework/grouptools.py|  2 +-
 framework/profile.py   |  2 +-
 framework/programs/run.py  |  4 ++--
 framework/programs/summary.py  |  6 +++---
 framework/status.py|  4 ++--
 framework/summary/common.py|  2 +-
 framework/test/base.py |  2 +-
 framework/test/glsl_parser_test.py |  2 +-
 framework/test/opengl.py   |  2 +-
 15 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/framework/backends/__init__.py b/framework/backends/__init__.py
index 7821375..488ad55 100644
--- a/framework/backends/__init__.py
+++ b/framework/backends/__init__.py
@@ -28,7 +28,7 @@
 object and receives one.
 
 Most consumers will want to import framework.backends and work directly with
-the helper functions here. For some more detailed uses (test cases expecially)
+the helper functions here. For some more detailed uses (test cases especially)
 the modules themselves may be used.
 
 When this module is loaded it will search through framework/backends for python
@@ -99,7 +99,7 @@ def get_backend(backend):
 is the responsibility of the caller to handle this error.
 
 If the backend module exists, but there is not active implementation then a
-BackendNotImplementedError will be raised, it is also the responsiblity of
+BackendNotImplementedError will be raised, it is also the responsibility of
 the caller to handle this error.
 
 """
diff --git a/framework/backends/abstract.py b/framework/backends/abstract.py
index b5b4858..13a7b67 100644
--- a/framework/backends/abstract.py
+++ b/framework/backends/abstract.py
@@ -141,7 +141,7 @@ def write_test(self, name):
 Should be a context manager, used with the with statement. It should
 first write an incomplete status value, then yield and object that will
 overwrite that value with the final value. That object needs to take a
-'data' paramter whic is a result.TestResult object.
+'data' parameter which is a result.TestResult object.
 
 Arguments:
 name -- the name of the test to be written
diff --git a/framework/backends/json.py b/framework/backends/json.py
index 1219099..2bcedab 100644
--- a/framework/backends/json.py
+++ b/framework/backends/json.py
@@ -234,7 +234,7 @@ def _load(results_file):
 except ValueError as e:
 raise exceptions.PiglitFatalError(
 'While loading json results file: "{}",\n'
-'the following error occured:\n{}'.format(results_file.name,
+'the following error occurred:\n{}'.format(results_file.name,
   str(e)))
 
 if isinstance(result, results.TestrunResult):
@@ -338,7 +338,7 @@ def _update_zero_to_one(result):
 
 - dmesg is sometimes stored as a list, sometimes stored as a string. In
   version 1 it is always stored as a string
-- in version 0 subtests are somtimes stored as duplicates, sometimes stored
+- in version 0 subtests are sometimes stored as duplicates, sometimes 
stored
   only with a single entry, in version 1 tests with subtests are only
   recorded once, always.
 - Version 0 can have an info entry, or returncode, out, and err entries,
@@ -364,7 +364,7 @@ def _update_zero_to_one(result):
 # have a returncode, out, or attribute we'll want to get those out of
 # info first
 #
-# This expects that the order of info is rougly returncode, errors,
+# This expects that the order of info is roughly returncode, errors,
 # output, *extra it can handle having extra information in the middle,
 if (None in [test.get('out'), test.get('err'),
  test.get('returncode')] and test.get('info')):
@@ -381,7 +381,7 @@ def _update_zero_to_one(result):
 if test.get('returncode') is None:
 # In some cases the returncode might not be set (like the test
 # skipped), in that case it will be None, so set it
-# apropriately
+# appropriately
 try:
 test['returncode'] = int(
 returncode[len('returncode: '):].strip())
@@ -406,8 +406,8 @@ def _update_zero_to_one(result):
 if test.get('subtest'):
 for sub in six.iterkeys(test['subtest']):
 # adding the leading / ensures that we get exactly what we
-# expect, since endswith does a character by chacter match, if
-# the subtest name is duplicated it wont match, and if there
+# expect, since endswith does a character by character 

[Piglit] [PATCH 8/8] unittests: Fix spelling mistakes

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 unittests/backends_tests.py|  2 +-
 unittests/base_tests.py| 10 +-
 unittests/core_tests.py|  2 +-
 unittests/dmesg_tests.py   |  2 +-
 unittests/glsl_parser_test_tests.py|  2 +-
 unittests/json_backend_tests.py|  4 ++--
 unittests/json_results_update_tests.py |  2 +-
 unittests/log_tests.py |  2 +-
 unittests/options_tests.py |  2 +-
 unittests/profile_tests.py |  6 +++---
 unittests/results_tests.py |  2 +-
 unittests/run_parser_tests.py  | 16 
 unittests/status_tests.py  |  2 +-
 unittests/utils.py |  2 +-
 14 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/unittests/backends_tests.py b/unittests/backends_tests.py
index c3cda86..81466ec 100644
--- a/unittests/backends_tests.py
+++ b/unittests/backends_tests.py
@@ -88,7 +88,7 @@ def check(n, i):
 
 @nt.raises(backends.BackendError)
 def test_get_backend_unknown():
-"""backends.get_backend: An error is raised with an unkown backend."""
+"""backends.get_backend: An error is raised with an unknown backend."""
 backends.get_backend('obviously fake backend')
 
 
diff --git a/unittests/base_tests.py b/unittests/base_tests.py
index 2e64662..eea830b 100644
--- a/unittests/base_tests.py
+++ b/unittests/base_tests.py
@@ -59,7 +59,7 @@
 class TestTest(Test):
 """ A class for testing that implements a dummy interpret_result
 
-interpret_result() can ve overwritten by setting the
+interpret_result() can be overwritten by setting the
 self.test_interpret_result name
 
 """
@@ -118,8 +118,8 @@ def __init__(self):
 def __call__(self, *args, **kwargs):
 self.popen = subprocess.Popen(*args, **kwargs)
 
-# if commuincate cis called successfully then the proc will be
-# reset to None, whic will make the test fail.
+# if communicate is called successfully then the proc will be
+# reset to None, which will make the test fail.
 self.popen.communicate = mock.Mock(return_value=('out', 'err'))
 
 return self.popen
@@ -159,7 +159,7 @@ def p():
 test.run()
 
 # Check to see if the Popen has children, even after it should have
-# recieved a TimeoutExpired.
+# received a TimeoutExpired.
 proc = psutil.Process(os.getsid(proxy.popen.pid))
 children = proc.children(recursive=True)
 
@@ -423,7 +423,7 @@ def test_traceback(self):
 
 It's fragile to record the actual traceback, and it's unlikely
 that it can easily be implemented differently than the way the original
-code is implimented, so this doesn't do that, it just verifies there is
+code is implemented, so this doesn't do that, it just verifies there is
 a value.
 
 """
diff --git a/unittests/core_tests.py b/unittests/core_tests.py
index df7f48b..a28ebfb 100644
--- a/unittests/core_tests.py
+++ b/unittests/core_tests.py
@@ -109,7 +109,7 @@ def test_PiglitConfig_init():
 def test_parse_listfile_return():
 """core.parse_listfile(): returns a list-like object
 
-Given a file with a newline seperated list of results, parse_listfile
+Given a file with a newline separated list of results, parse_listfile
 should return a list of files with no whitespace
 
 """
diff --git a/unittests/dmesg_tests.py b/unittests/dmesg_tests.py
index 47c1959..b2f537c 100644
--- a/unittests/dmesg_tests.py
+++ b/unittests/dmesg_tests.py
@@ -151,7 +151,7 @@ def test_update_subtest_changed(self):
 
 
 def test_update_result_regex_no_match():
-"""dmesg.BaseDmesg.update_result: if no regex matches dont change status"""
+"""dmesg.BaseDmesg.update_result: if no regex matches don't change 
status"""
 dmesg_ = TestDmesg()
 dmesg_.regex = re.compile(r'nomatchforthisreally')
 result = results.TestResult('pass')
diff --git a/unittests/glsl_parser_test_tests.py 
b/unittests/glsl_parser_test_tests.py
index c732bec..f3c4c98 100644
--- a/unittests/glsl_parser_test_tests.py
+++ b/unittests/glsl_parser_test_tests.py
@@ -303,7 +303,7 @@ def glslparser_exetensions_seperators():
 """ GlslParserTest() can only have [A-Za-z_] as characters
 
 This test generates a number of tests that should catch the majority of
-errors relating to seperating extensions in the config block of a
+errors relating to separating extensions in the config block of a
 glslparser test
 
 """
diff --git a/unittests/json_backend_tests.py b/unittests/json_backend_tests.py
index eb76bfb..7d76b74 100644
--- a/unittests/json_backend_tests.py
+++ b/unittests/json_backend_tests.py
@@ -156,12 +156,12 @@ def test_update_results_old():
 """backends.json.update_results(): updates results
 
 Because of the design of the our updates (namely that they silently
-incrementally 

[Piglit] [PATCH 1/8] README: Fix spelling mistake

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index 535a26e..d738cb1 100644
--- a/README
+++ b/README
@@ -407,7 +407,7 @@ Every test is run as a separate process. This minimizes the 
impact that
 severe bugs like memory corruption have on the testing process.
 
 Therefore, tests can be implemented in an arbitrary standalone language.
-C is the prefered language for compiled tests, piglit also supports its own
+C is the preferred language for compiled tests, piglit also supports its own
 simple formats for test shaders and glsl parser input.
 
 All new tests must be added to the appropriate profile, all.py profile for
-- 
2.8.0

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


[Piglit] [PATCH 4/8] generated_tests: Fix spelling mistakes

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 generated_tests/gen_builtin_packing_tests.py  | 2 +-
 generated_tests/gen_builtin_uniform_tests.py  | 2 +-
 generated_tests/gen_builtin_uniform_tests_fp64.py | 2 +-
 generated_tests/random_ubo.py | 2 +-
 generated_tests/random_ubo_trim.py| 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/generated_tests/gen_builtin_packing_tests.py 
b/generated_tests/gen_builtin_packing_tests.py
index ae8557a..97d31f1 100644
--- a/generated_tests/gen_builtin_packing_tests.py
+++ b/generated_tests/gen_builtin_packing_tests.py
@@ -352,7 +352,7 @@ def pack_half_1x16(f32, func_opts):
 #   - Otherwise, f32 = 2^E * F where 0.5 <= F < 1.0 .
 #
 # Since we decomposed `abs(f32)`, we only need be concerned with the
-# postive cases.
+# positive cases.
 if isnan(F):
 # The resultant float16 is NaN.
 e = 31
diff --git a/generated_tests/gen_builtin_uniform_tests.py 
b/generated_tests/gen_builtin_uniform_tests.py
index 69decfe..29bd2e7 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -489,7 +489,7 @@ def make_test_shader(self, additional_declarations, 
prefix_statements,
 called.  output_var is the variable that the result of the
 built-in function should be assigned to, after conversion to a
 vec4.  suffix_statements is a string containing any additional
-statements that need to be inside the main() funciton of the
+statements that need to be inside the main() function of the
 shader, after the built-in function is called.
 """
 shader = ''
diff --git a/generated_tests/gen_builtin_uniform_tests_fp64.py 
b/generated_tests/gen_builtin_uniform_tests_fp64.py
index 78c2ace..4538c81 100644
--- a/generated_tests/gen_builtin_uniform_tests_fp64.py
+++ b/generated_tests/gen_builtin_uniform_tests_fp64.py
@@ -415,7 +415,7 @@ def make_test_shader(self, additional_declarations, 
prefix_statements,
 called.  output_var is the variable that the result of the
 built-in function should be assigned to, after conversion to a
 vec4.  suffix_statements is a string containing any additional
-statements that need to be inside the main() funciton of the
+statements that need to be inside the main() function of the
 shader, after the built-in function is called.
 """
 shader = ''
diff --git a/generated_tests/random_ubo.py b/generated_tests/random_ubo.py
index 5b4f813..1fb9b93 100644
--- a/generated_tests/random_ubo.py
+++ b/generated_tests/random_ubo.py
@@ -357,7 +357,7 @@ def generate_layouts(fields, required_layouts, 
allow_row_major_structure):
 layouts.append(lay)
 elif isstructure(type) and not allow_row_major_structure:
 # This would work-around a bug in NVIDIA closed source drivers.
-# They do not propogate row-major down into structures.
+# They do not propagate row-major down into structures.
 
 layouts.append("#column_major")
 elif ismatrix(type) or isstructure(type):
diff --git a/generated_tests/random_ubo_trim.py 
b/generated_tests/random_ubo_trim.py
index 2a1dc5c..438d9c7 100644
--- a/generated_tests/random_ubo_trim.py
+++ b/generated_tests/random_ubo_trim.py
@@ -41,7 +41,7 @@ def remove_empty_structure(s, do_remove = True):
 if s == x:
 continue
 
-# A previous caller may be in the proces of deleting this structure
+# A previous caller may be in the process of deleting this structure
 # type, so just skip it for now.
 if len(struct_types[x]) == 0:
 continue
-- 
2.8.0

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


[Piglit] [PATCH 6/8] templates: Fix spelling mistakes

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 templates/empty_status.mako | 2 +-
 templates/index.mako| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/empty_status.mako b/templates/empty_status.mako
index 8ee6fba..353b089 100644
--- a/templates/empty_status.mako
+++ b/templates/empty_status.mako
@@ -12,7 +12,7 @@
 Currently showing: ${page}
 Show:
   ## Index is a logical choice to put first, it will always be a link
-  ## and we don't want in preceeded by a |
+  ## and we don't want in preceded by a |
   index
   % for i in pages:
 % if i == page:
diff --git a/templates/index.mako b/templates/index.mako
index 39f4976..49a8b1c 100644
--- a/templates/index.mako
+++ b/templates/index.mako
@@ -172,7 +172,7 @@
  
escape_filename(grouptools.groupname(test
   else:
 result = status.NOTRUN
-del raw  # we dont need this, so don't let it leak
+del raw  # we don't need this, so don't let it leak
   %>
   
   % if str(result) not in exclude and result is not status.NOTRUN:
-- 
2.8.0

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


[Piglit] [PATCH 2/8] completion/bash: Fix spelling mistakes

2016-04-03 Thread Eric Engestrom
Signed-off-by: Eric Engestrom 
---
 completions/bash/piglit | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/completions/bash/piglit b/completions/bash/piglit
index 1227ab6..b6cfdd1 100644
--- a/completions/bash/piglit
+++ b/completions/bash/piglit
@@ -35,7 +35,7 @@ __piglit_results_extensions="@(json|json.xz|json.gz|json.bz2)"
 #
 # This handles everything piglit run expects, with one small caviat, after the
 # first profile is provided, it mixes profiles and directories together, since
-# either addtional profiles or a directory can be provided. After something
+# either additional profiles or a directory can be provided. After something
 # that isn't a profile is provided it wont auto complete any more positional
 # arguments.
 __piglit_run() {
@@ -209,7 +209,7 @@ __piglit_summary_aggregate() {
 
 # Completions for 'summary console'
 #
-# This function is extremly simple, it takes an infinite number of positional
+# This function is extremely simple, it takes an infinite number of positional
 # arguments which are all the same, a couple of switches, and only two of them
 # take arguments.
 __piglit_summary_console() {
-- 
2.8.0

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


Re: [Piglit] [PATCH] util: Add new headed matrix_index header to [vertex data]

2016-04-03 Thread Alejandro Piñeiro
On 03/04/16 03:45, Timothy Arceri wrote:
> On Fri, 2016-04-01 at 13:01 +0200, Alejandro Piñeiro wrote:
>> While searching how to specify matrices on shader runner I found this
>> unreviewed patch. I guess that a late review is better than nothing.
>>
>> On 10/12/15 06:25, Timothy Arceri wrote:
>>> This allows data to be set for matrix attributes in shader runner.
>>>
>>> For example to set colunm 2 of mat2x3:
>>> attname/float/3/1
>>> ---
>>>  tests/util/piglit-vbo.cpp | 43 +
>>> --
>>>  1 file changed, 33 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp
>>> index 6453d40..07a5ee6 100644
>>> --- a/tests/util/piglit-vbo.cpp
>>> +++ b/tests/util/piglit-vbo.cpp
>>> @@ -151,6 +151,11 @@ public:
>>> size_t count;
>>>  
>>> /**
>>> +* Index of the matrix column for this attribute.
>>> +*/
>>> +   size_t matrix_index;
>> Isn't size_t for the index somewhat an overkill. I guess that GLint
>> is
>> enough. But this is just a nitpick, you can forget it if you prefer.
>>
>>> +
>>> +   /**
>>>  * Index of this vertex attribute in the linked program.
>>>  */
>>> GLuint index;
>>> @@ -171,7 +176,8 @@
>>> vertex_attrib_description::vertex_attrib_description(GLuint prog,
>>> /* Split the column header into name/type/count fields */
>>> const char *first_slash = strchr(text, '/');
>>> if (first_slash == NULL) {
>>> -   printf("Column headers must be in the form
>>> name/type/count.  "
>>> +   printf("Column headers must be in the form
>>> name/type/count/matrix_column.\n"
>>> +  "Note: matrix_column is optional.\n"
>>>"Got: %s\n",
>>>text);
>>> piglit_report_result(PIGLIT_FAIL);
>>> @@ -179,7 +185,7 @@
>>> vertex_attrib_description::vertex_attrib_description(GLuint prog,
>>> std::string name(text, first_slash);
>>> const char *second_slash = strchr(first_slash + 1, '/');
>>> if (second_slash == NULL) {
>>> -   printf("Column headers must be in the form
>>> name/type/count.  "
>>> +   printf("Column headers must be in the form
>>> name/type/count/matrix_column.\n"
>>>"Got: %s\n",
>>>text);
>>> piglit_report_result(PIGLIT_FAIL);
>>> @@ -188,11 +194,28 @@
>>> vertex_attrib_description::vertex_attrib_description(GLuint prog,
>>> this->data_type = decode_type(type_str.c_str());
>>> char *endptr;
>>> this->count = strtoul(second_slash + 1, , 10);
>>> +
>>> if (*endptr != '\0') {
>>> -   printf("Column headers must be in the form
>>> name/type/count.  "
>>> -  "Got: %s\n",
>>> -  text);
>>> -   piglit_report_result(PIGLIT_FAIL);
>>> +   const char *third_slash = strchr(second_slash + 1,
>>> '/');
>>> +   this->matrix_index = strtoul(third_slash + 1,
>>> , 10);
>>> +
>>> +   if (this->matrix_index < 0 || this->matrix_index >
>>> 3) {
>>> +   printf("Matrix column index must be
>>> between 0 and 3.  Got: %lu\n",
>>> +   (unsigned long) this-
 matrix_index);
>>> +   piglit_report_result(PIGLIT_FAIL);
>>> +   }
>>> +   /* Turn the column into an offset */
>>> +   this->matrix_index -= 1;
>> This leads to need to specify the column number starting from 1. The
>> commit message seems to suggest that it would start from 0.
>>
>> Or in other words, with the patch as it is, specifying a matrix  like
>> this:
>> position/float/3  matrix/float/3/0 matrix/float/3/1 matrix/float/3/2
>> -1.0 -1.0 0.0   0 0 0   1 1 1   2 2 2
>>
>> Leads to an error, because matrix_index -1 for the first column is
>> used.
>>
>> In my opinion that line is not needed, unless you wanted to specify
>> columns starting to count from 1.
>>
>> Additionally, piglit-vbo.cpp has a header explaining how to specify
>> vertex data. Probably it would be good to add some info about how to
>> use
>> matrices.
> Hi,
>
> Thanks for the review. Do you have a use for this patch? I think I may
> have made some small changes locally but I never pushed forward with
> this patch because my use case went away (was going to use it for
> testing component packing in ARB_enhanced_layouts but after filing a
> spec bug it was reveal matrices can't be packed).

We are working on ARB_vertex_attrib_64bit, and for example, right now
most of the things are working but matrices. In fact we are using your
parch locally in order to have tests with vertex attrib matrices.

> If you have a use for it and want to fix this up feel free and I'll
> gladly take a look but I don't think I will have any time to do so for
> a little bit.

Ok, I will do this next Monday. But fwiw, with the change I suggested
the patch is working fine.

> The other thing to consider is that the same functionality can be used
> for arrays of