Mesa (master): vc4: Consider FS backface color loads as color inputs as well.

Eric Anholt anholt at kemper.freedesktop.org
Fri Dec 12 07:53:11 UTC 2014


Module: Mesa
Branch: master
Commit: 92b85fba89851b85e7a50b1f6f90c05ecaacdcd5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=92b85fba89851b85e7a50b1f6f90c05ecaacdcd5

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Dec 11 21:28:12 2014 -0800

vc4: Consider FS backface color loads as color inputs as well.

This fixes flatshading of backface color in 4 of the piglit interpolation
tests.

---

 src/gallium/drivers/vc4/vc4_program.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index cea2a49..b48c2c4 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -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++;
                 }




More information about the mesa-commit mailing list