summaryrefslogtreecommitdiff
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-12-31 09:57:37 -0500
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-12-31 10:50:49 -0500
commit129d390bd8cc50f55b748ae6e95bed8c6074a488 (patch)
tree439bd7d5ab1dbae922544cd3201d6ce600307764 /src/panfrost/midgard
parent469d74908cedf1e10979a3549d72df58d71fbc31 (diff)
pan/mdg: Fix bound setting in RA for sources
The bound parameter allows us to prevent allocations from crossing particular boundaries (typically 128-bit boundaries). For 16-bit, we don't want to cross 64-bit boundaries, in order to keep swizzles possible to encode. We already handle this for 16-bit destinations, but it _also_ needs to be (redundantly) handled for 16-bit sources, in case types don't match (for example, with a vectorized size conversion instruction). Fixes a few newer dEQP fails. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8282>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_ra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_ra.c b/src/panfrost/midgard/midgard_ra.c
index 1dd56c876a4..22477014a22 100644
--- a/src/panfrost/midgard/midgard_ra.c
+++ b/src/panfrost/midgard/midgard_ra.c
@@ -489,6 +489,12 @@ allocate_registers(compiler_context *ctx, bool *spilled)
if (size == 16)
min_bound[dest] = 8;
+ mir_foreach_src(ins, s) {
+ unsigned src_size = nir_alu_type_get_type_size(ins->src_types[s]);
+ if (src_size == 16 && ins->src[s] < SSA_FIXED_MINIMUM)
+ min_bound[ins->src[s]] = MAX2(min_bound[ins->src[s]], 8);
+ }
+
/* We don't have a swizzle for the conditional and we don't
* want to muck with the conditional itself, so just force
* alignment for now */