mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
radv: fix programming pitches for LINEAR_SUB_WINDOW on GFX12
GFX12 supports up to 64k images. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33252>
This commit is contained in:
parent
1a942f53cc
commit
7c949f1760
1 changed files with 4 additions and 2 deletions
|
|
@ -428,6 +428,7 @@ radv_sdma_emit_copy_linear_sub_window(const struct radv_device *device, struct r
|
|||
* We currently use the smallest limits (from SDMA v2.4).
|
||||
*/
|
||||
|
||||
const struct radv_physical_device *pdev = radv_device_physical(device);
|
||||
const VkOffset3D src_off = radv_sdma_pixel_offset_to_blocks(src->offset, src->blk_w, src->blk_h);
|
||||
const VkOffset3D dst_off = radv_sdma_pixel_offset_to_blocks(dst->offset, dst->blk_w, dst->blk_h);
|
||||
const VkExtent3D ext = radv_sdma_pixel_extent_to_blocks(pix_extent, src->blk_w, src->blk_h);
|
||||
|
|
@ -435,6 +436,7 @@ radv_sdma_emit_copy_linear_sub_window(const struct radv_device *device, struct r
|
|||
const unsigned dst_pitch = radv_sdma_pixels_to_blocks(dst->pitch, dst->blk_w);
|
||||
const unsigned src_slice_pitch = radv_sdma_pixel_area_to_blocks(src->slice_pitch, src->blk_w, src->blk_h);
|
||||
const unsigned dst_slice_pitch = radv_sdma_pixel_area_to_blocks(dst->slice_pitch, dst->blk_w, dst->blk_h);
|
||||
const enum sdma_version ver = pdev->info.sdma_ip_version;
|
||||
|
||||
assert(src->bpp == dst->bpp);
|
||||
assert(util_is_power_of_two_nonzero(src->bpp));
|
||||
|
|
@ -448,12 +450,12 @@ radv_sdma_emit_copy_linear_sub_window(const struct radv_device *device, struct r
|
|||
radeon_emit(cs, src->va);
|
||||
radeon_emit(cs, src->va >> 32);
|
||||
radeon_emit(cs, src_off.x | src_off.y << 16);
|
||||
radeon_emit(cs, src_off.z | (src_pitch - 1) << 13);
|
||||
radeon_emit(cs, src_off.z | (src_pitch - 1) << (ver >= SDMA_7_0 ? 16 : 13));
|
||||
radeon_emit(cs, src_slice_pitch - 1);
|
||||
radeon_emit(cs, dst->va);
|
||||
radeon_emit(cs, dst->va >> 32);
|
||||
radeon_emit(cs, dst_off.x | dst_off.y << 16);
|
||||
radeon_emit(cs, dst_off.z | (dst_pitch - 1) << 13);
|
||||
radeon_emit(cs, dst_off.z | (dst_pitch - 1) << (ver >= SDMA_7_0 ? 16 : 13));
|
||||
radeon_emit(cs, dst_slice_pitch - 1);
|
||||
radeon_emit(cs, (ext.width - 1) | (ext.height - 1) << 16);
|
||||
radeon_emit(cs, (ext.depth - 1));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue