From: Alyssa Rosenzweig Date: Fri, 14 Aug 2020 19:23:10 +0000 (-0400) Subject: panfrost: Use pack for general varying X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59fa26902d56e068de1769a62d8329e6777bba92;p=mesa.git panfrost: Use pack for general varying Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index b2268faf9bb..376705fc844 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1715,14 +1715,12 @@ pan_emit_vary(struct mali_attribute_packed *out, panfrost_get_default_swizzle(nr_channels) : panfrost_bifrost_swizzle(nr_channels); - struct mali_attr_meta meta = { - .index = pan_varying_index(present, buf), - .unknown1 = quirks & IS_BIFROST ? 0x0 : 0x2, - .format = (format << 12) | swizzle, - .src_offset = offset - }; - - memcpy(out, &meta, sizeof(meta)); + pan_pack(out, ATTRIBUTE, cfg) { + cfg.buffer_index = pan_varying_index(present, buf); + cfg.unknown = quirks & IS_BIFROST ? 0x0 : 0x1; + cfg.format = (format << 12) | swizzle; + cfg.offset = offset; + } } /* General varying that is unused */