remove swizzle param from new_var()

This commit is contained in:
Brian 2007-01-18 09:22:44 -07:00
parent 8a2368edce
commit f43eac3ed8
1 changed files with 5 additions and 5 deletions

View File

@ -581,9 +581,9 @@ new_jump(slang_atom target)
* New IR_VAR node - a reference to a previously declared variable. * New IR_VAR node - a reference to a previously declared variable.
*/ */
static slang_ir_node * static slang_ir_node *
new_var(slang_assemble_ctx *A, slang_operation *oper, new_var(slang_assemble_ctx *A, slang_operation *oper, slang_atom name)
slang_atom name, GLuint swizzle)
{ {
GLuint swizzle = SWIZZLE_NOOP;
slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE); slang_variable *v = _slang_locate_variable(oper->locals, name, GL_TRUE);
slang_ir_node *n = new_node(IR_VAR, NULL, NULL); slang_ir_node *n = new_node(IR_VAR, NULL, NULL);
if (!v) { if (!v) {
@ -1728,7 +1728,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
/* child is initializer */ /* child is initializer */
slang_ir_node *var, *init, *rhs; slang_ir_node *var, *init, *rhs;
assert(oper->num_children == 1); assert(oper->num_children == 1);
var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); var = new_var(A, oper, oper->a_id);
/* XXX make copy of this initializer? */ /* XXX make copy of this initializer? */
/* /*
printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer);
@ -1741,7 +1741,7 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
} }
else if (v->initializer) { else if (v->initializer) {
slang_ir_node *var, *init, *rhs; slang_ir_node *var, *init, *rhs;
var = new_var(A, oper, oper->a_id, SWIZZLE_NOOP); var = new_var(A, oper, oper->a_id);
/* XXX make copy of this initializer? */ /* XXX make copy of this initializer? */
/* /*
printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer); printf("\n*** ASSEMBLE INITIALIZER %p\n", (void*) v->initializer);
@ -1771,7 +1771,7 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper)
* use it. Otherwise, use the oper's var id. * use it. Otherwise, use the oper's var id.
*/ */
slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id; slang_atom aVar = oper->var ? oper->var->a_name : oper->a_id;
slang_ir_node *n = new_var(A, oper, aVar, SWIZZLE_NOOP); slang_ir_node *n = new_var(A, oper, aVar);
/* /*
assert(oper->var); assert(oper->var);
*/ */