From c732f68cf4aca06bac03e6a70c49047057c0c357 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 6 Sep 2013 14:47:19 -0700 Subject: mesa: Track the vertex program active at BeginTransformFeedback() time. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The next few patches will use this for API error checking. All of the drivers appear to CALLOC_STRUCT transform feedback objects, so this should be properly NULL initialized on creation. Signed-off-by: Kenneth Graunke Reviewed-by: Marek Olšák --- src/mesa/main/transformfeedback.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/main/transformfeedback.c') diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index eca0e5f55c9..c2c14a1d339 100644 --- a/src/mesa/main/transformfeedback.c +++ b/src/mesa/main/transformfeedback.c @@ -406,6 +406,8 @@ _mesa_BeginTransformFeedback(GLenum mode) obj->GlesRemainingPrims = max_vertices / vertices_per_prim; } + obj->shader_program = ctx->Shader.CurrentVertexProgram; + assert(ctx->Driver.BeginTransformFeedback); ctx->Driver.BeginTransformFeedback(ctx, mode, obj); } -- cgit v1.2.3