From bf4aecfb2acc8d0dc815105d2f36eccbc97c284b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 23 Sep 2014 17:25:43 -0700 Subject: [PATCH] vc4: Drop maximum number of varyings down to 8. There are only 32 bits in the flatshade flags (which are 1 bit per component), the simulator crashes when you use more than about this many varyings, and the original Broadcom code drop only exposed 8 as well. Fixes 26 piglit tests in the varying-packing group, and makes many others go from crash to fail (due to not checking their varying counts and treating link failures as failures). Regresses ARB_fp/minmax (due to 8 varyings instead of 10). --- src/gallium/drivers/vc4/vc4_screen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 4a5ce4feee7..81a29a5ef2e 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -276,7 +276,10 @@ vc4_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: return 0; case PIPE_SHADER_CAP_MAX_INPUTS: - return 16; + if (shader == PIPE_SHADER_FRAGMENT) + return 8; + else + return 16; case PIPE_SHADER_CAP_MAX_TEMPS: return 256; /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: -- 2.30.2