<div dir="ltr"><div>*grumble* old compilers... *grumble*<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 2, 2017 at 7:59 PM, Dave Airlie <span dir="ltr"><<a href="mailto:airlied@gmail.com" target="_blank">airlied@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
<br>
I had to build on RHEL6 today, and noticed this.<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
---<br>
 src/compiler/nir/nir_<wbr>serialize.c |   38 +++++++++++++++++++-----------<wbr>--------<br>
 1 files changed, 19 insertions(+), 19 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir_<wbr>serialize.c b/src/compiler/nir/nir_<wbr>serialize.c<br>
index 7951258..54a00c8 100644<br>
--- a/src/compiler/nir/nir_<wbr>serialize.c<br>
+++ b/src/compiler/nir/nir_<wbr>serialize.c<br>
@@ -585,7 +585,7 @@ union packed_tex_data {<br>
       unsigned component:2;<br>
       unsigned has_texture_deref:1;<br>
       unsigned has_sampler_deref:1;<br>
-   };<br>
+   } u;<br>
 };<br>
<br>
 static void<br>
@@ -599,15 +599,15 @@ write_tex(write_ctx *ctx, const nir_tex_instr *tex)<br>
<br>
    STATIC_ASSERT(sizeof(union packed_tex_data) == sizeof(uint32_t));<br>
    union packed_tex_data packed = {<br>
-      .sampler_dim = tex->sampler_dim,<br>
-      .dest_type = tex->dest_type,<br>
-      .coord_components = tex->coord_components,<br>
-      .is_array = tex->is_array,<br>
-      .is_shadow = tex->is_shadow,<br>
-      .is_new_style_shadow = tex->is_new_style_shadow,<br>
-      .component = tex->component,<br>
-      .has_texture_deref = tex->texture != NULL,<br>
-      .has_sampler_deref = tex->sampler != NULL,<br>
+      .u.sampler_dim = tex->sampler_dim,<br>
+      .u.dest_type = tex->dest_type,<br>
+      .u.coord_components = tex->coord_components,<br>
+      .u.is_array = tex->is_array,<br>
+      .u.is_shadow = tex->is_shadow,<br>
+      .u.is_new_style_shadow = tex->is_new_style_shadow,<br>
+      .u.component = tex->component,<br>
+      .u.has_texture_deref = tex->texture != NULL,<br>
+      .u.has_sampler_deref = tex->sampler != NULL,<br>
    };<br>
    blob_write_uint32(ctx->blob, packed.u32);<br>
<br>
@@ -636,13 +636,13 @@ read_tex(read_ctx *ctx)<br>
<br>
    union packed_tex_data packed;<br>
    packed.u32 = blob_read_uint32(ctx->blob);<br>
-   tex->sampler_dim = packed.sampler_dim;<br>
-   tex->dest_type = packed.dest_type;<br>
-   tex->coord_components = packed.coord_components;<br>
-   tex->is_array = packed.is_array;<br>
-   tex->is_shadow = packed.is_shadow;<br>
-   tex->is_new_style_shadow = packed.is_new_style_shadow;<br>
-   tex->component = packed.component;<br>
+   tex->sampler_dim = packed.u.sampler_dim;<br>
+   tex->dest_type = packed.u.dest_type;<br>
+   tex->coord_components = packed.u.coord_components;<br>
+   tex->is_array = packed.u.is_array;<br>
+   tex->is_shadow = packed.u.is_shadow;<br>
+   tex->is_new_style_shadow = packed.u.is_new_style_shadow;<br>
+   tex->component = packed.u.component;<br>
<br>
    read_dest(ctx, &tex->dest, &tex->instr);<br>
    for (unsigned i = 0; i < tex->num_srcs; i++) {<br>
@@ -650,9 +650,9 @@ read_tex(read_ctx *ctx)<br>
       read_src(ctx, &tex->src[i].src, &tex->instr);<br>
    }<br>
<br>
-   tex->texture = packed.has_texture_deref ?<br>
+   tex->texture = packed.u.has_texture_deref ?<br>
                   read_deref_chain(ctx, &tex->instr) : NULL;<br>
-   tex->sampler = packed.has_sampler_deref ?<br>
+   tex->sampler = packed.u.has_sampler_deref ?<br>
                   read_deref_chain(ctx, &tex->instr) : NULL;<br>
<br>
    return tex;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>