goto done; /* no match */
/* Is the function hidden by a variable (impossible in 1.10)? */
- if (state->language_version != 110 && state->symbols->get_variable(name))
+ if (!state->symbols->separate_function_namespace
+ && state->symbols->get_variable(name))
goto done; /* no match */
if (f != NULL) {
{
_mesa_glsl_initialize_variables(instructions, state);
- state->symbols->language_version = state->language_version;
+ state->symbols->separate_function_namespace = state->language_version == 110;
state->current_function = NULL;
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
st->language_version = 140;
- st->symbols->language_version = 140;
+ st->symbols->separate_function_namespace = false;
st->ARB_texture_rectangle_enable = true;
st->EXT_texture_array_enable = true;
st->OES_EGL_image_external_enable = true;
glsl_symbol_table::glsl_symbol_table()
{
- this->language_version = 120;
+ this->separate_function_namespace = false;
this->table = _mesa_symbol_table_ctor();
this->mem_ctx = ralloc_context(NULL);
}
bool glsl_symbol_table::add_variable(ir_variable *v)
{
- if (this->language_version == 110) {
+ if (this->separate_function_namespace) {
/* In 1.10, functions and variables have separate namespaces. */
symbol_table_entry *existing = get_entry(v->name);
if (name_declared_this_scope(v->name)) {
bool glsl_symbol_table::add_function(ir_function *f)
{
- if (this->language_version == 110 && name_declared_this_scope(f->name)) {
+ if (this->separate_function_namespace && name_declared_this_scope(f->name)) {
/* In 1.10, functions and variables have separate namespaces. */
symbol_table_entry *existing = get_entry(f->name);
if ((existing->f == NULL) && (existing->t == NULL)) {
glsl_symbol_table();
~glsl_symbol_table();
- unsigned int language_version;
+ /* In 1.10, functions and variables have separate namespaces. */
+ bool separate_function_namespace;
void push_scope();
void pop_scope();