summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2020-01-05 18:04:02 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2020-01-12 12:12:11 -0500
commit7e729a8bd13e31449de847d14fc07080f373a4ee (patch)
tree454f03383afbc244fb6e74157ba13467c459616d
parent3b9df675d988cf406d913eb278712bac7ed8460c (diff)
glsl-1.50: test gl_PrimitiveID xfb
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 <imirkin@alum.mit.edu>
-rw-r--r--tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c8
1 files 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;