mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
nvk: Drop nvk_physical_device::instance
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
221e024386
commit
e722d0ff0b
4 changed files with 5 additions and 7 deletions
|
|
@ -123,7 +123,7 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||
VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
struct nvk_device *dev;
|
||||
|
||||
dev = vk_zalloc2(&pdev->instance->vk.alloc, pAllocator,
|
||||
dev = vk_zalloc2(&pdev->vk.instance->alloc, pAllocator,
|
||||
sizeof(*dev), 8, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
|
||||
if (!dev)
|
||||
return vk_error(pdev, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
|
|
|||
|
|
@ -648,7 +648,6 @@ nvk_create_drm_physical_device(struct vk_instance *_instance,
|
|||
if (result != VK_SUCCESS)
|
||||
goto fail_alloc;
|
||||
|
||||
pdev->instance = instance;
|
||||
pdev->dev = ndev;
|
||||
pdev->info = ndev->info;
|
||||
|
||||
|
|
@ -718,7 +717,7 @@ nvk_physical_device_destroy(struct vk_physical_device *vk_pdev)
|
|||
nvk_finish_wsi(pdev);
|
||||
nouveau_ws_device_destroy(pdev->dev);
|
||||
vk_physical_device_finish(&pdev->vk);
|
||||
vk_free(&pdev->instance->vk.alloc, pdev);
|
||||
vk_free(&pdev->vk.instance->alloc, pdev);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ struct nvk_instance;
|
|||
|
||||
struct nvk_physical_device {
|
||||
struct vk_physical_device vk;
|
||||
struct nvk_instance *instance;
|
||||
struct nouveau_ws_device *dev;
|
||||
struct nv_device_info info;
|
||||
struct wsi_device wsi_device;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
|
|||
nvk_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
|
||||
{
|
||||
VK_FROM_HANDLE(nvk_physical_device, pdev, physicalDevice);
|
||||
return vk_instance_get_proc_addr_unchecked(&pdev->instance->vk, pName);
|
||||
return vk_instance_get_proc_addr_unchecked(pdev->vk.instance, pName);
|
||||
}
|
||||
|
||||
VkResult
|
||||
|
|
@ -20,7 +20,7 @@ nvk_init_wsi(struct nvk_physical_device *pdev)
|
|||
};
|
||||
result = wsi_device_init(&pdev->wsi_device,
|
||||
nvk_physical_device_to_handle(pdev),
|
||||
nvk_wsi_proc_addr, &pdev->instance->vk.alloc,
|
||||
nvk_wsi_proc_addr, &pdev->vk.instance->alloc,
|
||||
-1, NULL, &wsi_options);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
|
@ -36,5 +36,5 @@ void
|
|||
nvk_finish_wsi(struct nvk_physical_device *pdev)
|
||||
{
|
||||
pdev->vk.wsi_device = NULL;
|
||||
wsi_device_finish(&pdev->wsi_device, &pdev->instance->vk.alloc);
|
||||
wsi_device_finish(&pdev->wsi_device, &pdev->vk.instance->alloc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue