diff options
author | Connor Abbott <[email protected]> | 2020-04-15 14:18:03 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-15 22:38:20 +0000 |
commit | abcfb6437062f469335d27d5ef60ecf20272dc26 (patch) | |
tree | b6c5ba91f6668837dc3d9447a5b952939dc647b3 /src/freedreno/ir3/ir3.c | |
parent | 2d489f76f48095799392a915dcedc074bbb5e52a (diff) |
ir3: Fix LDC offset units
I had missed that LDC actually uses vec4 units for its offset. This
means that we have to create a new instruction, and lower it in
ir3_nir_lower_io_offsets, similar to the existing SSBO instructions.
Unfortunately we can't assume that loads are always vec4-aligned, so we
have to use the alignment information that NIR gives us. Unfortunately,
it's currently woefully inadequate, and will have to be fixed to give us
good codegen in the future.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4568>
Diffstat (limited to 'src/freedreno/ir3/ir3.c')
-rw-r--r-- | src/freedreno/ir3/ir3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index dcd5a5082a6..9678389e8b5 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -561,7 +561,7 @@ static int emit_cat6_a6xx(struct ir3_instruction *instr, void *ptr, } cat6->type = instr->cat6.type; - cat6->d = instr->cat6.d - 1; + cat6->d = instr->cat6.d - (instr->opc == OPC_LDC ? 0 : 1); cat6->typed = instr->cat6.typed; cat6->type_size = instr->cat6.iim_val - 1; cat6->opc = instr->opc; |