diff options
author | Paul Berry <[email protected]> | 2013-10-01 16:33:56 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-10-10 14:27:27 -0700 |
commit | 3c83c96dcd1be26e24c07a3dff5df1ef84974901 (patch) | |
tree | ff156706fe5b438dbc0a018d44e7e414cf0e3912 /src/glsl/glsl_symbol_table.h | |
parent | 24b9bba19b6d1d48fd40ce6af537da806e45d53f (diff) |
glsl: Make it possible to disable a variable in the symbol table.
In later patches, we'll use this in order to implement the required
behaviour that after the gl_PerVertex interface block has been
redeclared, only members of the redeclared interface block may be
used.
v2: Update the function name and comment to clarify that we aren't
actually removing the variable from the symbol table, just disabling
it.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_symbol_table.h')
-rw-r--r-- | src/glsl/glsl_symbol_table.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h index 62d26b89ac4..0e62448e2e7 100644 --- a/src/glsl/glsl_symbol_table.h +++ b/src/glsl/glsl_symbol_table.h @@ -121,6 +121,14 @@ public: enum ir_variable_mode mode); /*@}*/ + /** + * Disable a previously-added variable so that it no longer appears to be + * in the symbol table. This is necessary when gl_PerVertex is redeclared, + * to ensure that previously-available built-in variables are no longer + * available. + */ + void disable_variable(const char *name); + private: symbol_table_entry *get_entry(const char *name); |