vc4: Consider FS backface color loads as color inputs as well.
authorEric Anholt <eric@anholt.net>
Fri, 12 Dec 2014 05:28:12 +0000 (21:28 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 12 Dec 2014 07:52:34 +0000 (23:52 -0800)
This fixes flatshading of backface color in 4 of the piglit interpolation
tests.

src/gallium/drivers/vc4/vc4_program.c

index cea2a490eca1b8ab08c46b162c39a1e81beb54d8..b48c2c4c5c96dd0bd97f9a6aa916227bf6e57e5a 100644 (file)
@@ -2210,8 +2210,11 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage,
                         if (sem->semantic == (uint8_t)~0)
                                 continue;
 
-                        if (sem->semantic == TGSI_SEMANTIC_COLOR)
+                        if (sem->semantic == TGSI_SEMANTIC_COLOR ||
+                            sem->semantic == TGSI_SEMANTIC_BCOLOR) {
                                 shader->color_inputs |= (1 << shader->num_inputs);
+                        }
+
                         shader->input_semantics[shader->num_inputs] = *sem;
                         shader->num_inputs++;
                 }