summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/linker.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 65870087bf5..9e8975e887f 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1865,11 +1865,14 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
tfeedback_decl *tfeedback_decls)
{
unsigned total_tfeedback_components = 0;
+ bool separate_attribs_mode =
+ prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS;
memset(&prog->LinkedTransformFeedback, 0,
sizeof(prog->LinkedTransformFeedback));
+ prog->LinkedTransformFeedback.NumBuffers =
+ separate_attribs_mode ? num_tfeedback_decls : 1;
for (unsigned i = 0; i < num_tfeedback_decls; ++i) {
- unsigned buffer =
- prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS ? i : 0;
+ unsigned buffer = separate_attribs_mode ? i : 0;
if (!tfeedback_decls[i].store(prog, &prog->LinkedTransformFeedback,
buffer))
return false;