radv: fix missing texel scale for unaligned linear SDMA copies

texel_scale was 0 which caused GPU hangs for unaligned linear copies.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13195
Fixes: 4b73d7e817 ("radv: fix SDMA copies for linear 96-bits formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35047>
(cherry picked from commit c22d86e844)
This commit is contained in:
Samuel Pitoiset 2025-05-19 11:22:33 +02:00 committed by Eric Engestrom
parent 9ff1596f67
commit db7d38ccef
2 changed files with 3 additions and 1 deletions

View file

@ -164,7 +164,7 @@
"description": "radv: fix missing texel scale for unaligned linear SDMA copies",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4b73d7e8174faf7cc9bfa351befc637ffe2e53c1",
"notes": null

View file

@ -521,6 +521,7 @@ radv_sdma_emit_copy_linear_sub_window(const struct radv_device *device, struct r
/* Adjust offset/extent for 96-bits formats because SDMA expects a power of two bpp. */
const uint32_t texel_scale = src->texel_scale == 1 ? dst->texel_scale : src->texel_scale;
assert(texel_scale);
src_off.x *= texel_scale;
dst_off.x *= texel_scale;
ext.width *= texel_scale;
@ -729,6 +730,7 @@ radv_sdma_copy_buffer_image_unaligned(const struct radv_device *device, struct r
.blk_h = img.blk_h,
.pitch = info.aligned_row_pitch * img.blk_w,
.slice_pitch = info.aligned_row_pitch * img.blk_w * info.extent_vertical_blocks * img.blk_h,
.texel_scale = buf->texel_scale,
};
VkExtent3D extent = base_extent;