radv/rmv: fix image binds logging for disjoint images

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28659>
This commit is contained in:
Samuel Pitoiset
2024-04-10 10:51:39 +02:00
committed by Marge Bot
parent 04c9369c55
commit 91c48d8f43
3 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -1372,7 +1372,7 @@ radv_image_create(VkDevice _device, const struct radv_image_create_info *create_
radv_rmv_log_image_create(device, pCreateInfo, is_internal, *pImage);
if (image->bindings[0].bo)
radv_rmv_log_image_bind(device, *pImage);
radv_rmv_log_image_bind(device, 0, *pImage);
return VK_SUCCESS;
}
@@ -1682,7 +1682,7 @@ radv_BindImageMemory2(VkDevice _device, uint32_t bindInfoCount, const VkBindImag
image->bindings[0].bo = swapchain_img->bindings[0].bo;
image->bindings[0].offset = swapchain_img->bindings[0].offset;
radv_rmv_log_image_bind(device, pBindInfos[i].image);
radv_rmv_log_image_bind(device, 0, pBindInfos[i].image);
vk_address_binding_report(&instance->vk, &image->vk.base,
radv_buffer_get_va(image->bindings[0].bo) + image->bindings[0].offset,
@@ -1722,7 +1722,7 @@ radv_BindImageMemory2(VkDevice _device, uint32_t bindInfoCount, const VkBindImag
image->bindings[bind_idx].bo = mem->bo;
image->bindings[bind_idx].offset = pBindInfos[i].memoryOffset;
radv_rmv_log_image_bind(device, pBindInfos[i].image);
radv_rmv_log_image_bind(device, bind_idx, pBindInfos[i].image);
vk_address_binding_report(&instance->vk, &image->vk.base,
radv_buffer_get_va(image->bindings[bind_idx].bo) + image->bindings[bind_idx].offset,
+3 -2
View File
@@ -596,14 +596,15 @@ radv_rmv_log_image_create(struct radv_device *device, const VkImageCreateInfo *c
}
void
radv_rmv_log_image_bind(struct radv_device *device, VkImage _image)
radv_rmv_log_image_bind(struct radv_device *device, uint32_t bind_idx, VkImage _image)
{
if (!device->vk.memory_trace_data.is_enabled)
return;
VK_FROM_HANDLE(radv_image, image, _image);
simple_mtx_lock(&device->vk.memory_trace_data.token_mtx);
log_resource_bind_locked(device, (uint64_t)_image, image->bindings[0].bo, image->bindings[0].offset, image->size);
log_resource_bind_locked(device, (uint64_t)_image, image->bindings[bind_idx].bo, image->bindings[bind_idx].offset,
image->size);
simple_mtx_unlock(&device->vk.memory_trace_data.token_mtx);
}
+1 -1
View File
@@ -41,7 +41,7 @@ void radv_rmv_log_buffer_bind(struct radv_device *device, VkBuffer _buffer);
void radv_rmv_log_image_create(struct radv_device *device, const VkImageCreateInfo *create_info, bool is_internal,
VkImage _image);
void radv_rmv_log_image_bind(struct radv_device *device, VkImage _image);
void radv_rmv_log_image_bind(struct radv_device *device, uint32_t bind_idx, VkImage _image);
void radv_rmv_log_query_pool_create(struct radv_device *device, VkQueryPool pool);