summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2017-03-05 20:28:41 +0100
committerNeil Roberts <[email protected]>2017-10-30 18:10:39 +0100
commit4c62a270a99d443316e29020377465a90a6968c0 (patch)
treee3d05ceebeb99fc1f55867d986c816e61644bce0 /src/compiler/glsl/glsl_parser_extras.h
parentceaad79f8593007ca387ae06460a70ae606314eb (diff)
glsl_parser_extra: Add utility to copy symbols between symbol tables
Some symbols gathered in the symbols table during parsing are needed later for the compile and link stages, so they are moved along the process. Currently, only functions and non-temporary variables are copied between symbol tables. However, the built-in gl_PerVertex interface blocks are also needed during the linking stage (the last step), to match re-declared blocks of inter-stage shaders. This patch adds a new utility function that will factorize current code that copies functions and variables between two symbol tables, and in addition will copy explicitly declared gl_PerVertex blocks too. The function will be used in a subsequent patch. v2 (Neil Roberts): Allow the src symbol table to be NULL and explicitly copy the gl_PerVertex symbols in case they are not referenced in the exec_list. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Eduardo Lima Mitev <[email protected]> Signed-off-by: Neil Roberts <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_parser_extras.h')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index fb358130878..2e98bc72e74 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -948,6 +948,11 @@ extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log,
extern void _mesa_destroy_shader_compiler(void);
extern void _mesa_destroy_shader_compiler_caches(void);
+extern void
+_mesa_glsl_copy_symbols_from_table(struct exec_list *shader_ir,
+ struct glsl_symbol_table *src,
+ struct glsl_symbol_table *dest);
+
#ifdef __cplusplus
}
#endif