diff options
author | Timothy Arceri <[email protected]> | 2016-11-03 16:00:37 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-12-30 10:57:16 +1100 |
commit | 700bc94dcebf4257740483d2ba467b138234fa1a (patch) | |
tree | da45fbee155479d7692bbe68c534a3c1c67385b3 /src/mesa/main/shader_query.cpp | |
parent | 31c04e4e229bec4e059779b4034cf597ceeadf97 (diff) |
mesa/glsl: move LinkedTransformFeedback from gl_shader_program to gl_program
This will help allow us to store gl_program in the CurrentProgram array rather
than gl_shader_program which will allow a bunch of simplifications.
Note that we make LinkedTransformFeedback a pointer so we don't waste
memory creating a struct for each stage. We also store a pointer to
the gl_program that will contain the pointer in gl_shader_program so
we can get easy access to the correct stage.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r-- | src/mesa/main/shader_query.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index 2f157733a48..0f4b2829ce4 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -1041,10 +1041,10 @@ get_buffer_property(struct gl_shader_program *shProg, *val = RESOURCE_XFB(res)->NumVaryings; return 1; case GL_ACTIVE_VARIABLES: - int i = 0; - for ( ; i < shProg->LinkedTransformFeedback.NumVarying; i++) { - unsigned index = - shProg->LinkedTransformFeedback.Varyings[i].BufferIndex; + struct gl_transform_feedback_info *linked_xfb = + shProg->xfb_program->sh.LinkedTransformFeedback; + for (int i = 0; i < linked_xfb->NumVarying; i++) { + unsigned index = linked_xfb->Varyings[i].BufferIndex; struct gl_program_resource *buf_res = _mesa_program_resource_find_index(shProg, GL_TRANSFORM_FEEDBACK_BUFFER, |