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>
Wed, 31 Dec 2008 00:50:39 +0000 (17:50 -0700)
Fixes incorrect size information.  See bug 19273.

src/mesa/shader/slang/slang_emit.c

index 4f8e694a739e6f6a409e91e19116ddb62e950ae3..500112b6f67156340a1233c20867b2fbce9d2f4d 100644 (file)
@@ -2002,9 +2002,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: