summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h4
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index be9eaaa875c..729c2eaf0fd 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1967,6 +1967,8 @@ struct gl_shader
GLchar *InfoLog;
struct gl_sl_pragmas Pragmas;
+ unsigned Version; /**< GLSL version used for linking */
+
struct exec_list *ir;
struct glsl_symbol_table *symbols;
};
@@ -2006,6 +2008,8 @@ struct gl_shader_program
GLboolean _Used; /**< Ever used for drawing? */
GLchar *InfoLog;
+ unsigned Version; /**< GLSL version used for linking */
+
/**
* Per-stage shaders resulting from the first stage of linking.
*/
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index 58320c92174..557f5d319d2 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -2234,6 +2234,7 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
shader->CompileStatus = !state->error;
shader->InfoLog = state->info_log;
+ shader->Version = state->language_version;
/* Retain any live IR, but trash the rest. */
foreach_list(node, shader->ir) {