Re: [Piglit] [PATCH] arb_shading_language_420pack: Make compatible with 4.30.
On Mon, Jun 06, 2016 at 02:40:15PM -0700, Matt Turner wrote: > 4.30 removes gl_FragColor. In debugging bug 96320, I found it useful to > replace gl_FragColor with a user-defined varying so that the tests could > be run under GLSL 4.30. Reviewed-by: Topi Pohjolainen ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] shader_runner: Fix get_ints on 32-bit systems.
On Monday, June 6, 2016 3:56:09 PM PDT Mark Janes wrote: > Kenneth Graunke writes: > > > The new ARB_vertex_attrib_64bit tests specify integer uniform values > > as hex, such as 0xc21620c5. As an integer value, this is beyond LONG_MAX > > on 32-bit systems. The intent is to parse it as an unsigned hex value and > > bitcast it. > > > > However, we still need to handle parsing values with negative signs. > > > > Using strtoll and truncating works. > > > > Signed-off-by: Kenneth Graunke > > --- > > tests/shaders/shader_runner.c | 2 +- > > tests/util/piglit-vbo.cpp | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c > > index 94c7826..56fd97c 100644 > > --- a/tests/shaders/shader_runner.c > > +++ b/tests/shaders/shader_runner.c > > @@ -1398,7 +1398,7 @@ get_ints(const char *line, int *ints, unsigned count) > > unsigned i; > > > > for (i = 0; i < count; i++) > > - ints[i] = strtol(line, (char **) &line, 0); > > + ints[i] = strtoll(line, (char **) &line, 0); > > } > > > > > > diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp > > index fd7e72a..50e6731 100644 > > --- a/tests/util/piglit-vbo.cpp > > +++ b/tests/util/piglit-vbo.cpp > > @@ -387,8 +387,8 @@ vertex_attrib_description::parse_datum(const char > > **text, void *data) const > > break; > > } > > case GL_INT: { > > - long value = (long) strtoll(*text, &endptr, 0); > > - if (errno == ERANGE) { > > + long long value = strtoll(*text, &endptr, 0); > > + if (errno == ERANGE || (unsigned long long) value > > > 0xull) { > ^ > with this check removed, the series corrects all 32 bit failures > introduced by b7eb469, and is > > Tested-by: Mark Janes Right, the value > 0xull bit is bogus - the sign bit gets extended. I've just dropped this locally. It removes a bit of sanity checking for bogus values written in .shader_test files, but we don't sanity check most values, either. --Ken signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] shader_runner: Fix get_ints on 32-bit systems.
Kenneth Graunke writes: > The new ARB_vertex_attrib_64bit tests specify integer uniform values > as hex, such as 0xc21620c5. As an integer value, this is beyond LONG_MAX > on 32-bit systems. The intent is to parse it as an unsigned hex value and > bitcast it. > > However, we still need to handle parsing values with negative signs. > > Using strtoll and truncating works. > > Signed-off-by: Kenneth Graunke > --- > tests/shaders/shader_runner.c | 2 +- > tests/util/piglit-vbo.cpp | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c > index 94c7826..56fd97c 100644 > --- a/tests/shaders/shader_runner.c > +++ b/tests/shaders/shader_runner.c > @@ -1398,7 +1398,7 @@ get_ints(const char *line, int *ints, unsigned count) > unsigned i; > > for (i = 0; i < count; i++) > - ints[i] = strtol(line, (char **) &line, 0); > + ints[i] = strtoll(line, (char **) &line, 0); > } > > > diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp > index fd7e72a..50e6731 100644 > --- a/tests/util/piglit-vbo.cpp > +++ b/tests/util/piglit-vbo.cpp > @@ -387,8 +387,8 @@ vertex_attrib_description::parse_datum(const char **text, > void *data) const > break; > } > case GL_INT: { > - long value = (long) strtoll(*text, &endptr, 0); > - if (errno == ERANGE) { > + long long value = strtoll(*text, &endptr, 0); > + if (errno == ERANGE || (unsigned long long) value > > 0xull) { ^ with this check removed, the series corrects all 32 bit failures introduced by b7eb469, and is Tested-by: Mark Janes > printf("Could not parse as signed integer\n"); > return false; > } > -- > 2.8.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_gpu_shader_fp64: emit GS output for every vertex
Because EmitVertex() will invalidate all previous output writes, we need to emit the output for every vertex. This fixes is similar to the one in the GS tests generator. Signed-off-by: Samuel Pitoiset --- .../execution/gs-isnan-dvec.shader_test| 36 +++--- .../uniform_buffers/gs-array-copy.shader_test | 4 +-- .../uniform_buffers/gs-dmat4-row-major.shader_test | 4 +-- .../uniform_buffers/gs-dmat4.shader_test | 4 +-- .../gs-double-array-const-index.shader_test| 4 +-- .../gs-double-array-variable-index.shader_test | 4 +-- .../gs-double-bool-double.shader_test | 4 +-- ...ouble-uniform-array-direct-indirect.shader_test | 4 +-- .../gs-doubles-float-mixed.shader_test | 4 +-- ...dvec4-uniform-array-direct-indirect.shader_test | 4 +-- .../uniform_buffers/gs-nested-struct.shader_test | 4 +-- 11 files changed, 38 insertions(+), 38 deletions(-) diff --git a/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec.shader_test index 28f7505..314a87c 100644 --- a/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec.shader_test +++ b/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec.shader_test @@ -38,29 +38,29 @@ out vec4 fs_color; void main() { - fs_color = vec4(0.0); + for (int i = 0; i < 3; i++) { + fs_color = vec4(0.0); - dvec4 r4 = numerator/denominator; - dvec4 bl4 = dvec4(isnan(r4)); - if (distance(bl4, expected) > tolerance) - fs_color.x = 1.0; + dvec4 r4 = numerator/denominator; + dvec4 bl4 = dvec4(isnan(r4)); + if (distance(bl4, expected) > tolerance) + fs_color.x = 1.0; - dvec3 r3 = numerator.xyz/denominator.xyz; - dvec3 bl3 = dvec3(isnan(r3)); - if (distance(bl3, expected.xyz) > tolerance) - fs_color.y = 1.0; + dvec3 r3 = numerator.xyz/denominator.xyz; + dvec3 bl3 = dvec3(isnan(r3)); + if (distance(bl3, expected.xyz) > tolerance) + fs_color.y = 1.0; - dvec2 r2 = numerator.zw/denominator.zw; - dvec2 bl2 = dvec2(isnan(r2)); - if (distance(bl2, expected.zw) > tolerance) - fs_color.z = 1.0; + dvec2 r2 = numerator.zw/denominator.zw; + dvec2 bl2 = dvec2(isnan(r2)); + if (distance(bl2, expected.zw) > tolerance) + fs_color.z = 1.0; - double r1 = numerator.x/denominator.x; - double bl1 = double(isnan(r1)); - if (distance(bl1, expected.x) > tolerance) - fs_color.w = 1.0; + double r1 = numerator.x/denominator.x; + double bl1 = double(isnan(r1)); + if (distance(bl1, expected.x) > tolerance) + fs_color.w = 1.0; - for (int i = 0; i < 3; i++) { gl_Position = vertex_to_gs[i]; EmitVertex(); } diff --git a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-array-copy.shader_test b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-array-copy.shader_test index 0e86c11..efefdf0 100644 --- a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-array-copy.shader_test +++ b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-array-copy.shader_test @@ -38,10 +38,10 @@ void main() dvec4 temp[4] = colors; temp[0] = dvec4(1.0, 0.0, 0.0, arg0); dvec4 result = temp[i]; - v = distance(result, expected) <= tolerance - ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 1.0, 0.0, 1.0); for (int j = 0; j < 3; j++) { + v = distance(result, expected) <= tolerance + ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 1.0, 0.0, 1.0); gl_Position = vertex_to_gs[j]; EmitVertex(); } diff --git a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4-row-major.shader_test b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4-row-major.shader_test index 4c2c8d4..a9c5036 100644 --- a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4-row-major.shader_test +++ b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4-row-major.shader_test @@ -34,10 +34,10 @@ out vec4 v; void main() { dvec4 result = dvec4(m[0] + m[1] + m[2] + m[3] + arg0); - v = distance(result, expected) <= tolerance - ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 1.0, 0.0, 1.0); for (int i = 0; i < 3; i++) { + v = distance(result, expected) <= tolerance + ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 1.0, 0.0, 1.0); gl_Position = vertex_to_gs[i]; EmitVertex(); } diff --git a/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4.shader_test b/tests/spec/arb_gpu_shader_fp64/uniform_buffers/gs-dmat4.shader_test index f66507c..77a90c5
[Piglit] [PATCH] arb_gpu_shader_fp64: fix GS tests generator
In order to emit a color for each vertex, we need to move fs_color inside the loop because EmitVertex() will invalidate all previous output writes, and there is an interpolated varying in the fragment shader. Signed-off-by: Samuel Pitoiset --- generated_tests/templates/gen_conversion_fp64/shader.geom.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated_tests/templates/gen_conversion_fp64/shader.geom.mako b/generated_tests/templates/gen_conversion_fp64/shader.geom.mako index bf64065..4e19579 100644 --- a/generated_tests/templates/gen_conversion_fp64/shader.geom.mako +++ b/generated_tests/templates/gen_conversion_fp64/shader.geom.mako @@ -16,9 +16,9 @@ void main() { ${to_type} converted = ${converted_from}; bool match = converted == to; - fs_color = match ? GREEN : RED; for (int i = 0; i < 3; i++) { + fs_color = match ? GREEN : RED; gl_Position = vertex_to_gs[i]; EmitVertex(); } -- 2.8.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] arb_shading_language_420pack: Make compatible with 4.30.
4.30 removes gl_FragColor. In debugging bug 96320, I found it useful to replace gl_FragColor with a user-defined varying so that the tests could be run under GLSL 4.30. --- .../execution/aggregate-dynamic-initializer-matrix.shader_test | 3 ++- .../execution/aggregate-dynamic-initializer-sized-array.shader_test | 3 ++- .../execution/aggregate-dynamic-initializer-struct.shader_test | 3 ++- .../aggregate-dynamic-initializer-unsized-array.shader_test | 3 ++- .../execution/aggregate-initializer-matrix.shader_test | 3 ++- .../execution/aggregate-initializer-sized-array.shader_test | 3 ++- .../execution/aggregate-initializer-struct.shader_test | 3 ++- .../execution/aggregate-initializer-unsized-array.shader_test | 3 ++- .../execution/const-var-non-constant-expr.shader_test | 3 ++- .../execution/implicit-return-type-conversion.shader_test | 4 +++- .../execution/length-matrix.shader_test | 6 -- .../execution/length-vector.shader_test | 6 -- .../execution/scalar-swizzle.shader_test| 4 +++- 13 files changed, 32 insertions(+), 15 deletions(-) diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test index 7b923e8..478767e 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-matrix.shader_test @@ -44,9 +44,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test index 8191ceb..deb9bbd 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-sized-array.shader_test @@ -51,9 +51,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test index a04a2fa..0fce9c6 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-struct.shader_test @@ -73,9 +73,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test index 5300f49..8f6d5c1 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-dynamic-initializer-unsized-array.shader_test @@ -53,9 +53,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test index f5da4c9..bb6a543 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-matrix.shader_test @@ -39,9 +39,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_color = color; } [test] diff --git a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test index 5ac422d..df28262 100644 --- a/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test +++ b/tests/spec/arb_shading_language_420pack/execution/aggregate-initializer-sized-array.shader_test @@ -47,9 +47,10 @@ void main() [fragment shader] in vec4 color; +out vec4 frag_color; void main() { -gl_FragColor = color;; +frag_c
[Piglit] [PATCH 1/2] shader_runner: Fix integer vbo attribute parsing on 32-bit systems.
The new ARB_vertex_attrib_64bit tests specify integer vertex attributes with hex values, such as 0xc21620c5. As an integer value, this is beyond LONG_MAX on 32-bit systems. The intent is to parse it as an unsigned hex value and bitcast it. However, we still need to handle parsing values with negative signs. Using strtoll and truncating should work. It breaks the errno-based range validation, but we can still at least try to reject some cases. Signed-off-by: Kenneth Graunke --- tests/util/piglit-vbo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp index 1bdd9da..fd7e72a 100644 --- a/tests/util/piglit-vbo.cpp +++ b/tests/util/piglit-vbo.cpp @@ -387,7 +387,7 @@ vertex_attrib_description::parse_datum(const char **text, void *data) const break; } case GL_INT: { - long value = strtol(*text, &endptr, 0); + long value = (long) strtoll(*text, &endptr, 0); if (errno == ERANGE) { printf("Could not parse as signed integer\n"); return false; -- 2.8.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] shader_runner: Fix get_ints on 32-bit systems.
The new ARB_vertex_attrib_64bit tests specify integer uniform values as hex, such as 0xc21620c5. As an integer value, this is beyond LONG_MAX on 32-bit systems. The intent is to parse it as an unsigned hex value and bitcast it. However, we still need to handle parsing values with negative signs. Using strtoll and truncating works. Signed-off-by: Kenneth Graunke --- tests/shaders/shader_runner.c | 2 +- tests/util/piglit-vbo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 94c7826..56fd97c 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -1398,7 +1398,7 @@ get_ints(const char *line, int *ints, unsigned count) unsigned i; for (i = 0; i < count; i++) - ints[i] = strtol(line, (char **) &line, 0); + ints[i] = strtoll(line, (char **) &line, 0); } diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp index fd7e72a..50e6731 100644 --- a/tests/util/piglit-vbo.cpp +++ b/tests/util/piglit-vbo.cpp @@ -387,8 +387,8 @@ vertex_attrib_description::parse_datum(const char **text, void *data) const break; } case GL_INT: { - long value = (long) strtoll(*text, &endptr, 0); - if (errno == ERANGE) { + long long value = strtoll(*text, &endptr, 0); + if (errno == ERANGE || (unsigned long long) value > 0xull) { printf("Could not parse as signed integer\n"); return false; } -- 2.8.3 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Delete spec/glsl-1.10/compiler/literals/invalid-float-suffix-*.vert.
Acked-by: Matt Turner ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 02/20] appveyor.yml: Add appveyor for python code
On 02/06/16 00:50, Dylan Baker wrote: This currently doesn't test building piglit (the C/C++ code), only the python bits, and only the framework, not the generators. It's probably worth adding support for all of that, but it's a more involved project, and I'm just trying to not break the framework on windows anymore. It's a start. Thanks for doing this! Signed-off-by: Dylan Baker Acked-by: Jose Fonseca ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit