diff options
author | Timothy Arceri <[email protected]> | 2016-11-09 14:56:08 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-12-02 13:54:47 +1100 |
commit | ab8c01386ac1c832f3143f57091ed5cf9725c151 (patch) | |
tree | 00ed2981f5dbe62cedb7c1fc7b51a59966036bca /src/mesa/main | |
parent | 534917495dca07bb63dbec49450c706fce36f176 (diff) |
st/mesa/glsl: move Version to gl_shader_program_data
This is mostly just used during linking however the st uses it
when updating textures.
In order to store gl_program in the CurrentProgram array
rather than gl_shader_program we need to move this field to
the shared gl_shader_program_data struct.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 3 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 250877dd6b6..459725b029c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2653,6 +2653,8 @@ struct gl_shader_program_data GLboolean Validated; GLchar *InfoLog; + unsigned Version; /**< GLSL version used for linking */ + /* Mask of stages this program was linked against */ unsigned linked_stages; }; @@ -2827,7 +2829,6 @@ struct gl_shader_program GLboolean _Used; /**< Ever used for drawing? */ GLboolean SamplersValidated; /**< Samplers validated against texture units? */ - unsigned Version; /**< GLSL version used for linking */ bool IsES; /**< True if this program uses GLSL ES */ /** diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 83ee0d4ca7d..92bbc743051 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1098,7 +1098,7 @@ _mesa_link_program(struct gl_context *ctx, struct gl_shader_program *shProg) if (file) { fprintf(file, "[require]\nGLSL%s >= %u.%02u\n", shProg->IsES ? " ES" : "", - shProg->Version / 100, shProg->Version % 100); + shProg->data->Version / 100, shProg->data->Version % 100); if (shProg->SeparateShader) fprintf(file, "GL_ARB_separate_shader_objects\nSSO ENABLED\n"); fprintf(file, "\n"); |