lavapipe: store memory allocation size onto lvp_device_memory

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23077>
This commit is contained in:
Mike Blumenkrantz 2023-05-17 08:36:32 -04:00 committed by Marge Bot
parent 0c79c04f49
commit 54c981e4a0
2 changed files with 2 additions and 0 deletions

View file

@ -1590,6 +1590,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_AllocateMemory(
mem->memory_type = LVP_DEVICE_MEMORY_TYPE_DEFAULT;
mem->backed_fd = -1;
mem->size = pAllocateInfo->allocationSize;
if (host_ptr_info) {
mem->pmem = host_ptr_info->pHostPointer;

View file

@ -208,6 +208,7 @@ struct lvp_device_memory {
struct pipe_memory_allocation *pmem;
uint32_t type_index;
VkDeviceSize map_size;
VkDeviceSize size;
void * map;
enum lvp_device_memory_type memory_type;
int backed_fd;