blob_write_uint32(metadata, prog->info.stage);
+ /* Data set by glTransformFeedbackVaryings. */
+ blob_write_uint32(metadata, shProg->TransformFeedback.BufferMode);
+ blob_write_bytes(metadata, shProg->TransformFeedback.BufferStride,
+ sizeof(shProg->TransformFeedback.BufferStride));
+ blob_write_uint32(metadata, shProg->TransformFeedback.NumVarying);
+ for (unsigned i = 0; i < shProg->TransformFeedback.NumVarying; i++)
+ blob_write_string(metadata, shProg->TransformFeedback.VaryingNames[i]);
+
blob_write_uint32(metadata, ltf->NumOutputs);
blob_write_uint32(metadata, ltf->ActiveBuffers);
blob_write_uint32(metadata, ltf->NumVarying);
if (xfb_stage == ~0u)
return;
+ /* Data set by glTransformFeedbackVaryings. */
+ shProg->TransformFeedback.BufferMode = blob_read_uint32(metadata);
+ blob_copy_bytes(metadata, &shProg->TransformFeedback.BufferStride,
+ sizeof(shProg->TransformFeedback.BufferStride));
+ shProg->TransformFeedback.NumVarying = blob_read_uint32(metadata);
+ shProg->TransformFeedback.VaryingNames = (char **)
+ malloc(shProg->TransformFeedback.NumVarying * sizeof(GLchar *));
+ /* Note, malloc used with VaryingNames. */
+ for (unsigned i = 0; i < shProg->TransformFeedback.NumVarying; i++)
+ shProg->TransformFeedback.VaryingNames[i] =
+ strdup(blob_read_string(metadata));
+
struct gl_program *prog = shProg->_LinkedShaders[xfb_stage]->Program;
struct gl_transform_feedback_info *ltf =
rzalloc(prog, struct gl_transform_feedback_info);