venus: Use vk_object_id as blob_id for guest_vram device memory alloc

blob_id == 0 does not refer to an existing VkDeviceMemory and implies
a shmem allocation. So for guest_vram device memory allocations, 0 is
not a valid blob id and must be greater than 0.

Therefore, set vk_object_id as blob_id for guest_vram device memory
allocations. Considering that vk_object_id made from valid pointer, it
will be always greater than 0.

Signed-off-by: Andrew D. Gazizov <andrew.gazizov@opensynergy.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26130>
This commit is contained in:
Andrew Gazizov
2023-11-01 15:44:31 +01:00
committed by Marge Bot
parent c853e259ab
commit 816f66cdfd
+1 -1
View File
@@ -348,7 +348,7 @@ vn_device_memory_alloc_guest_vram(struct vn_device *dev,
.memoryTypes[mem_vk->memory_type_index];
VkResult result = vn_renderer_bo_create_from_device_memory(
dev->renderer, mem_vk->size, 0, mem_type->propertyFlags,
dev->renderer, mem_vk->size, mem->base.id, mem_type->propertyFlags,
mem_vk->export_handle_types, &mem->base_bo);
if (result != VK_SUCCESS) {
return result;