Skip to content
Commit f76bea8a authored by Eduardo Lima Mitev's avatar Eduardo Lima Mitev Committed by Emil Velikov
Browse files

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: default avatarKenneth Graunke <kenneth@whitecape.org>
Signed-off-by: default avatarEduardo Lima Mitev <elima@igalia.com>
Signed-off-by: default avatarNeil Roberts <nroberts@igalia.com>
(cherry picked from commit 4c62a270)
parent 32b06912
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment