freedreno/a3xx: account for special inputs/outputs
authorRob Clark <robclark@freedesktop.org>
Wed, 14 May 2014 15:39:44 +0000 (11:39 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 15 May 2014 01:26:35 +0000 (21:26 -0400)
We need to size input/output tables big enough for special inputs/
outputs (gl_Position, gl_FrontFacing, etc) which, while they don't
count towards the hw limit of 16 attributes or 16 varyings, we do
still need to track them all the same.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_program.h

index 0439d39dbffe68af818d41e38c5641c47f397a26..28ad52ecd7c4ef1cd81eb781247ecf91c2383f6b 100644 (file)
@@ -91,7 +91,7 @@ struct fd3_shader_variant {
        struct {
                fd3_semantic semantic;
                uint8_t regid;
        struct {
                fd3_semantic semantic;
                uint8_t regid;
-       } outputs[16];
+       } outputs[16 + 2];  /* +POSITION +PSIZE */
        bool writes_pos, writes_psize;
 
        /* vertices/inputs: */
        bool writes_pos, writes_psize;
 
        /* vertices/inputs: */
@@ -104,7 +104,7 @@ struct fd3_shader_variant {
                /* in theory inloc of fs should match outloc of vs: */
                uint8_t inloc;
                uint8_t bary;
                /* in theory inloc of fs should match outloc of vs: */
                uint8_t inloc;
                uint8_t bary;
-       } inputs[16];
+       } inputs[16 + 2];  /* +POSITION +FACE */
 
        unsigned total_in;       /* sum of inputs (scalar) */
 
 
        unsigned total_in;       /* sum of inputs (scalar) */