[Mesa-dev] [PATCH 28/37] glsl: reset current stream tracker

Timothy Arceri timothy.arceri at collabora.com
Tue Mar 15 12:57:18 UTC 2016


When we move to the next buffer we need to reset the stream
so that we don't generate an error message about streams not
matching.
---
 src/compiler/glsl/link_varyings.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index f54ecc8..ac14815 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -1045,6 +1045,12 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
       }
 
       for (unsigned i = 0; i < num_tfeedback_decls; ++i) {
+         if (has_xfb_qualifiers &&
+             buffer != tfeedback_decls[i].get_buffer()) {
+            /* we have moved to the next buffer so reset stream id */
+            buffer_stream_id = -1;
+         }
+
          if (tfeedback_decls[i].is_next_buffer_separator()) {
             num_buffers++;
             buffer_stream_id = -1;
-- 
2.5.0



More information about the mesa-dev mailing list