This is harmless today because gl_TessLevelInner/Outer in the TES is
currently treated as system values.  However, when we move to treating
them as inputs, this would cause a bug: with no TCS present, it would
propagate TES reads of VARYING_SLOT_TESS_LEVEL into the VS output VUE
map slots.  This is totally bogus - those don't even exist in the VS.

Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_link.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp 
b/src/mesa/drivers/dri/i965/brw_link.cpp
index 380e454716e..a919a789f19 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -184,9 +184,12 @@ unify_interfaces(struct shader_info **infos)
          continue;
 
       if (prev_info) {
-         prev_info->outputs_written |= infos[i]->inputs_read;
+         prev_info->outputs_written |= infos[i]->inputs_read &
+            ~(VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER);
+         infos[i]->inputs_read |= prev_info->outputs_written &
+            ~(VARYING_BIT_TESS_LEVEL_INNER | VARYING_BIT_TESS_LEVEL_OUTER);
+
          prev_info->patch_outputs_written |= infos[i]->patch_inputs_read;
-         infos[i]->inputs_read |= prev_info->outputs_written;
          infos[i]->patch_inputs_read |= prev_info->patch_outputs_written;
       }
       prev_info = infos[i];
-- 
2.11.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to