From: Eric Anholt Date: Wed, 24 Sep 2014 00:25:43 +0000 (-0700) Subject: vc4: Drop maximum number of varyings down to 8. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf4aecfb2acc8d0dc815105d2f36eccbc97c284b;p=mesa.git 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). --- 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: