diff options
Diffstat (limited to 'src/mesa')
| -rw-r--r-- | src/mesa/main/mtypes.h | 4 | ||||
| -rw-r--r-- | src/mesa/shader/ir_to_mesa.cpp | 3 | 
2 files changed, 7 insertions, 0 deletions
| diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 729c2eaf0f..f8257d565b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1971,6 +1971,10 @@ struct gl_shader     struct exec_list *ir;     struct glsl_symbol_table *symbols; + +   /** Shaders containing built-in functions that are used for linking. */ +   struct gl_shader *builtins_to_link[16]; +   unsigned num_builtins_to_link;  }; diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp index a2b2eb95c8..bfb8e3201a 100644 --- a/src/mesa/shader/ir_to_mesa.cpp +++ b/src/mesa/shader/ir_to_mesa.cpp @@ -2207,6 +2207,9 @@ _mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)     shader->CompileStatus = !state->error;     shader->InfoLog = state->info_log;     shader->Version = state->language_version; +   memcpy(shader->builtins_to_link, state->builtins_to_link, +	  sizeof(shader->builtins_to_link[0]) * state->num_builtins_to_link); +   shader->num_builtins_to_link = state->num_builtins_to_link;     /* Retain any live IR, but trash the rest. */     reparent_ir(shader->ir, shader); | 
