Mesa (staging/20.0): anv/blorp: Use the correct size for vkCmdCopyBufferToImage
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Feb 3 17:01:08 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: 0cac8f332add50892a2ca4ea408b7cec998c78a9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0cac8f332add50892a2ca4ea408b7cec998c78a9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Fri Jan 31 16:08:31 2020 -0600
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 <erik.faye-lund at collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3664>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3664>
(cherry picked from commit d7fe9af6202413aa4e6f0f53d89577ed8ea80027)
---
.pick_status.json | 2 +-
src/intel/vulkan/anv_blorp.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index d6029da4e61..0c81b8b1756 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -130,7 +130,7 @@
"description": "anv/blorp: Use the correct size for vkCmdCopyBufferToImage",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "dd92179a72e5263b9db730d92a883e2536aa4474"
},
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,
More information about the mesa-commit
mailing list