diff --git a/.pick_status.json b/.pick_status.json index 11e9648798e..3c0acc09e65 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2344,7 +2344,7 @@ "description": "ac/nir: split 16-bit SSBO stores on GFX6", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 51a64e56934..503391bd3f2 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -1735,12 +1735,13 @@ static void visit_store_ssbo(struct ac_nir_context *ctx, num_bytes = 2; } - /* Due to alignment issues, split stores of 8-bit vectors. */ - if (ctx->ac.chip_class == GFX6 && - elem_size_bytes == 1 && count > 1) { + /* Due to alignment issues, split stores of 8-bit/16-bit + * vectors. + */ + if (ctx->ac.chip_class == GFX6 && count > 1 && elem_size_bytes < 4) { writemask |= ((1u << (count - 1)) - 1u) << (start + 1); count = 1; - num_bytes = 1; + num_bytes = elem_size_bytes; } data = extract_vector_range(&ctx->ac, base_data, start, count);