mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
ac/nir: split 16-bit SSBO stores on GFX6
Due to possible alignment issues, make sure to split stores of
16-bit vectors.
Doom Eternal requires storageBuffer16BitAccess.
Cc: 20.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4339>
(cherry picked from commit 3cd5450df5)
This commit is contained in:
parent
fbef99b5a6
commit
053e5a2c13
2 changed files with 6 additions and 5 deletions
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue