broadcom/vc5: Set the available VS outputs to match the FS inputs.
authorEric Anholt <eric@anholt.net>
Thu, 2 Nov 2017 00:22:17 +0000 (17:22 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 7 Nov 2017 17:40:24 +0000 (09:40 -0800)
Fixes piglit glsl-es-3.00/minimum-maximums.txt.

src/gallium/drivers/vc5/vc5_screen.c

index 031e982b0aa89f67647e3ef72744c32a70d5e35d..6e3a342ce3f6517c6f4a2545a3228b6b16ca7cdb 100644 (file)
@@ -358,7 +358,10 @@ vc5_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
                 else
                         return 16;
         case PIPE_SHADER_CAP_MAX_OUTPUTS:
-                return shader == PIPE_SHADER_FRAGMENT ? 4 : 8;
+                if (shader == PIPE_SHADER_FRAGMENT)
+                        return 4;
+                else
+                        return VC5_MAX_FS_INPUTS / 4;
         case PIPE_SHADER_CAP_MAX_TEMPS:
                 return 256; /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
         case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: