[Piglit] [Bug 106626] New: [CI][Intel-GFX-CI] large amount of @execution@build-in-functions@ tests crash

2018-05-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106626

Bug ID: 106626
   Summary: [CI][Intel-GFX-CI] large amount of
@execution@build-in-functions@ tests crash
   Product: piglit
   Version: unspecified
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: tests
  Assignee: piglit@lists.freedesktop.org
  Reporter: tomi.p.sarv...@intel.com
QA Contact: piglit@lists.freedesktop.org

A couple of Intel-GFX-CI hosts started crashing in piglit tests when the
following commits were taken in:

fae925a49 Specify an explicit window size in builtin uniform tests.
3ecdac456 Fix bogus assertions in builtin uniform test generator.

This might be an environment issue on CI, but marking as a behaviour change
anyway.

All failing tests can be seen in directory level at
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4491/pig-*
Approximately 28 tests fail on SKL, 26 on GLK, 6.5k on HSW and 4.5k on SNB.

Examples:

SNB
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4491/pig-snb-2600/spec%40glsl-1.10%40execution%40built-in-functions%40fs-abs-float.html
HSW
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4491/pig-hsw-4770r/spec%40arb_gpu_shader_int64%40execution%40built-in-functions%40cs-abs-i64vec2.html
SKL
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4491/pig-skl-6600/spec%40glsl-1.10%40execution%40built-in-functions%40fs-acos-float.html
GLK
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4491/pig-glk-j5005/spec%40glsl-1.10%40execution%40built-in-functions%40fs-acos-float.html

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


[Piglit] [Bug 106626] [CI][Intel-GFX-CI] large amount of @execution@build-in-functions@ tests crash

2018-05-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=106626

Mark Janes  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Janes  ---
This piglit patch was reverted a couple of hours after the regression.

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


Re: [Piglit] [PATCH] gl-3.2-compat: test gl_*Color built-ins with geometry shaders

2018-05-23 Thread Marek Olšák
Tested-by: Marek Olšák 
Acked-by: Marek Olšák 

Marek

On Mon, May 21, 2018 at 4:32 AM, Timothy Arceri 
wrote:

