mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 17:00:09 +01:00
v3dv: align compressed image regions to block size
This fixes an assert crash in UE4 when forcing the blit path for image copies, caused by an image copy of a small miplevel which pixel size is smaller than a single compressed block, leading to an empty blit region. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23180>
This commit is contained in:
parent
74e797e6ba
commit
3ba839bf73
1 changed files with 4 additions and 4 deletions
|
|
@ -1213,8 +1213,8 @@ copy_image_blit(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
region->srcOffset.z,
|
||||
};
|
||||
const VkOffset3D src_end = {
|
||||
src_start.x + region->extent.width * src_scale_w,
|
||||
src_start.y + region->extent.height * src_scale_h,
|
||||
src_start.x + align(region->extent.width, src_block_w) * src_scale_w,
|
||||
src_start.y + align(region->extent.height, src_block_h) * src_scale_h,
|
||||
src_start.z + region->extent.depth,
|
||||
};
|
||||
|
||||
|
|
@ -1224,8 +1224,8 @@ copy_image_blit(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
region->dstOffset.z,
|
||||
};
|
||||
const VkOffset3D dst_end = {
|
||||
dst_start.x + region->extent.width * src_scale_w,
|
||||
dst_start.y + region->extent.height * src_scale_h,
|
||||
dst_start.x + align(region->extent.width, src_block_w) * src_scale_w,
|
||||
dst_start.y + align(region->extent.height, src_block_h) * src_scale_h,
|
||||
dst_start.z + region->extent.depth,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue