aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_a6xx.c
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2020-04-22 23:20:26 -0400
committerMarge Bot <[email protected]>2020-04-24 13:11:58 +0000
commitedc35c1f54a0f72b6c0f01b2156c10c904459b4f (patch)
tree76b307526af37c05c7bb664802b0ee9c85789fc5 /src/freedreno/ir3/ir3_a6xx.c
parentede1c171c550a48a7957af091e7ac84e088bc6ba (diff)
freedreno/ir3: fix 16-bit ssbo access
Update cat6 instruction type, and shift 1 in lower_offset_for_ssbo. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4708>
Diffstat (limited to 'src/freedreno/ir3/ir3_a6xx.c')
-rw-r--r--src/freedreno/ir3/ir3_a6xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_a6xx.c b/src/freedreno/ir3/ir3_a6xx.c
index 23c1970bb36..6f0ba54dc36 100644
--- a/src/freedreno/ir3/ir3_a6xx.c
+++ b/src/freedreno/ir3/ir3_a6xx.c
@@ -89,7 +89,7 @@ emit_intrinsic_load_ssbo(struct ir3_context *ctx, nir_intrinsic_instr *intr,
ldib->regs[0]->wrmask = MASK(intr->num_components);
ldib->cat6.iim_val = intr->num_components;
ldib->cat6.d = 1;
- ldib->cat6.type = TYPE_U32;
+ ldib->cat6.type = intr->dest.ssa.bit_size == 16 ? TYPE_U16 : TYPE_U32;
ldib->barrier_class = IR3_BARRIER_BUFFER_R;
ldib->barrier_conflict = IR3_BARRIER_BUFFER_W;
handle_bindless_cat6(ldib, intr->src[0]);
@@ -118,7 +118,7 @@ emit_intrinsic_store_ssbo(struct ir3_context *ctx, nir_intrinsic_instr *intr)
stib = ir3_STIB(b, ssbo_idx(ctx, intr->src[1]), 0, offset, 0, val, 0);
stib->cat6.iim_val = ncomp;
stib->cat6.d = 1;
- stib->cat6.type = TYPE_U32;
+ stib->cat6.type = intr->src[0].ssa->bit_size == 16 ? TYPE_U16 : TYPE_U32;
stib->barrier_class = IR3_BARRIER_BUFFER_W;
stib->barrier_conflict = IR3_BARRIER_BUFFER_R | IR3_BARRIER_BUFFER_W;
handle_bindless_cat6(stib, intr->src[1]);