mesa: save which transform feedback buffer is associated with which stream
authorMarek Olšák <marek.olsak@amd.com>
Thu, 30 Jul 2015 14:11:50 +0000 (16:11 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 6 Aug 2015 18:11:43 +0000 (20:11 +0200)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/glsl/link_varyings.cpp
src/mesa/main/mtypes.h

index 1c52ff35f44a9a2339fc653507e3333b9f438b40..f7a7b8c4c5bb4e4ef39ba2d8e9d6ce8897b7c705 100644 (file)
@@ -572,6 +572,7 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
       info->Outputs[info->NumOutputs].DstOffset = info->BufferStride[buffer];
       ++info->NumOutputs;
       info->BufferStride[buffer] += output_size;
+      info->BufferStream[buffer] = this->stream_id;
       num_components -= output_size;
       location++;
       location_frac = 0;
index a252bf46606c068fedd60f52e712c8d5800e8d9c..4e00fb6645dabeb92652192821f8028d89657506 100644 (file)
@@ -1868,6 +1868,11 @@ struct gl_transform_feedback_info
     * multiple transform feedback outputs in the same buffer.
     */
    unsigned BufferStride[MAX_FEEDBACK_BUFFERS];
+
+   /**
+    * Which transform feedback stream this buffer binding is associated with.
+    */
+   unsigned BufferStream[MAX_FEEDBACK_BUFFERS];
 };