From: Jason Ekstrand Date: Fri, 31 Jan 2020 22:08:31 +0000 (-0600) Subject: anv/blorp: Use the correct size for vkCmdCopyBufferToImage X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d7fe9af6202413aa4e6f0f53d89577ed8ea80027;p=android-x86%2Fexternal-mesa.git anv/blorp: Use the correct size for vkCmdCopyBufferToImage Now that we're using an uncompressed format for the buffer, we have to scale down the dimensions we pass into BLORP when doing buffer->image copies. Fixes: dd92179a72 "anv: Canonicalize buffer formats for image/buffer..." Closes: #2452 Reviewed-by: Erik Faye-Lund Reviewed-by: Lionel Landwerlin Tested-by: Marge Bot Part-of: --- diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 232d02fdddc..a9e664c3310 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -535,6 +535,14 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer, bool dst_has_shadow = false; struct blorp_surf dst_shadow_surf; if (&image == dst) { + /* In this case, the source is the buffer and, since blorp takes its + * copy dimensions in terms of the source format, we have to use the + * scaled down version for compressed textures because the source + * format is an RGB format. + */ + extent.width = buffer_extent.width; + extent.height = buffer_extent.height; + anv_cmd_buffer_mark_image_written(cmd_buffer, anv_image, aspect, dst->surf.aux_usage, dst->level,