Mesa (staging/19.3): anv/blorp: Rename buffer image stride parameters

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 23 22:40:49 UTC 2020


Module: Mesa
Branch: staging/19.3
Commit: 0f4d7c41c311457e8577b77d01b2929878476bad
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f4d7c41c311457e8577b77d01b2929878476bad

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Jan 17 18:25:33 2020 -0600

anv/blorp: Rename buffer image stride parameters

The new names fit better with the Vulkan names and don't pretend to be
an actual image extent.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
(cherry picked from commit 14c6e665f7725e9cf314a4bd06de908a943bd43a)

---

 .pick_status.json            |  2 +-
 src/intel/vulkan/anv_blorp.c | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index a2b0565fef4..4f398a425fd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1876,7 +1876,7 @@
         "description": "anv/blorp: Rename buffer image stride parameters",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 9b97f667fff..bb831ceb069 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -454,22 +454,23 @@ copy_buffer_to_image(struct anv_cmd_buffer *cmd_buffer,
          anv_get_isl_format(&cmd_buffer->device->info, anv_image->vk_format,
                             aspect, VK_IMAGE_TILING_LINEAR);
 
-      const VkExtent3D bufferImageExtent = {
-         .width  = pRegions[r].bufferRowLength ?
-                   pRegions[r].bufferRowLength : extent.width,
-         .height = pRegions[r].bufferImageHeight ?
-                   pRegions[r].bufferImageHeight : extent.height,
-      };
-
       const struct isl_format_layout *buffer_fmtl =
          isl_format_get_layout(buffer_format);
 
+      const uint32_t buffer_row_length =
+         pRegions[r].bufferRowLength ?
+         pRegions[r].bufferRowLength : extent.width;
+
+      const uint32_t buffer_image_height =
+         pRegions[r].bufferImageHeight ?
+         pRegions[r].bufferImageHeight : extent.height;
+
       const uint32_t buffer_row_pitch =
-         DIV_ROUND_UP(bufferImageExtent.width, buffer_fmtl->bw) *
+         DIV_ROUND_UP(buffer_row_length, buffer_fmtl->bw) *
          (buffer_fmtl->bpb / 8);
 
       const uint32_t buffer_layer_stride =
-         DIV_ROUND_UP(bufferImageExtent.height, buffer_fmtl->bh) *
+         DIV_ROUND_UP(buffer_image_height, buffer_fmtl->bh) *
          buffer_row_pitch;
 
       struct isl_surf buffer_isl_surf;



More information about the mesa-commit mailing list