From imirkin at alum.mit.edu Sun Jan 5 23:05:51 2020 From: imirkin at alum.mit.edu (Ilia Mirkin) Date: Sun, 5 Jan 2020 18:05:51 -0500 Subject: [Piglit] [PATCH] glsl-1.50: test gl_PrimitiveID xfb Message-ID: <20200105230551.21859-1-imirkin@alum.mit.edu> This appears to trigger an issue on at least GP108 due to an odd shader export write restriction. And we should be testing gl_PrimitiveID anyways. Signed-off-by: Ilia Mirkin --- .../execution/geometry/transform-feedback-builtins.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c index cfd71c944..4144c7cb1 100644 --- a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c +++ b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c @@ -60,6 +60,7 @@ static const char *gs_template = "{\n" " for (int i = 0; i < 3; i++) {\n" " gl_Layer = 2 * i + 1;\n" + " gl_PrimitiveID = gl_PrimitiveIDIn + i;\n" "%s" " EmitVertex();\n" " }\n" @@ -71,16 +72,17 @@ static const char *gs_template = * above, the output should be a sequence of integers defined in this * array. */ -static const int expected[2][3] = {{1, 3, 5}, /* gl_Layer */ +static const int expected[3][3] = {{1, 3, 5}, /* gl_Layer */ + {0, 1, 2}, /* gl_PrimitiveID */ {1, 2, 3}}; /* gl_ViewportIndex */ -static const char *varyings[] = {"gl_Layer", "gl_ViewportIndex"}; +static const char *varyings[] = {"gl_Layer", "gl_PrimitiveID", "gl_ViewportIndex"}; void piglit_init(int argc, char **argv) { int i, j, num_xfb_buffers; - GLuint prog, vao, xfb_buf[2]; + GLuint prog, vao, xfb_buf[3]; const GLint *readback; char *gstext; bool pass = true; -- 2.24.1 From airlied at gmail.com Mon Jan 27 19:17:47 2020 From: airlied at gmail.com (Dave Airlie) Date: Tue, 28 Jan 2020 05:17:47 +1000 Subject: [Piglit] [PATCH] glsl-1.50: test gl_PrimitiveID xfb In-Reply-To: <20200105230551.21859-1-imirkin@alum.mit.edu> References: <20200105230551.21859-1-imirkin@alum.mit.edu> Message-ID: On Mon, 6 Jan 2020 at 09:05, Ilia Mirkin wrote: > > This appears to trigger an issue on at least GP108 due to an odd shader > export write restriction. And we should be testing gl_PrimitiveID > anyways. > > Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie > --- > .../execution/geometry/transform-feedback-builtins.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c > index cfd71c944..4144c7cb1 100644 > --- a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c > +++ b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c > @@ -60,6 +60,7 @@ static const char *gs_template = > "{\n" > " for (int i = 0; i < 3; i++) {\n" > " gl_Layer = 2 * i + 1;\n" > + " gl_PrimitiveID = gl_PrimitiveIDIn + i;\n" > "%s" > " EmitVertex();\n" > " }\n" > @@ -71,16 +72,17 @@ static const char *gs_template = > * above, the output should be a sequence of integers defined in this > * array. > */ > -static const int expected[2][3] = {{1, 3, 5}, /* gl_Layer */ > +static const int expected[3][3] = {{1, 3, 5}, /* gl_Layer */ > + {0, 1, 2}, /* gl_PrimitiveID */ > {1, 2, 3}}; /* gl_ViewportIndex */ > > -static const char *varyings[] = {"gl_Layer", "gl_ViewportIndex"}; > +static const char *varyings[] = {"gl_Layer", "gl_PrimitiveID", "gl_ViewportIndex"}; > > void > piglit_init(int argc, char **argv) > { > int i, j, num_xfb_buffers; > - GLuint prog, vao, xfb_buf[2]; > + GLuint prog, vao, xfb_buf[3]; > const GLint *readback; > char *gstext; > bool pass = true; > -- > 2.24.1 > > _______________________________________________ > Piglit mailing list > Piglit at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit