diff options
author | Brian <brian@yutani.localnet.net> | 2006-12-13 14:48:36 -0700 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2006-12-13 14:48:36 -0700 |
commit | aff8e204d205b5d424d2c39a5d9e004caaa1eab1 (patch) | |
tree | 91d06d422f8900af461233186bcc79351c3025f6 /src/mesa/shader/slang/slang_compile_variable.c | |
parent | 5b35132b41427798e02a66a8e39583fffbe9d232 (diff) |
Checkpoint new GLSL compiler back-end to produce fp/vp-style assembly instructions.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_variable.c')
-rw-r--r-- | src/mesa/shader/slang/slang_compile_variable.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c index a8a2d6aa6a..f9f02066a3 100644 --- a/src/mesa/shader/slang/slang_compile_variable.c +++ b/src/mesa/shader/slang/slang_compile_variable.c @@ -127,6 +127,16 @@ slang_fully_specified_type_copy(slang_fully_specified_type * x, * slang_variable_scope */ +slang_variable_scope * +_slang_variable_scope_new(slang_variable_scope *parent) +{ + slang_variable_scope *s; + s = (slang_variable_scope *) _mesa_calloc(sizeof(slang_variable_scope)); + s->outer_scope = parent; + return s; +} + + GLvoid _slang_variable_scope_ctr(slang_variable_scope * self) { @@ -218,9 +228,11 @@ slang_variable_construct(slang_variable * var) var->array_len = 0; var->initializer = NULL; var->address = ~0; - var->address2 = 0; var->size = 0; var->global = GL_FALSE; + var->declared = GL_FALSE; + var->used = GL_FALSE; + var->aux = NULL; return 1; } @@ -248,8 +260,8 @@ slang_variable_copy(slang_variable * x, const slang_variable * y) z.a_name = y->a_name; z.array_len = y->array_len; if (y->initializer != NULL) { - z.initializer = - (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); + z.initializer + = (slang_operation *) slang_alloc_malloc(sizeof(slang_operation)); if (z.initializer == NULL) { slang_variable_destruct(&z); return 0; |