aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-01-17 18:25:33 -0600
committerMarge Bot <[email protected]>2020-01-20 16:08:17 +0000
commit14c6e665f7725e9cf314a4bd06de908a943bd43a (patch)
tree8dda7279db7b6fc8d6c815f7049461ec577a739d
parentcf5fccb0d962625179996c7261b4625a6e687c8f (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
-rw-r--r--src/intel/vulkan/anv_blorp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index adbe405e282..5649b00f29f 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -461,22 +461,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;