> This updates the existing vertex shader test and makes it more
> flexable.
> ---
>  tests/spec/gl-2.0/vertex-program-two-side.c | 195 +++-
>  1 file changed, 145 insertions(+), 50 deletions(-)
>
> diff --git a/tests/spec/gl-2.0/vertex-program-two-side.c
> b/tests/spec/gl-2.0/vertex-program-two-side.c
> index 81cf11d9d..c53668124 100644
> --- a/tests/spec/gl-2.0/vertex-program-two-side.c
> +++ b/tests/spec/gl-2.0/vertex-program-two-side.c
> @@ -66,6 +66,16 @@ static float secondary_frontcolor[4] = {0.0, 0.25, 0.0,
> 0.0};
>  static float secondary_backcolor[4] = {0.0, 0.0, 0.25, 0.0};
>  static int draw_secondary_loc;
>
> +char *vs_outputs[4] = {"", "", "", ""};
> +char *gs_outputs[4] = {"", "", "", ""};
> +char *gs_inputs_outputs[4] = {"", "", "", ""};
> +
> +static const char *dummy_vs_source =
> +   "void main()\n"
> +   "{\n"
> +   "   gl_Position = gl_Vertex;\n"
> +   "}\n";
> +
>  static const char *fs_source =
> "uniform bool draw_secondary;\n"
> "void main()\n"
> @@ -76,24 +86,13 @@ static const char *fs_source =
> "   gl_FragColor = gl_Color;\n"
> "}\n";
>
> -enum piglit_result
> -piglit_display(void)
> +static bool
> +probe_colors()
>  {
> +   bool pass = true;
> int x1 = 0, y1 = 0;
> int w = piglit_width / 2, h = piglit_height / 2;
> int x2 = piglit_width - w, y2 = piglit_height - h;
> -   bool pass = true;
> -
> -   glClearColor(0.5, 0.5, 0.5, 0.5);
> -   glClear(GL_COLOR_BUFFER_BIT);
> -
> -   glUniform1i(draw_secondary_loc, false);
> -   piglit_draw_rect(-1,  0,  1, 1); /* top left */
> -   piglit_draw_rect( 1,  0, -1, 1); /* top right */
> -
> -   glUniform1i(draw_secondary_loc, true);
> -   piglit_draw_rect(-1, -1,  1, 1); /* bot left */
> -   piglit_draw_rect( 1, -1, -1, 1); /* bot right */
>
> if (front) {
> pass = pass && piglit_probe_rect_rgba(x1, y2, w, h,
> @@ -127,13 +126,41 @@ piglit_display(void)
> }
> }
>
> -   piglit_present_results();
> +   return pass;
> +}
>
> -   return pass ? PIGLIT_PASS : PIGLIT_FAIL;
> +static bool
> +test_prog(unsigned prog, const char *test_name)
> +{
> +   glUseProgram(prog);
> +   draw_secondary_loc = glGetUniformLocation(prog, "draw_secondary");
> +   assert(draw_secondary_loc != -1);
> +
> +   if (enabled)
> +   glEnable(GL_VERTEX_PROGRAM_TWO_SIDE);
> +
> +   /* Draw */
> +   glClearColor(0.5, 0.5, 0.5, 0.5);
> +   glClear(GL_COLOR_BUFFER_BIT);
> +
> +   glUniform1i(draw_secondary_loc, false);
> +   piglit_draw_rect(-1,  0,  1, 1); /* top left */
> +   piglit_draw_rect( 1,  0, -1, 1); /* top right */
> +
> +   glUniform1i(draw_secondary_loc, true);
> +   piglit_draw_rect(-1, -1,  1, 1); /* bot left */
> +   piglit_draw_rect( 1, -1, -1, 1); /* bot right */
> +
> +   /* probe and report result */
> +   bool pass = probe_colors();
> +   piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL,
> "%s",
> +test_name);
> +
> +   return pass;
>  }
>
>  static void
> -setup_output(char **out, const char *name, float *values)
> +setup_vs_output(char **out, const char *name, float *values)
>  {
> (void)!asprintf(out,
>  "  %s = vec4(%f, %f, %f, %f);\n",
> @@ -144,15 +171,94 @@ setup_output(char **out, const char *name, float
> *values)
>  values[3]);
>  }
>
> -void
> -piglit_init(int argc, char **argv)
> +static void
> +setup_gs_vars(char **in_out, char **out, const char *name, float *values)
> +{
> +   (void)!asprintf(in_out, "   %s = gl_in[i].%s;\n", name, name);
> +   (void)!asprintf(out, "  %s = vec4(%f, %f, %f, %f);\n",
> +   name,
> +   values[0],
> +   values[1],
> +   values[2],
> +   values[3]);
> +}
> +
> +static void
> +create_gs_source(char **gs_source, char **builtins)
> +{
> +   (void)!asprintf(gs_source,
> +   "#version 150 compatibility\n"
> +   "layout(triangles) in;\n"
> +   "layout(triangle_strip, max_vertices = 3) out;\n"
> +   "\n"
> +   "void main()\n"
> +   "{\n"
> +   "   for (int i = 0; i < 3; i++) {\n"
> +   "   gl_Position = gl_in[i].gl_Position;\n"
> +   "   %s%s%s%s\n"
> +   "   EmitVertex();\n"
> +   "   }\n"
> +   "}\n",
> +   builtins[0],
> +   builtins[1],
> +   builtins[2],
> +   builtins[3]);
> +}
> +
> +enum piglit_result
> +piglit_display(void)
>  {
> -   char *vs_outputs[4] = {"", "", "", ""};
>  

Re: [Piglit] [PATCH v2] gl-3.2-compat: test gl_TexCoord[] built-in with geometry shaders

2018-05-23 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Mon, May 21, 2018 at 8:59 PM, Timothy Arceri 
wrote:

> This tests both setting gl_TexCoord[] in the geometry shader and
> using the gs to passthrough the gl_TexCoord[] values from the
> vertex shader.
> ---
>  .../gs-texcoord-array-2.shader_test   | 57 
>  .../gs-texcoord-array.shader_test | 51 ++
>  .../vs-gs-texcoord-array-2.shader_test| 65 ++
>  .../vs-gs-texcoord-array.shader_test  | 66 +++
>  4 files changed, 239 insertions(+)
>  create mode 100644 tests/spec/glsl-1.50/execution/compatibility/gs-
> texcoord-array-2.shader_test
>  create mode 100644 tests/spec/glsl-1.50/execution/compatibility/gs-
> texcoord-array.shader_test
>  create mode 100644 tests/spec/glsl-1.50/execution/compatibility/vs-gs-
> texcoord-array-2.shader_test
>  create mode 100644 tests/spec/glsl-1.50/execution/compatibility/vs-gs-
> texcoord-array.shader_test
>
> diff --git 
> a/tests/spec/glsl-1.50/execution/compatibility/gs-texcoord-array-2.shader_test
> b/tests/spec/glsl-1.50/execution/compatibility/gs-
> texcoord-array-2.shader_test
> new file mode 100644
> index 0..852bc10c0
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/execution/compatibility/gs-
> texcoord-array-2.shader_test
> @@ -0,0 +1,57 @@
> +[require]
> +GL COMPAT >= 3.2
> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150 compatibility
> +
> +out gl_PerVertex {
> +   vec4 gl_Position;
> +   vec4 gl_TexCoord[5];
> +};
> +
> +void main()
> +{
> +   gl_Position = gl_Vertex;
> +}
> +
> +[geometry shader]
> +#version 150 compatibility
> +
> +layout(triangles) in;
> +layout(triangle_strip, max_vertices = 3) out;
> +
> +out vec4 gl_TexCoord[5];
> +
> +void main()
> +{
> +   for (int i = 0; i < 3; i++) {
> +   gl_Position = gl_in[i].gl_Position;
> +
> +   /* 0.05, 0.05, 0.10, 0.15, 0.20 */
> +   for (int j = 0; j < 5; j++) {
> +   gl_TexCoord[j] = vec4(float(j) * 0.05);
> +   }
> +
> +   EmitVertex();
> +   }
> +}
> +
> +[fragment shader]
> +#version 110
> +
> +varying vec4 gl_TexCoord[5];
> +void main()
> +{
> +   vec4 result = vec4(0.0);
> +
> +   for (int i = 0; i < 4; i++)
> +   result += gl_TexCoord[i];
> +
> +   /* 0.00 + 0.05 + 0.10 + 0.15 = 0.30 */
> +   gl_FragColor = result;
> +}
> +
> +[test]
> +draw rect -1 -1 2 2
> +probe rgba 1 1 0.3 0.3 0.3 0.3
> diff --git 
> a/tests/spec/glsl-1.50/execution/compatibility/gs-texcoord-array.shader_test
> b/tests/spec/glsl-1.50/execution/compatibility/gs-
> texcoord-array.shader_test
> new file mode 100644
> index 0..0ee316ef1
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/execution/compatibility/gs-
> texcoord-array.shader_test
> @@ -0,0 +1,51 @@
> +[require]
> +GL COMPAT >= 3.2
> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150 compatibility
> +
> +void main()
> +{
> +   gl_Position = gl_Vertex;
> +}
> +
> +[geometry shader]
> +#version 150 compatibility
> +
> +layout(triangles) in;
> +layout(triangle_strip, max_vertices = 3) out;
> +
> +uniform int n;
> +
> +out vec4 gl_TexCoord[5];
> +
> +void main()
> +{
> +   for (int i = 0; i < 3; i++) {
> +   gl_Position = gl_in[i].gl_Position;
> +
> +   for (int j = 0; j < n; j++) {
> +   gl_TexCoord[j] = vec4(0.5, 0.5, 0.5, 0.5) *
> float(j);
> +   }
> +
> +   EmitVertex();
> +   }
> +}
> +
> +[fragment shader]
> +#version 150 compatibility
> +
> +uniform int index;
> +in vec4 gl_TexCoord[5];
> +
> +void main()
> +{
> +   gl_FragColor = gl_TexCoord[index];
> +}
> +
> +[test]
> +uniform int index 1
> +uniform int n 4
> +draw rect -1 -1 2 2
> +probe rgba 1 1 0.5 0.5 0.5 0.5
> diff --git 
> a/tests/spec/glsl-1.50/execution/compatibility/vs-gs-texcoord-array-2.shader_test
> b/tests/spec/glsl-1.50/execution/compatibility/vs-gs-
> texcoord-array-2.shader_test
> new file mode 100644
> index 0..ec910524c
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/execution/compatibility/vs-gs-
> texcoord-array-2.shader_test
> @@ -0,0 +1,65 @@
> +[require]
> +GL COMPAT >= 3.2
> +GLSL >= 1.50
> +
> +[vertex shader]
> +#version 150 compatibility
> +
> +out gl_PerVertex {
> +   vec4 gl_Position;
> +   vec4 gl_TexCoord[5];
> +};
> +
> +void main()
> +{
> +   /* 0.05, 0.05, 0.10, 0.15, 0.20 */
> +   for (int i = 0; i < 5; i++)
> +   gl_TexCoord[i] = vec4(float(i) * 0.05);
> +
> +   gl_Position = gl_Vertex;
> +}
> +
> +[geometry shader]
> +#version 150 compatibility
> +
> +layout(triangles) in;
> +layout(triangle_strip, max_vertices = 3) out;
> +
> +in gl_PerVertex {
> +   vec4 gl_Position;
> +   vec4 gl_TexCoord[5];
> +} gl_in[];
> +
> +out vec4 gl_TexCoord[5];
> +
> +void main()
> +{
> +   for (int i = 0; i < 3; i++) {
> +   gl_Position = gl_in[i].gl_Position;
> +
> +   for (int j