st/mesa/glsl: change xfb_program field to last_vert_prog

Now that the i965 backend doesn't depend on this field we can
make it more generic and short circuit a bunch of code paths.

The new field will be used in a following patch for another
clean-up.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Timothy Arceri
2016-11-20 21:44:29 +11:00
parent c505d6d852
commit f86d15ed94
7 changed files with 43 additions and 31 deletions

View File

@@ -1076,6 +1076,9 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
unsigned num_tfeedback_decls,
tfeedback_decl *tfeedback_decls, bool has_xfb_qualifiers)
{
if (!prog->last_vert_prog)
return true;
/* Make sure MaxTransformFeedbackBuffers is less than 32 so the bitmask for
* tracking the number of buffers doesn't overflow.
*/
@@ -1084,7 +1087,7 @@ store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog,
bool separate_attribs_mode =
prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS;
struct gl_program *xfb_prog = prog->xfb_program;
struct gl_program *xfb_prog = prog->last_vert_prog;
xfb_prog->sh.LinkedTransformFeedback =
rzalloc(xfb_prog, struct gl_transform_feedback_info);