aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_emit.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-11-15 14:19:34 -0500
committerAlyssa Rosenzweig <[email protected]>2019-11-17 22:19:31 -0500
commitbc9a7d0699a21f3fa94f910ed7cd16e047c63edf (patch)
tree6fd26b6f4a6147491f0af7d44c264d0d4af91421 /src/panfrost/midgard/midgard_emit.c
parent1798f6bfc33d1d77dae1112591dce18bf7fdbc4a (diff)
pan/midgard: Represent ld/st offset unpacked
This simplifies manipulation of the offsets dramatically, fixing some UBO access related bugs. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_emit.c')
-rw-r--r--src/panfrost/midgard/midgard_emit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c
index 9d03bbc1a09..7559a34dcfb 100644
--- a/src/panfrost/midgard/midgard_emit.c
+++ b/src/panfrost/midgard/midgard_emit.c
@@ -388,6 +388,14 @@ emit_binary_bundle(compiler_context *ctx,
mir_pack_ldst_mask(bundle->instructions[i]);
mir_pack_swizzle_ldst(bundle->instructions[i]);
+
+ /* Apply a constant offset */
+ unsigned offset = bundle->instructions[i]->constants[0];
+
+ if (offset) {
+ bundle->instructions[i]->load_store.varying_parameters |= (offset & 0x7F) << 3;
+ bundle->instructions[i]->load_store.address |= (offset >> 7);
+ }
}
memcpy(&current64, &bundle->instructions[0]->load_store, sizeof(current64));