summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-22 11:00:10 -0700
committerBrian <[email protected]>2007-02-22 11:00:10 -0700
commit2eeaae6cbcc6d5b1d85ab7e9b681b59568fb8600 (patch)
treec421442e414abd1af10108c7457c41ead653f7f9 /src/mesa
parent50040573d7b4a34eb919016c5fe85aeaca9e9065 (diff)
get rid of some unused slang_variable fields
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c9
-rw-r--r--src/mesa/shader/slang/slang_compile.c1
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.c3
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.h2
4 files changed, 3 insertions, 12 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 20491a64153..31e08df447d 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -143,7 +143,7 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec)
* \param var the variable to associate with the IR node
*/
static void
-slang_attach_storage(slang_ir_node *n, slang_variable *var)
+_slang_attach_storage(slang_ir_node *n, slang_variable *var)
{
assert(n);
assert(var);
@@ -579,8 +579,7 @@ new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name)
n = new_node0(IR_VAR);
if (n) {
- var->used = GL_TRUE;
- slang_attach_storage(n, var);
+ _slang_attach_storage(n, var);
}
return n;
}
@@ -646,8 +645,6 @@ slang_resolve_variable(slang_operation *oper)
oper->var = _slang_locate_variable(oper->locals,
(const slang_atom) oper->a_id,
GL_TRUE);
- if (oper->var)
- oper->var->used = GL_TRUE;
}
}
@@ -1600,7 +1597,7 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var)
assert(!is_sampler_type(&var->type));
n = new_node0(IR_VAR_DECL);
if (n) {
- slang_attach_storage(n, var);
+ _slang_attach_storage(n, var);
assert(var->aux);
assert(n->Store == var->aux);
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 86699b7cdb4..a1cae5d338d 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1629,7 +1629,6 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O,
}
/* copy the declarator qualifier type, parse the identifier */
- var->global = C->global_scope;
var->type.qualifier = type->qualifier;
var->a_name = parse_identifier(C);
if (var->a_name == SLANG_ATOM_NULL)
diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c
index 450ae163231..09ca736c20c 100644
--- a/src/mesa/shader/slang/slang_compile_variable.c
+++ b/src/mesa/shader/slang/slang_compile_variable.c
@@ -256,9 +256,7 @@ slang_variable_construct(slang_variable * var)
var->initializer = NULL;
var->address = ~0;
var->size = 0;
- var->global = GL_FALSE;
var->isTemp = GL_FALSE;
- var->used = GL_FALSE;
var->aux = NULL;
return 1;
}
@@ -307,7 +305,6 @@ slang_variable_copy(slang_variable * x, const slang_variable * y)
}
z.address = y->address;
z.size = y->size;
- z.global = y->global;
slang_variable_destruct(x);
*x = z;
return 1;
diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h
index d12cfd7a401..d3691f0f511 100644
--- a/src/mesa/shader/slang/slang_compile_variable.h
+++ b/src/mesa/shader/slang/slang_compile_variable.h
@@ -79,8 +79,6 @@ typedef struct slang_variable_
struct slang_operation_ *initializer; /**< Optional initializer code */
GLuint address; /**< Storage location */
GLuint size; /**< Variable's size in bytes */
- GLboolean global; /**< A global var? */
- GLboolean used; /**< Ever referenced by code? */
GLboolean isTemp; /**< a named temporary (__resultTmp) */
void *aux; /**< Used during code gen */
} slang_variable;