v3dv: allow TFU transfers for mip levels other than 0
We had a check to ensure we were copying full slices, but the size check was done against the base mip level, so in practice we were only using the TFU for mip 0. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23180>
This commit is contained in:
committed by
Marge Bot
parent
1cb2d2a5ee
commit
74e797e6ba
@@ -1539,11 +1539,13 @@ copy_buffer_to_image_tfu(struct v3dv_cmd_buffer *cmd_buffer,
|
||||
else
|
||||
height = region->bufferImageHeight;
|
||||
|
||||
uint8_t plane =
|
||||
const uint8_t plane =
|
||||
v3dv_plane_from_aspect(region->imageSubresource.aspectMask);
|
||||
|
||||
if (width != image->planes[plane].width ||
|
||||
height != image->planes[plane].height)
|
||||
const uint32_t mip_level = region->imageSubresource.mipLevel;
|
||||
const struct v3d_resource_slice *slice = &image->planes[plane].slices[mip_level];
|
||||
|
||||
if (width != slice->width || height != slice->height)
|
||||
return false;
|
||||
|
||||
/* Handle region semantics for compressed images */
|
||||
@@ -1566,9 +1568,6 @@ copy_buffer_to_image_tfu(struct v3dv_cmd_buffer *cmd_buffer,
|
||||
assert(format->plane_count == 1);
|
||||
const struct v3dv_format_plane *format_plane = &format->planes[0];
|
||||
|
||||
const uint32_t mip_level = region->imageSubresource.mipLevel;
|
||||
const struct v3d_resource_slice *slice = &image->planes[plane].slices[mip_level];
|
||||
|
||||
uint32_t num_layers;
|
||||
if (image->vk.image_type != VK_IMAGE_TYPE_3D)
|
||||
num_layers = region->imageSubresource.layerCount;
|
||||
|
||||
Reference in New Issue
Block a user