nvk: init dev->physical_device earlier.

When device is passed to bo destroy this is needed earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Dave Airlie 2022-10-31 14:54:14 +10:00 committed by Marge Bot
parent cca5f6b280
commit be456a3be2

View file

@ -140,6 +140,7 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
goto fail_alloc;
dev->vk.command_buffer_ops = &nvk_cmd_buffer_ops;
dev->pdev = pdev;
int ret = nouveau_ws_context_create(pdev->dev, &dev->ctx);
if (ret) {
@ -214,8 +215,6 @@ nvk_CreateDevice(VkPhysicalDevice physicalDevice,
}
pthread_condattr_destroy(&condattr);
dev->pdev = pdev;
void *zero_map;
dev->zero_page = nouveau_ws_bo_new_mapped(dev->pdev->dev, 0x1000, 0,
NOUVEAU_WS_BO_LOCAL,