[Mesa-dev] [PATCH] glsl: do not reset prog->TransformFeedback.BufferStride

Juan A. Suarez Romero jasuarez at igalia.com
Wed Jun 21 08:13:05 UTC 2017


link_xfb_stride_layout_qualifiers() can be called multiple times, and
each time we call prog->TransformFeedback.BufferStride is reset to 0.

Thus it is loosing the values set in previous call.

Do not perform such reset.

Fixes:
KHR-GL45.enhanced_layouts.xfb_stride_of_empty_list
KHR-GL45.enhanced_layouts.xfb_stride_of_empty_list_and_api

Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
---
 src/compiler/glsl/linker.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index adfa3b7b1d..1fe0ccc496 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -1623,10 +1623,6 @@ link_xfb_stride_layout_qualifiers(struct gl_context *ctx,
                                   struct gl_shader **shader_list,
                                   unsigned num_shaders)
 {
-   for (unsigned i = 0; i < MAX_FEEDBACK_BUFFERS; i++) {
-      prog->TransformFeedback.BufferStride[i] = 0;
-   }
-
    for (unsigned i = 0; i < num_shaders; i++) {
       struct gl_shader *shader = shader_list[i];
 
-- 
2.11.0



More information about the mesa-dev mailing list