Mesa (master): vc4: Drop maximum number of varyings down to 8.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Sep 24 07:27:02 UTC 2014
Module: Mesa
Branch: master
Commit: bf4aecfb2acc8d0dc815105d2f36eccbc97c284b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf4aecfb2acc8d0dc815105d2f36eccbc97c284b
Author: Eric Anholt <eric at anholt.net>
Date: Tue Sep 23 17:25:43 2014 -0700
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 4a5ce4f..81a29a5 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:
More information about the mesa-commit
mailing list