diff options
Diffstat (limited to 'src/panfrost/midgard/midgard_emit.c')
-rw-r--r-- | src/panfrost/midgard/midgard_emit.c | 8 |
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(¤t64, &bundle->instructions[0]->load_store, sizeof(current64)); |