aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-06-04 11:32:59 -0400
committerMarge Bot <[email protected]>2020-06-04 17:46:45 +0000
commit2d1688345a622add9fef1dd5d6d87bee614d5666 (patch)
tree3e9d1d147d9f39c00bc600f76500876acfa21578 /src/panfrost
parentde8be1de132085c434532f3dc0d1c456109a8f2a (diff)
pan/mdg: Ensure ld_vary_16 is aligned
Otherwise packing may fail. Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 5f8dd413bcc ("pan/mdg: Handle 16-bit ld_vary") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5339>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/midgard/midgard_compile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 98f948a9b88..4cce9102c68 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -1273,6 +1273,12 @@ emit_varying_read(
midgard_instruction ins = m_ld_vary_32(dest, offset);
ins.mask = mask_of(nr_comp);
+ ins.dest_type = type;
+
+ if (type == nir_type_float16) {
+ /* Ensure we are aligned so we can pack it later */
+ ins.mask = mask_of(ALIGN_POT(nr_comp, 2));
+ }
for (unsigned i = 0; i < ARRAY_SIZE(ins.swizzle[0]); ++i)
ins.swizzle[0][i] = MIN2(i + component, COMPONENT_W);