panfrost: Fix gnu-empty-initializer error.
authorVinson Lee <vlee@freedesktop.org>
Sun, 15 Mar 2020 01:57:05 +0000 (18:57 -0700)
committerVinson Lee <vlee@freedesktop.org>
Mon, 16 Mar 2020 22:06:57 +0000 (15:06 -0700)
../src/gallium/drivers/panfrost/pan_cmdstream.c:1553:54: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer]
        union mali_attr varyings[PIPE_MAX_ATTRIBS] = { };
                                                     ^

Fixes: 836686daf36c ("panfrost: Move panfrost_emit_varying_descriptor() to pan_cmdstream.c")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4198>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4198>

src/gallium/drivers/panfrost/pan_cmdstream.c

index 0070c18fabadc5b5fd488641c3d607556f497243..7d61b2ff7cdc7096b8d352d86d3f9fb491b02106 100644 (file)
@@ -1550,7 +1550,7 @@ panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
         memcpy(trans.cpu, vs->varyings, vs_size);
         memcpy(trans.cpu + vs_size, fs->varyings, fs_size);
 
-        union mali_attr varyings[PIPE_MAX_ATTRIBS] = { };
+        union mali_attr varyings[PIPE_MAX_ATTRIBS] = {0};
 
         /* Figure out how many streamout buffers could be bound */
         unsigned so_count = ctx->streamout.num_targets;