mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
nvk: Drop memory object tracking
We no longer have to pass a list of BOs to the kernel so there's no need to track allocated memory objects like this. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25357>
This commit is contained in:
parent
c2e185e5f8
commit
b4364f5762
4 changed files with 0 additions and 17 deletions
|
|
@ -174,8 +174,6 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||
goto fail_ws_dev;
|
||||
}
|
||||
|
||||
list_inithead(&dev->memory_objects);
|
||||
|
||||
result = nvk_descriptor_table_init(dev, &dev->images,
|
||||
8 * 4 /* tic entry size */,
|
||||
1024, 1024 * 1024);
|
||||
|
|
@ -326,7 +324,6 @@ nvk_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
|
|||
nvk_heap_finish(dev, &dev->shader_heap);
|
||||
nvk_descriptor_table_finish(dev, &dev->samplers);
|
||||
nvk_descriptor_table_finish(dev, &dev->images);
|
||||
assert(list_is_empty(&dev->memory_objects));
|
||||
nouveau_ws_context_destroy(dev->ws_ctx);
|
||||
nouveau_ws_device_destroy(dev->ws_dev);
|
||||
vk_free(&dev->vk.alloc, dev);
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@ struct nvk_device {
|
|||
struct nouveau_ws_device *ws_dev;
|
||||
struct nouveau_ws_context *ws_ctx;
|
||||
|
||||
/* Protected by nvk_device::mutex */
|
||||
struct list_head memory_objects;
|
||||
|
||||
struct nvk_descriptor_table images;
|
||||
struct nvk_descriptor_table samplers;
|
||||
struct nvk_heap shader_heap;
|
||||
|
|
|
|||
|
|
@ -254,10 +254,6 @@ nvk_allocate_memory(struct nvk_device *dev,
|
|||
close(fd_info->fd);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&dev->mutex);
|
||||
list_addtail(&mem->link, &dev->memory_objects);
|
||||
pthread_mutex_unlock(&dev->mutex);
|
||||
|
||||
*mem_out = mem;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
@ -277,10 +273,6 @@ nvk_free_memory(struct nvk_device *dev,
|
|||
if (mem->map)
|
||||
nouveau_ws_bo_unmap(mem->bo, mem->map);
|
||||
|
||||
pthread_mutex_lock(&dev->mutex);
|
||||
list_del(&mem->link);
|
||||
pthread_mutex_unlock(&dev->mutex);
|
||||
|
||||
nouveau_ws_bo_destroy(mem->bo);
|
||||
|
||||
vk_device_memory_destroy(&dev->vk, pAllocator, &mem->vk);
|
||||
|
|
|
|||
|
|
@ -17,9 +17,6 @@ struct nvk_image_plane;
|
|||
struct nvk_device_memory {
|
||||
struct vk_device_memory vk;
|
||||
|
||||
struct list_head link;
|
||||
|
||||
|
||||
struct nouveau_ws_bo *bo;
|
||||
|
||||
void *map;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue