nvk/wsi: Style fixes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:12:00 -06:00 committed by Marge Bot
parent 279d81c083
commit d9bb29d3f8
2 changed files with 16 additions and 13 deletions

View file

@ -6,32 +6,35 @@
static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
nvk_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
{
VK_FROM_HANDLE(nvk_physical_device, pdevice, physicalDevice);
return vk_instance_get_proc_addr_unchecked(&pdevice->instance->vk, pName);
VK_FROM_HANDLE(nvk_physical_device, pdev, physicalDevice);
return vk_instance_get_proc_addr_unchecked(&pdev->instance->vk, pName);
}
VkResult
nvk_init_wsi(struct nvk_physical_device *physical_device)
nvk_init_wsi(struct nvk_physical_device *pdev)
{
VkResult result;
struct wsi_device_options wsi_options = {
.sw_device = false
};
VkResult result =
wsi_device_init(&physical_device->wsi_device, nvk_physical_device_to_handle(physical_device),
nvk_wsi_proc_addr, &physical_device->instance->vk.alloc,
-1, NULL, &wsi_options);
result = wsi_device_init(&pdev->wsi_device,
nvk_physical_device_to_handle(pdev),
nvk_wsi_proc_addr, &pdev->instance->vk.alloc,
-1, NULL, &wsi_options);
if (result != VK_SUCCESS)
return result;
physical_device->vk.wsi_device = &physical_device->wsi_device;
pdev->vk.wsi_device = &pdev->wsi_device;
return result;
}
void
nvk_finish_wsi(struct nvk_physical_device *physical_device)
nvk_finish_wsi(struct nvk_physical_device *pdev)
{
physical_device->vk.wsi_device = NULL;
wsi_device_finish(&physical_device->wsi_device, &physical_device->instance->vk.alloc);
pdev->vk.wsi_device = NULL;
wsi_device_finish(&pdev->wsi_device, &pdev->instance->vk.alloc);
}
VKAPI_ATTR VkResult VKAPI_CALL

View file

@ -3,7 +3,7 @@
#include "nvk_physical_device.h"
VkResult nvk_init_wsi(struct nvk_physical_device *physical_device);
void nvk_finish_wsi(struct nvk_physical_device *physical_device);
VkResult nvk_init_wsi(struct nvk_physical_device *pdev);
void nvk_finish_wsi(struct nvk_physical_device *pdev);
#endif