mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
virgl/texture: Align destination box to block depth
In the case of a 3D texture, make sure to align to the block depth. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26005>
This commit is contained in:
parent
b280ea863d
commit
685fef1876
1 changed files with 3 additions and 0 deletions
|
|
@ -151,6 +151,9 @@ static void *texture_transfer_map_resolve(struct pipe_context *ctx,
|
|||
util_format_get_blockwidth(resource->format));
|
||||
dst_box.height = align(dst_box.height,
|
||||
util_format_get_blockheight(resource->format));
|
||||
if (resource->target == PIPE_TEXTURE_3D)
|
||||
dst_box.depth = align(dst_box.depth,
|
||||
util_format_get_blockdepth(resource->format));
|
||||
}
|
||||
|
||||
virgl_init_temp_resource_from_box(&templ, resource, &dst_box, level, 0, fmt);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue