mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 02:18:10 +02:00
radv/sdma: fix unaligned 96-bits copies on GFX9
On SDMA4, when the pitch isn't aligned, the width needs to be scaled
by 3 for 96-bits formats.
On SDMA5+, the pitch is aligned and the driver doesn't need to fallback
to unaligned copies.
CC: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36067>
(cherry picked from commit a51afbaff8)
This commit is contained in:
parent
1c3798ed86
commit
56b0874422
2 changed files with 2 additions and 2 deletions
|
|
@ -1794,7 +1794,7 @@
|
|||
"description": "radv/sdma: fix unaligned 96-bits copies on GFX9",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ static struct radv_sdma_chunked_copy_info
|
|||
radv_sdma_get_chunked_copy_info(const struct radv_device *const device, const struct radv_sdma_surf *const img,
|
||||
const VkExtent3D extent)
|
||||
{
|
||||
const unsigned extent_horizontal_blocks = DIV_ROUND_UP(extent.width, img->blk_w);
|
||||
const unsigned extent_horizontal_blocks = DIV_ROUND_UP(extent.width * img->texel_scale, img->blk_w);
|
||||
const unsigned extent_vertical_blocks = DIV_ROUND_UP(extent.height, img->blk_h);
|
||||
const unsigned aligned_row_pitch = ALIGN(extent_horizontal_blocks, 4);
|
||||
const unsigned aligned_row_bytes = aligned_row_pitch * img->bpp;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue