Re: [Piglit] [PATCH v1] Removed the two sided stencil extension Glean test.
Hi Brian, I am currently porting the tglsl1.cpp Glean test to Piglit. I will be sending in the patch soon. Thanks, Juliet On Tue, Oct 6, 2015 at 6:47 PM, Juliet Fruwrote: > Hello Brian, > > I am to check the list Laura shared on the remaining glean tests to be > ported. > > Thanks, > > On Tue, Oct 6, 2015 at 3:36 PM, Brian Paul wrote: > >> On 10/06/2015 12:23 AM, Juliet Fru wrote: >> >>> --- >>> tests/all.py | 1 - >>> tests/glean/CMakeLists.gl.txt | 1 - >>> tests/glean/tstencil2.cpp | 842 >>> -- >>> tests/glean/tstencil2.h | 110 -- >>> 4 files changed, 954 deletions(-) >>> delete mode 100644 tests/glean/tstencil2.cpp >>> delete mode 100644 tests/glean/tstencil2.h >>> >> >> Looks good. I'll commit this soon. >> >> Which glean test do you plan on porting next? >> >> -Brian >> >> >> > ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_uniform_buffer_object-rendering: add option to test buffer range size
If the "size" argument is used we create a UBO and bind a range of with two extra bytes. This exercises a path in the Mesa VMware driver. --- tests/all.py | 2 ++ tests/spec/arb_uniform_buffer_object/rendering.c | 28 +++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/all.py b/tests/all.py index f3a4b8a..3b88fa3 100644 --- a/tests/all.py +++ b/tests/all.py @@ -3513,6 +3513,8 @@ with profile.group_manager( 'referenced-by-shader') g(['arb_uniform_buffer_object-rendering'], 'rendering') g(['arb_uniform_buffer_object-rendering', 'offset'], 'rendering-offset') +g(['arb_uniform_buffer_object-rendering', 'size'], 'rendering-size') +g(['arb_uniform_buffer_object-rendering', 'size', 'offset'], 'rendering-size-offset') g(['arb_uniform_buffer_object-row-major'], 'row-major') g(['arb_uniform_buffer_object-uniformblockbinding'], 'uniformblockbinding') diff --git a/tests/spec/arb_uniform_buffer_object/rendering.c b/tests/spec/arb_uniform_buffer_object/rendering.c index 20c86b2..8725bf6 100644 --- a/tests/spec/arb_uniform_buffer_object/rendering.c +++ b/tests/spec/arb_uniform_buffer_object/rendering.c @@ -95,6 +95,7 @@ static GLuint prog; static GLuint buffers[NUM_UBOS]; static GLint alignment; static bool test_buffer_offset = false; +static bool test_buffer_size = false; static void @@ -106,6 +107,7 @@ setup_ubos(void) "ub_rot" }; static GLubyte zeros[1000] = {0}; + int extra_size; int i; glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, ); @@ -119,6 +121,15 @@ setup_ubos(void) alignment = 0; } + if (test_buffer_size) { + extra_size = 2; /* two extra bytes */ + printf("Testing buffer size + %d extra bytes\n", extra_size); + } + else { + /* use normal size */ + extra_size = 0; + } + glGenBuffers(NUM_UBOS, buffers); for (i = 0; i < NUM_UBOS; i++) { @@ -132,7 +143,7 @@ setup_ubos(void) GL_UNIFORM_BLOCK_DATA_SIZE, ); printf("UBO %s: index = %d, size = %d\n", - names[i], index, size); + names[i], index, size + extra_size); /* Allocate UBO */ /* XXX for some reason, this test doesn't work at all with @@ -141,13 +152,13 @@ setup_ubos(void) * really shouldn't matter. */ glBindBuffer(GL_UNIFORM_BUFFER, buffers[i]); - glBufferData(GL_UNIFORM_BUFFER, size + alignment, + glBufferData(GL_UNIFORM_BUFFER, size + extra_size + alignment, zeros, GL_DYNAMIC_DRAW); /* Attach UBO */ glBindBufferRange(GL_UNIFORM_BUFFER, i, buffers[i], alignment, /* offset */ - size); + size + extra_size); glUniformBlockBinding(prog, index, i); if (!piglit_check_gl_error(GL_NO_ERROR)) @@ -159,10 +170,17 @@ setup_ubos(void) void piglit_init(int argc, char **argv) { + int i; + piglit_require_extension("GL_ARB_uniform_buffer_object"); - if (argc > 1 && strcmp(argv[1], "offset") == 0) { - test_buffer_offset = true; + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "offset") == 0) { + test_buffer_offset = true; + } + else if (strcmp(argv[i], "size") == 0) { + test_buffer_size = true; + } } prog = piglit_build_simple_program(vert_shader_text, frag_shader_text); -- 1.9.1 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v1] Removed the two sided stencil extension Glean test.
Hello Brian, I am to check the list Laura shared on the remaining glean tests to be ported. Thanks, On Tue, Oct 6, 2015 at 3:36 PM, Brian Paulwrote: > On 10/06/2015 12:23 AM, Juliet Fru wrote: > >> --- >> tests/all.py | 1 - >> tests/glean/CMakeLists.gl.txt | 1 - >> tests/glean/tstencil2.cpp | 842 >> -- >> tests/glean/tstencil2.h | 110 -- >> 4 files changed, 954 deletions(-) >> delete mode 100644 tests/glean/tstencil2.cpp >> delete mode 100644 tests/glean/tstencil2.h >> > > Looks good. I'll commit this soon. > > Which glean test do you plan on porting next? > > -Brian > > > ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 00/13] Add more arb_shader_storage_buffer_object tests
On 28/09/15 10:17, Samuel Iglesias Gonsálvez wrote: > > > On 25/09/15 22:56, Mark Janes wrote: >> Emil Velikovwrites: >> >>> On 25 September 2015 at 16:40, Mark Janes wrote: With the push of SSBO support in mesa, one of these tests continues to fail, but only on broadwell: piglit.spec.arb_shader_storage_buffer_object.array-ssbo-binding >> >> A subsequent run on the CI shows this test to fail intermittently on >> broadwell. I'm supposed to be taking the day off today, but I'll look >> at this more thoroughly on Monday. > > We don't have any Broadwell machine. However we can help you with the > debugging, don't hesitate to contact Iago or me. > Is there any news? Sam > Thanks, > > Sam > >> Standard Output /tmp/build_root/m64/lib/piglit/bin/arb_shader_storage_buffer_object-array-ssbo-binding -auto -fbo piglit: debug: Requested an OpenGL 3.2 Core Context, and received a matching 3.3 context Wrong 0 value in buffer[1]: 0.00 >>> The test seems to be comparing a float with an integer there. Perhaps >>> one should use {+,-}0.0f or lambda ? >>> >>> float *map; >>> ... >>> if (map[i] != 0) { >>>printf("Wrong %d value in buffer[0]: %.2f\n", >>> i, map[i]); >>> >>> -Emil >> ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v1] Removed the two sided stencil extension Glean test.
--- tests/all.py | 1 - tests/glean/CMakeLists.gl.txt | 1 - tests/glean/tstencil2.cpp | 842 -- tests/glean/tstencil2.h | 110 -- 4 files changed, 954 deletions(-) delete mode 100644 tests/glean/tstencil2.cpp delete mode 100644 tests/glean/tstencil2.h diff --git a/tests/all.py b/tests/all.py index e9d7f9b..210a2cc 100644 --- a/tests/all.py +++ b/tests/all.py @@ -265,7 +265,6 @@ with profile.group_manager(GleanTest, 'glean') as g: # exactRGBA is not included intentionally, because it's too strict and # the equivalent functionality is covered by other tests g('shaderAPI') -g('stencil2') g('texCombine') g('texCube') g('texEnv') diff --git a/tests/glean/CMakeLists.gl.txt b/tests/glean/CMakeLists.gl.txt index 355eadd..a92438c 100644 --- a/tests/glean/CMakeLists.gl.txt +++ b/tests/glean/CMakeLists.gl.txt @@ -40,7 +40,6 @@ piglit_add_executable (glean tpointatten.cpp tpointsprite.cpp tshaderapi.cpp - tstencil2.cpp ttexcombine.cpp ttexcombine4.cpp ttexcube.cpp diff --git a/tests/glean/tstencil2.cpp b/tests/glean/tstencil2.cpp deleted file mode 100644 index aaf978f..000 --- a/tests/glean/tstencil2.cpp +++ /dev/null @@ -1,842 +0,0 @@ -// BEGIN_COPYRIGHT -*- glean -*- -// -// Copyright (C) 2009 VMware, Inc. 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 VMWARE 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 - - -// Test two-sided stencil extensions -// Brian Paul -// 19 Feb 2009 - - -// This test could be better: -// 1. Generate random state vectors, render and compare to expected values -// 2. Exercise separate front/back reference values and masks for the -//EXT and GL2 variations. - - - -#include -#include -#include "tstencil2.h" - - -namespace GLEAN { - -// two-sided methods: -#define ATI 1 -#define EXT 2 -#define GL2 3 - - -Stencil2Result::Stencil2Result() -{ - pass = false; -} - - -bool -Stencil2Test::have_ATI_separate_stencil(void) const -{ - return GLUtils::haveExtension("GL_ATI_separate_stencil"); -} - -bool -Stencil2Test::have_EXT_stencil_two_side(void) const -{ - return GLUtils::haveExtension("GL_EXT_stencil_two_side"); -} - -bool -Stencil2Test::have_GL2_stencil_two_side(void) const -{ - return GLUtils::getVersion() >= 2.0; -} - -bool -Stencil2Test::have_stencil_wrap(void) const -{ - if (GLUtils::getVersion() >= 2.0) { - return true; - } - else if (GLUtils::haveExtension("GL_EXT_stencil_wrap")) { - return true; - } - return false; -} - - -// Draw four quads: -// Bottom row uses GL_CCW -// Top row uses GL_CW -// Left column is front-facing -// Right column is back-facing -// Check the values in the stencil buffer to see if they match -// the expected values. -bool -Stencil2Test::render_test(GLuint expectedFront, GLuint expectedBack) -{ - GLint x0 = 0; - GLint x1 = windowSize / 2; - GLint x2 = windowSize; - GLint y0 = 0; - GLint y1 = windowSize / 2; - GLint y2 = windowSize; - - glFrontFace(GL_CCW); // this the GL default - - // lower left quad = front-facing - glBegin(GL_TRIANGLE_FAN); - glVertex2f(x0, y0); - glVertex2f(x1, y0); - glVertex2f(x1, y1); - glVertex2f(x0, y1); - glEnd(); - - // lower right quad = back-facing - glBegin(GL_TRIANGLE_FAN); - glVertex2f(x1, y0); - glVertex2f(x1, y1); - glVertex2f(x2, y1); - glVertex2f(x2, y0); - glEnd(); - - glFrontFace(GL_CW); - - // upper left quad = front-facing - glBegin(GL_TRIANGLE_FAN); - glVertex2f(x0, y1); - glVertex2f(x0, y2); - glVertex2f(x1, y2); - glVertex2f(x1, y1); - glEnd(); - - // upper right quad = back-facing - glBegin(GL_TRIANGLE_FAN); - glVertex2f(x1, y1); - glVertex2f(x2, y1); -
Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On 10/05/2015 07:25 PM, Matt Turner wrote: > On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanickwrote: >> From: Ian Romanick >> >> The rules changed from GLSL ES 1.00 to GLSL ES 3.00, so the two tests >> expect opposite results. >> >> NOTE: Mesa currently fails >> tests/spec/glsl-es-3.00/compiler/constant-sequence.vert and the related >> GLES3 conformance test. >> >> Signed-off-by: Ian Romanick >> Cc: Tapani Pälli >> Cc: Mark Janes >> Cc: Marta Lofstedt >> --- >> .../glsl-es-1.00/compiler/constant-sequence.vert| 17 + >> .../glsl-es-3.00/compiler/constant-sequence.vert| 21 >> + >> 2 files changed, 38 insertions(+) >> create mode 100644 tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >> create mode 100644 tests/spec/glsl-es-3.00/compiler/constant-sequence.vert >> >> diff --git a/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >> b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >> new file mode 100644 >> index 000..f57707b >> --- /dev/null >> +++ b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >> @@ -0,0 +1,17 @@ >> +#version 100 >> + >> +/* [config] >> + * expect_result: pass >> + * glsl_version: 1.00 >> + * [end config] >> + * >> + * While the sequnece operator is specifically disallowed as a constant >> + * expression in GLSL ES 3.0 and later, it is allowed in GLSL ES 1.00. > > Yay! More pointless differences that don't actually save anyone any > work since your compiler has to accept both #versions! Well... GLSL 4.30 has the same restriction. Part of the problem was that, I believe, not all compilers actually supported sequence as constant expressions, and allowing it means you have to support vec4 foo[3, 4]; to declare 4 element array... which is both insane and illegal in C. > Also typo: sequence R-b with that fixed? :) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] glsl-es: Test whether or not sequence can be a constant expression
On Tue, Oct 6, 2015 at 1:40 PM, Ian Romanickwrote: > On 10/05/2015 07:25 PM, Matt Turner wrote: >> On Mon, Oct 5, 2015 at 3:57 PM, Ian Romanick wrote: >>> From: Ian Romanick >>> >>> The rules changed from GLSL ES 1.00 to GLSL ES 3.00, so the two tests >>> expect opposite results. >>> >>> NOTE: Mesa currently fails >>> tests/spec/glsl-es-3.00/compiler/constant-sequence.vert and the related >>> GLES3 conformance test. >>> >>> Signed-off-by: Ian Romanick >>> Cc: Tapani Pälli >>> Cc: Mark Janes >>> Cc: Marta Lofstedt >>> --- >>> .../glsl-es-1.00/compiler/constant-sequence.vert| 17 + >>> .../glsl-es-3.00/compiler/constant-sequence.vert| 21 >>> + >>> 2 files changed, 38 insertions(+) >>> create mode 100644 tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> create mode 100644 tests/spec/glsl-es-3.00/compiler/constant-sequence.vert >>> >>> diff --git a/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> new file mode 100644 >>> index 000..f57707b >>> --- /dev/null >>> +++ b/tests/spec/glsl-es-1.00/compiler/constant-sequence.vert >>> @@ -0,0 +1,17 @@ >>> +#version 100 >>> + >>> +/* [config] >>> + * expect_result: pass >>> + * glsl_version: 1.00 >>> + * [end config] >>> + * >>> + * While the sequnece operator is specifically disallowed as a constant >>> + * expression in GLSL ES 3.0 and later, it is allowed in GLSL ES 1.00. >> >> Yay! More pointless differences that don't actually save anyone any >> work since your compiler has to accept both #versions! > > Well... GLSL 4.30 has the same restriction. Part of the problem was > that, I believe, not all compilers actually supported sequence as > constant expressions, and allowing it means you have to support > > vec4 foo[3, 4]; > > to declare 4 element array... which is both insane and illegal in C. > >> Also typo: sequence > > R-b with that fixed? :) Sure, Reviewed-by: Matt Turner (sorry, I wasn't meaning to review, just to complain :) ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] clipflat: Fix subtest reporting
On Mon, Oct 05, 2015 at 08:03:09AM -0600, Brian Paul wrote: > On 09/30/2015 05:51 PM, Dylan Baker wrote: > >There are two problems with the way this test reports subtests: > > > >First, it only reports subtests when they fail. This has all kinds of > >problems. It's not at all what the summary code expects, the > >summary code expects that subtests are always present, which means that > >they will show up under disabled/enabled pages instead of > >fixes/regressions, which in turn, will confuse developers. > > > >Second, it tries to report lots of information as the subtest name. This > >causes the JSON parser in python (JSON is used by the tests to > >communicate with the runner) to choke and die. > > > >This patch makes a couple of changes to correct this. > >First, it reports the subtest result always, whether pass or fail. > >Second, it simplifies the names of the subtests, and passes the other > >information to stdout, which the runner will scoop up and record for a > >developer to go look at. > > > >cc: Brian Paul> >Signed-off-by: Dylan Baker > >--- > > > >Brian: I've tried to make the subtest reporting consistant, but I want > >to make sure that I'm not screwing up the logic of the test. I > >understand the idea of what it's doing, but not the details. > > > > > > tests/general/clipflat.c | 44 ++-- > > 1 file changed, 26 insertions(+), 18 deletions(-) > > > >diff --git a/tests/general/clipflat.c b/tests/general/clipflat.c > >index 91e410e..f195185 100644 > >--- a/tests/general/clipflat.c > >+++ b/tests/general/clipflat.c > >@@ -1,5 +1,6 @@ > > /* > > * Copyright © 2009, 2013 VMware, Inc. > >+ * Copyright © 2015 Intel Corporation > > * > > * Permission is hereby granted, free of charge, to any person obtaining a > > * copy of this software and associated documentation files (the > > "Software"), > >@@ -317,12 +318,12 @@ checkResult(GLfloat badColor[3]) > > > > > > static void > >-reportFailure(GLenum mode, int drawMode, GLuint facing, > >+reportSubtest(GLenum mode, int drawMode, GLuint facing, > >GLuint fill, > >- const GLfloat badColor[3], GLfloat x, GLfloat y) > >+ const GLfloat badColor[3], GLfloat x, GLfloat y, > >+ const bool fail) > > { > > const char *m, *d, *f, *p; > >-char msg1[100], msg2[100], msg3[100]; > > > > switch (mode) { > > case GL_TRIANGLES: > >@@ -372,22 +373,23 @@ reportFailure(GLenum mode, int drawMode, GLuint facing, > > else > > p = "GL_LINE"; > > > >-snprintf(msg1, sizeof(msg1), "clipflat: Failure for %s(%s)," > >- " glFrontFace(%s), glPolygonMode(%s)\n", > >- d, m, f, p); > >+if (fail == true) { > > "if (fail)" would be sufficient. > > > >+printf("clipflat: Failure for %s(%s), glFrontFace(%s), " > >+ "glPolygonMode(%s)\n", > >+ d, m, f, p); > > > >-if (testing_first_pv) > >-snprintf(msg2, sizeof(msg2), > >- "\tGL_EXT_provoking_vertex test: " > >- "GL_FIRST_VERTEX_CONVENTION_EXT mode\n"); > >-else > >-msg2[0] = 0; > >+if (testing_first_pv) { > >+printf("\tGL_EXT_provoking_vertex test: " > >+ "GL_FIRST_VERTEX_CONVENTION_EXT mode\n"); > >+} > > > >-snprintf(msg3, sizeof(msg3), > >- "\tExpected color (0, 1, 0) but found (%g, %g, %g)\n", > >- badColor[0], badColor[1], badColor[2]); > >+printf("Expected color (0, 1, 0) but found (%g, %g, %g)\n", > >+ badColor[0], badColor[1], badColor[2]); > >+} > > > >-piglit_report_subtest_result(PIGLIT_FAIL, "%s%s%s", msg1, msg2, msg3); > >+piglit_report_subtest_result(fail ? PIGLIT_FAIL : PIGLIT_PASS, > >+ "%s(%s), glFrontFace(%s), > >glPolygonMode(%s)", > >+ d, m, f, p); > > } > > > > > >@@ -449,11 +451,17 @@ testPrim(GLenum mode, const GLfloat *verts, GLuint > >count) > > glPopMatrix(); > > > > if (!checkResult(badColor)) { > >-reportFailure(mode, > >drawMode, facing, fill, badColor, x, y); > >-return false; > >+reportSubtest(mode, > >drawMode, facing, fill, > >+ badColor, > >x, y, true); > >+goto failed; > > } > > } > > } > >+ > >+GLfloat badColor[3]; > >+reportSubtest(mode, drawMode,
[Piglit] [PATCH] glsl-es: Verify restrictions on global variable initializers
From: Ian RomanickSection 4.3 (Storage Qualifiers) of the OpenGL ES 1.00.17 spec says: "Declarations of globals without a storage qualifier, or with just the const qualifier, may include initializers, in which case they will be initialized before the first line of main() is executed. Such initializers must be a constant expression." The GLSL ES 3.00.4 spec has similar language. Desktop GLSL does not restrict initializers for global variables. Now it's okay for Matt to be irritated. Signed-off-by: Ian Romanick Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92304 Cc: Tapani Pälli Cc: Mark Janes Cc: Marta Lofstedt --- .../global-initializer/from-attribute.vert | 14 + .../compiler/global-initializer/from-constant.frag | 14 + .../compiler/global-initializer/from-constant.vert | 14 + .../compiler/global-initializer/from-global.frag | 14 + .../compiler/global-initializer/from-global.vert | 14 + .../compiler/global-initializer/from-sequence.frag | 14 + .../compiler/global-initializer/from-sequence.vert | 14 + .../compiler/global-initializer/from-uniform.frag | 14 + .../compiler/global-initializer/from-uniform.vert | 14 + .../compiler/global-initializer/from-varying.frag | 14 + .../global-initializer/from-attribute.vert | 26 .../compiler/global-initializer/from-constant.frag | 28 + .../compiler/global-initializer/from-constant.vert | 26 .../compiler/global-initializer/from-global.frag | 28 + .../compiler/global-initializer/from-global.vert | 26 .../compiler/global-initializer/from-sequence.frag | 31 +++ .../compiler/global-initializer/from-sequence.vert | 29 ++ .../compiler/global-initializer/from-uniform.frag | 28 + .../compiler/global-initializer/from-uniform.vert | 26 .../compiler/global-initializer/from-varying.frag | 28 + .../compiler/global-initializer/from-constant.frag | 28 + .../compiler/global-initializer/from-constant.vert | 25 .../compiler/global-initializer/from-global.frag | 28 + .../compiler/global-initializer/from-global.vert | 25 .../compiler/global-initializer/from-in.frag | 28 + .../compiler/global-initializer/from-in.vert | 25 .../compiler/global-initializer/from-sequence.frag | 35 ++ .../compiler/global-initializer/from-sequence.vert | 32 .../compiler/global-initializer/from-uniform.frag | 28 + .../compiler/global-initializer/from-uniform.vert | 25 30 files changed, 695 insertions(+) create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-attribute.vert create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-constant.frag create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-constant.vert create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-global.frag create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-global.vert create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-sequence.frag create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-sequence.vert create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-uniform.frag create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-uniform.vert create mode 100644 tests/spec/glsl-1.10/compiler/global-initializer/from-varying.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-attribute.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-constant.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-constant.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-global.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-global.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-sequence.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-sequence.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-uniform.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-uniform.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/global-initializer/from-varying.frag create mode 100644 tests/spec/glsl-es-3.00/compiler/global-initializer/from-constant.frag create mode 100644 tests/spec/glsl-es-3.00/compiler/global-initializer/from-constant.vert create mode 100644
Re: [Piglit] [PATCH 2/2] oes_compressed_paletted_texture: add missing BindTexture()
On 07/27/2015 02:13 PM, Nanley Chery wrote: > From: Nanley Chery> > Without glBindTexture(), the test was unintentionally modifying the default > texture object. Make it use the generated texture instead. > > Signed-off-by: Nanley Chery > Cc: Ian Romanick > --- > .../oes_compressed_paletted_texture-api.c| 1 > + > 1 file changed, 1 insertion(+) > > diff --git > a/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c > > b/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c > index 4d9f5b7..d8973d4 100644 > --- > a/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c > +++ > b/tests/spec/oes_compressed_paletted_texture/oes_compressed_paletted_texture-api.c > @@ -70,6 +70,7 @@ piglit_init(int argc, char **argv) > piglit_require_extension("GL_OES_compressed_paletted_texture"); > > glGenTextures(1, ); > + glBindTexture(GL_TEXTURE_2D, ); I think you meant "glBindTexture(GL_TEXTURE_2D, tex);" Shows how much my review is worth... derp. > /* The OES_compressed_paletted_texture spec says: >* > ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH v2] clipflat: Fix subtest reporting
On 10/06/2015 04:59 PM, Dylan Baker wrote: There are two problems with the way this test reports subtests: First, it only reports subtests when they fail. This has all kinds of problems. It's not at all what the summary code expects, the summary code expects that subtests are always present, which means that they will show up under disabled/enabled pages instead of fixes/regressions, which in turn, will confuse developers. Second, it tries to report lots of information as the subtest name. This causes the JSON parser in python (JSON is used by the tests to communicate with the runner) to choke and die. This patch makes a couple of changes to correct this. First, it reports the subtest result always, whether pass or fail. Second, it simplifies the names of the subtests, and passes the other information to stdout, which the runner will scoop up and record for a developer to go look at. v2: - Fix some formatting that wasn't right (indents with 4 spaces not 8 space tabs) - Report all subtests in both pass and fail cases - Fix some minor things as reported by Brian Paul - simplify some control flow - add function to report each quadrant as a separate subtest with nice names cc: Brian PaulSigned-off-by: Dylan Baker --- Brian, I hope I've corrected the issues you've pointed out. I've also made some changes (with some help from Ken Graunke) to hopefully make the subtest information more useful. Looks great. Reviewed-by: Brian Paul ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH v2] clipflat: Fix subtest reporting
There are two problems with the way this test reports subtests: First, it only reports subtests when they fail. This has all kinds of problems. It's not at all what the summary code expects, the summary code expects that subtests are always present, which means that they will show up under disabled/enabled pages instead of fixes/regressions, which in turn, will confuse developers. Second, it tries to report lots of information as the subtest name. This causes the JSON parser in python (JSON is used by the tests to communicate with the runner) to choke and die. This patch makes a couple of changes to correct this. First, it reports the subtest result always, whether pass or fail. Second, it simplifies the names of the subtests, and passes the other information to stdout, which the runner will scoop up and record for a developer to go look at. v2: - Fix some formatting that wasn't right (indents with 4 spaces not 8 space tabs) - Report all subtests in both pass and fail cases - Fix some minor things as reported by Brian Paul - simplify some control flow - add function to report each quadrant as a separate subtest with nice names cc: Brian PaulSigned-off-by: Dylan Baker --- Brian, I hope I've corrected the issues you've pointed out. I've also made some changes (with some help from Ken Graunke) to hopefully make the subtest information more useful. tests/general/clipflat.c | 95 +--- 1 file changed, 74 insertions(+), 21 deletions(-) diff --git a/tests/general/clipflat.c b/tests/general/clipflat.c index 91e410e..4a4f06a 100644 --- a/tests/general/clipflat.c +++ b/tests/general/clipflat.c @@ -1,5 +1,6 @@ /* * Copyright © 2009, 2013 VMware, Inc. + * Copyright © 2015 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -316,13 +317,56 @@ checkResult(GLfloat badColor[3]) } +char * +calcQuadrant(GLfloat x, GLfloat y) +{ + const char *strx, *stry; + char *ret; + int _x, _y; + _x = (int) x; + _y = (int) y; + + switch (_x) { + case -1: + strx = "left"; + break; + case 0: + strx = "center"; + break; + case 1: + strx = "right"; + break; + default: + assert(0); + } + + switch (_y) { + case 1: + stry = "top"; + break; + case 0: + stry = "middle"; + break; + case -1: + stry = "bottom"; + break; + default: + assert(0); + } + + asprintf(, "%s %s", strx, stry); + return ret; +} + + static void -reportFailure(GLenum mode, int drawMode, GLuint facing, +reportSubtest(GLenum mode, int drawMode, GLuint facing, GLuint fill, - const GLfloat badColor[3], GLfloat x, GLfloat y) + const GLfloat badColor[3], GLfloat x, GLfloat y, + bool pass) { const char *m, *d, *f, *p; - char msg1[100], msg2[100], msg3[100]; + char *q; switch (mode) { case GL_TRIANGLES: @@ -372,22 +416,29 @@ reportFailure(GLenum mode, int drawMode, GLuint facing, else p = "GL_LINE"; - snprintf(msg1, sizeof(msg1), "clipflat: Failure for %s(%s)," -" glFrontFace(%s), glPolygonMode(%s)\n", -d, m, f, p); + q = calcQuadrant(x, y); - if (testing_first_pv) - snprintf(msg2, sizeof(msg2), -"\tGL_EXT_provoking_vertex test: " -"GL_FIRST_VERTEX_CONVENTION_EXT mode\n"); - else - msg2[0] = 0; + if (!pass) { + printf("clipflat: Failure for %s(%s), glFrontFace(%s), " + "glPolygonMode(%s), quadrant: %s\n", + d, m, f, p, q); - snprintf(msg3, sizeof(msg3), -"\tExpected color (0, 1, 0) but found (%g, %g, %g)\n", -badColor[0], badColor[1], badColor[2]); + if (testing_first_pv) { + printf("\tGL_EXT_provoking_vertex test: " + "GL_FIRST_VERTEX_CONVENTION_EXT mode\n"); + } + + printf("Expected color (0, 1, 0) but found (%g, %g, %g)\n", + badColor[0], badColor[1], badColor[2]); + printf("\n"); + } - piglit_report_subtest_result(PIGLIT_FAIL, "%s%s%s", msg1, msg2, msg3); + piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL, +"%s(%s), glFrontFace(%s), glPolygonMode(%s), " +"quadrant: %s", +d, m, f, p, q); + + free(q);
[Piglit] [PATCH 2/2] arb_shader_storage_buffer_object: add AoA test for std430 layout
Signed-off-by: Samuel Iglesias Gonsalvez--- tests/all.py | 1 + .../CMakeLists.gl.txt | 1 + .../layout-std430-arrays-of-arrays-write-shader.c | 229 + 3 files changed, 231 insertions(+) create mode 100644 tests/spec/arb_shader_storage_buffer_object/layout-std430-arrays-of-arrays-write-shader.c diff --git a/tests/all.py b/tests/all.py index a9b3baa..a42308c 100644 --- a/tests/all.py +++ b/tests/all.py @@ -4089,6 +4089,7 @@ with profile.group_manager( g(['arb_shader_storage_buffer_object-layout-std140-write-shader'], 'layout-std140-write-shader') g(['arb_shader_storage_buffer_object-program_interface_query'], 'program-interface-query') g(['arb_shader_storage_buffer_object-layout-std140-arrays-of-arrays-write-shader'], 'layout-std140-arrays-of-arrays-write-shader') + g(['arb_shader_storage_buffer_object-layout-std430-arrays-of-arrays-write-shader'], 'layout-std430-arrays-of-arrays-write-shader') with profile.group_manager( PiglitGLTest, diff --git a/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt b/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt index e425df7..0d2331b 100644 --- a/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt +++ b/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt @@ -20,5 +20,6 @@ piglit_add_executable (arb_shader_storage_buffer_object-layout-std430-write-shad piglit_add_executable (arb_shader_storage_buffer_object-layout-std140-write-shader layout-std140-write-shader.c) piglit_add_executable (arb_shader_storage_buffer_object-program_interface_query program-interface-query.c) piglit_add_executable (arb_shader_storage_buffer_object-layout-std140-arrays-of-arrays-write-shader layout-std140-arrays-of-arrays-write-shader.c) +piglit_add_executable (arb_shader_storage_buffer_object-layout-std430-arrays-of-arrays-write-shader layout-std430-arrays-of-arrays-write-shader.c) # vim: ft=cmake: diff --git a/tests/spec/arb_shader_storage_buffer_object/layout-std430-arrays-of-arrays-write-shader.c b/tests/spec/arb_shader_storage_buffer_object/layout-std430-arrays-of-arrays-write-shader.c new file mode 100644 index 000..d7ed42a --- /dev/null +++ b/tests/spec/arb_shader_storage_buffer_object/layout-std430-arrays-of-arrays-write-shader.c @@ -0,0 +1,229 @@ +/* + * Copyright © 2015 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 layout-std430-arrays-of-arrays-write-shader.c + * + * Tests that shader storage block writes in GLSL works correctly (offsets and + * values) when interface packing qualifier is std140 and row_major. + * This test includes some buffer variables defined as arrays of arrays. + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + config.window_width = 100; + config.window_height = 100; + config.supports_gl_compat_version = 32; + config.supports_gl_core_version = 32; + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; + +PIGLIT_GL_TEST_CONFIG_END + +#define SSBO_SIZE 728 +#define NUM_QUERIES 11 + +static const char vs_pass_thru_text[] = + "#version 130\n" + "#extension GL_ARB_shader_storage_buffer_object : require\n" + "#extension GL_ARB_arrays_of_arrays : require\n" + "#extension GL_ARB_uniform_buffer_object : require\n" + "\n" + "struct A {\n" + " float a1;\n" + " vec2 a2_2[2][2];\n" + " mat3x4 a34_2[2][2];\n" + "};\n" + "layout(std430, binding=2) buffer ssbo {\n" + " vec4 v;\n" + " float f;\n" + " A s[2][3];\n" + " A unsized_array[][3];\n" + "};\n" + "in vec4 piglit_vertex;\n" + "void main() {\n" + " gl_Position = piglit_vertex;\n" +
[Piglit] [PATCH 1/2] arb_shader_storage_buffer_object: add AoA test for std140 layout
Signed-off-by: Samuel Iglesias Gonsalvez--- tests/all.py | 1 + .../CMakeLists.gl.txt | 1 + .../layout-std140-arrays-of-arrays-write-shader.c | 229 + 3 files changed, 231 insertions(+) create mode 100644 tests/spec/arb_shader_storage_buffer_object/layout-std140-arrays-of-arrays-write-shader.c diff --git a/tests/all.py b/tests/all.py index 0db54ac..a9b3baa 100644 --- a/tests/all.py +++ b/tests/all.py @@ -4088,6 +4088,7 @@ with profile.group_manager( g(['arb_shader_storage_buffer_object-layout-std430-write-shader'], 'layout-std430-write-shader') g(['arb_shader_storage_buffer_object-layout-std140-write-shader'], 'layout-std140-write-shader') g(['arb_shader_storage_buffer_object-program_interface_query'], 'program-interface-query') + g(['arb_shader_storage_buffer_object-layout-std140-arrays-of-arrays-write-shader'], 'layout-std140-arrays-of-arrays-write-shader') with profile.group_manager( PiglitGLTest, diff --git a/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt b/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt index 592d8a3..e425df7 100644 --- a/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt +++ b/tests/spec/arb_shader_storage_buffer_object/CMakeLists.gl.txt @@ -19,5 +19,6 @@ piglit_add_executable (arb_shader_storage_buffer_object-array-ssbo-binding array piglit_add_executable (arb_shader_storage_buffer_object-layout-std430-write-shader layout-std430-write-shader.c) piglit_add_executable (arb_shader_storage_buffer_object-layout-std140-write-shader layout-std140-write-shader.c) piglit_add_executable (arb_shader_storage_buffer_object-program_interface_query program-interface-query.c) +piglit_add_executable (arb_shader_storage_buffer_object-layout-std140-arrays-of-arrays-write-shader layout-std140-arrays-of-arrays-write-shader.c) # vim: ft=cmake: diff --git a/tests/spec/arb_shader_storage_buffer_object/layout-std140-arrays-of-arrays-write-shader.c b/tests/spec/arb_shader_storage_buffer_object/layout-std140-arrays-of-arrays-write-shader.c new file mode 100644 index 000..4ca29be --- /dev/null +++ b/tests/spec/arb_shader_storage_buffer_object/layout-std140-arrays-of-arrays-write-shader.c @@ -0,0 +1,229 @@ +/* + * Copyright © 2015 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 layout-std140-arrays-of-arrays-write-shader.c + * + * Tests that shader storage block writes in GLSL works correctly (offsets and + * values) when interface packing qualifier is std140 and row_major. + * This test includes some buffer variables defined as arrays of arrays. + */ + +#include "piglit-util-gl.h" + +PIGLIT_GL_TEST_CONFIG_BEGIN + config.window_width = 100; + config.window_height = 100; + config.supports_gl_compat_version = 32; + config.supports_gl_core_version = 32; + config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; + +PIGLIT_GL_TEST_CONFIG_END + +#define SSBO_SIZE 1016 +#define NUM_QUERIES 11 + +static const char vs_pass_thru_text[] = + "#version 130\n" + "#extension GL_ARB_shader_storage_buffer_object : require\n" + "#extension GL_ARB_arrays_of_arrays : require\n" + "#extension GL_ARB_uniform_buffer_object : require\n" + "\n" + "struct A {\n" + " float a1;\n" + " vec2 a2_2[2][2];\n" + " mat3x4 a34_2[2][2];\n" + "};\n" + "layout(std140, row_major, binding=2) buffer ssbo {\n" + " vec4 v;\n" + " float f;\n" + " A s[2][3];\n" + " A unsized_array[][3];\n" + "};\n" + "in vec4 piglit_vertex;\n" + "void main() {\n" + " gl_Position = piglit_vertex;\n" + " f = 4.0;\n" + "