gallivm: Name anonymous union.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 12 Oct 2010 15:07:38 +0000 (16:07 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 12 Oct 2010 15:08:09 +0000 (16:08 +0100)
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c

index 0173bc4a7fcc90e8c7fe5ba21e406457a747e976..a4d3b750c3cfa36f8d75d781024e287297ea7dc5 100644 (file)
@@ -76,7 +76,7 @@ struct lp_tgsi_channel_info
    union {
       uint32_t index;
       float value; /* for TGSI_FILE_IMMEDIATE */
-   };
+   } u;
 };
 
 
index eab72b8eb7d8e64247ccfb4b4fdedeee45b16417..d1f82610025ef56bfdf67638069ffdc46c5d72cb 100644 (file)
@@ -74,10 +74,10 @@ analyse_src(struct analysis_context *ctx,
          if (src->File == TGSI_FILE_IMMEDIATE) {
             assert(src->Index < Elements(ctx->imm));
             if (src->Index < Elements(ctx->imm)) {
-               chan_info->value = ctx->imm[src->Index][swizzle];
+               chan_info->u.value = ctx->imm[src->Index][swizzle];
             }
          } else {
-            chan_info->index = src->Index;
+            chan_info->u.index = src->Index;
             chan_info->swizzle = swizzle;
          }
       }
@@ -92,7 +92,7 @@ static boolean
 is_immediate(const struct lp_tgsi_channel_info *chan_info, float value)
 {
    return chan_info->file == TGSI_FILE_IMMEDIATE &&
-          chan_info->value == value;
+          chan_info->u.value == value;
 }
 
 
@@ -342,7 +342,7 @@ dump_info(const struct tgsi_token *tokens,
          if (chan_info->file != TGSI_FILE_NULL) {
             debug_printf(" %s[%u].%c",
                          tgsi_file_names[chan_info->file],
-                         chan_info->index,
+                         chan_info->u.index,
                          "xyzw01"[chan_info->swizzle]);
          } else {
             debug_printf(" _");
@@ -360,7 +360,7 @@ dump_info(const struct tgsi_token *tokens,
          if (chan_info->file != TGSI_FILE_NULL) {
             debug_printf("OUT[%u].%c = ", index, "xyzw"[chan]);
             if (chan_info->file == TGSI_FILE_IMMEDIATE) {
-               debug_printf("%f", chan_info->value);
+               debug_printf("%f", chan_info->u.value);
             } else {
                const char *file_name;
                switch (chan_info->file) {
@@ -376,7 +376,7 @@ dump_info(const struct tgsi_token *tokens,
                }
                debug_printf("%s[%u].%c",
                             file_name,
-                            chan_info->index,
+                            chan_info->u.index,
                             "xyzw01"[chan_info->swizzle]);
             }
             debug_printf("\n");