mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
radv: fix copying images with different swizzle modes on SDMA7
Swizzle modes must match on SDMA7 (GFX12), and the micro tile mode
doesn't exist.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit cc21e61e43)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
parent
223af79274
commit
f1f583b3bc
2 changed files with 11 additions and 7 deletions
|
|
@ -4354,7 +4354,7 @@
|
|||
"description": "radv: fix copying images with different swizzle modes on SDMA7",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -610,12 +610,6 @@ radv_sdma_use_t2t_scanline_copy(const struct radv_device *device, const struct r
|
|||
return true;
|
||||
}
|
||||
|
||||
/* The two images can have a different block size,
|
||||
* but must have the same swizzle mode.
|
||||
*/
|
||||
if (src->micro_tile_mode != dst->micro_tile_mode)
|
||||
return true;
|
||||
|
||||
/* The T2T subwindow copy packet only has fields for one metadata configuration.
|
||||
* It can either compress or decompress, or copy uncompressed images, but it
|
||||
* can't copy from a compressed image to another.
|
||||
|
|
@ -623,6 +617,16 @@ radv_sdma_use_t2t_scanline_copy(const struct radv_device *device, const struct r
|
|||
if (src->is_compressed && dst->is_compressed)
|
||||
return true;
|
||||
|
||||
if (ver >= SDMA_7_0) {
|
||||
/* No support for tiling format transformation at all. */
|
||||
if (src->surf->u.gfx9.swizzle_mode != dst->surf->u.gfx9.swizzle_mode)
|
||||
return true;
|
||||
} else {
|
||||
/* The two images can have a different block size, but must have the same swizzle mode. */
|
||||
if (src->micro_tile_mode != dst->micro_tile_mode)
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool needs_3d_alignment = src->is_3d && (src->micro_tile_mode == RADEON_MICRO_MODE_DISPLAY ||
|
||||
src->micro_tile_mode == RADEON_MICRO_MODE_STANDARD);
|
||||
const unsigned log2bpp = util_logbase2(src->bpp);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue