diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-22 18:27:56 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-22 18:27:56 -0600 |
commit | 7f3d6e74817e8880a0712c85f2b41fd88cf6a347 (patch) | |
tree | 7b058447c29d4040cf3ad83f027d897083ae3a45 /src/mesa/shader/slang/slang_builtin.c | |
parent | 0d1ed45cbfd555330c8746b0fc046bdb41d767d0 (diff) |
mesa: glsl: rework swizzle storage handling
Build on the heirarchal approach implemented for arrays/structs.
Diffstat (limited to 'src/mesa/shader/slang/slang_builtin.c')
-rw-r--r-- | src/mesa/shader/slang/slang_builtin.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index f99a59e3e1..ed6de40d4b 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -439,13 +439,11 @@ _slang_alloc_statevar(slang_ir_node *n, pos = lookup_statevar(var, index1, index2, field, &swizzle, paramList); assert(pos >= 0); if (pos >= 0) { - /* XXX should overwrite Store's fields instead of changing pointers - * since there may be a child storage_info pointing to this one. - */ - n0->Store = _slang_new_ir_storage_swz(PROGRAM_STATE_VAR, - pos, - n0->Store->Size, - swizzle); + /* newly resolved storage for the statevar/constant/uniform */ + n0->Store->File = PROGRAM_STATE_VAR; + n0->Store->Index = pos; + n0->Store->Swizzle = swizzle; + n0->Store->Parent = NULL; } return pos; } |