OSDN Git Service

anv/blorp: Rename buffer image stride parameters
authorJason Ekstrand <jason@jlekstrand.net>
Sat, 18 Jan 2020 00:25:33 +0000 (18:25 -0600)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 28 Jan 2020 16:54:25 +0000 (08:54 -0800)
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@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
(cherry picked from commit 14c6e665f7725e9cf314a4bd06de908a943bd43a)

.pick_status.json
src/intel/vulkan/anv_blorp.c

index bd254f1..4c921ff 100644 (file)
         "description": "anv/blorp: Rename buffer image stride parameters",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
index 9b97f66..bb831ce 100644 (file)
@@ -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;