mesa: fix bug in evaluation of structure fields
authorBrian Paul <brianp@vmware.com>
Wed, 31 Dec 2008 00:50:39 +0000 (17:50 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 6 Jan 2009 16:18:25 +0000 (09:18 -0700)
Fixes incorrect size information.  See bug 19273.

(cherry picked from commit e8d7db31e2a6784c765911233cb3d888f612837f)

src/mesa/shader/slang/slang_emit.c

index 1e9b4c125451e26b56a9853f98a40919c993a30b..92827cf222fb82a5da3f15ffd2be1f6b6147ad12 100644 (file)
@@ -1999,9 +1999,7 @@ emit_struct_field(slang_emit_info *emitInfo, slang_ir_node *n)
    _slang_copy_ir_storage(n->Store, n->Children[0]->Store);
 
    n->Store->Index = n->Children[0]->Store->Index + fieldOffset / 4;
-   /* XXX test this:
-   n->Store->Index += fieldOffset / 4;
-   */
+   n->Store->Size = fieldSize;
 
    switch (fieldSize) {
    case 1: