diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2021-01-24 09:26:24 -0600 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-02-01 18:54:24 +0000 |
commit | 5d6ac87d6113577a82a55e4262cbf48024ae59c3 (patch) | |
tree | dd83414372b6c8814fd678ec7026e8344bfbebe8 /src/vulkan | |
parent | 8ee88948e3aa511777cdeb29e76da43059ea8ee5 (diff) |
vulkan: Add a return code to vk_device_init
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/util/vk_device.c | 4 | ||||
-rw-r--r-- | src/vulkan/util/vk_device.h | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/vulkan/util/vk_device.c b/src/vulkan/util/vk_device.c index 782f31b43d1..457169aac6e 100644 --- a/src/vulkan/util/vk_device.c +++ b/src/vulkan/util/vk_device.c @@ -26,7 +26,7 @@ #include "util/hash_table.h" #include "util/ralloc.h" -void +VkResult vk_device_init(struct vk_device *device, UNUSED const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *instance_alloc, @@ -44,6 +44,8 @@ vk_device_init(struct vk_device *device, mtx_init(&device->swapchain_private_mtx, mtx_plain); device->swapchain_private = NULL; #endif /* ANDROID */ + + return VK_SUCCESS; } void diff --git a/src/vulkan/util/vk_device.h b/src/vulkan/util/vk_device.h index 3a1188fd4b7..1a86e58fa07 100644 --- a/src/vulkan/util/vk_device.h +++ b/src/vulkan/util/vk_device.h @@ -42,11 +42,14 @@ struct vk_device { #endif }; -void vk_device_init(struct vk_device *device, - const VkDeviceCreateInfo *pCreateInfo, - const VkAllocationCallbacks *instance_alloc, - const VkAllocationCallbacks *device_alloc); -void vk_device_finish(struct vk_device *device); +VkResult MUST_CHECK +vk_device_init(struct vk_device *device, + const VkDeviceCreateInfo *pCreateInfo, + const VkAllocationCallbacks *instance_alloc, + const VkAllocationCallbacks *device_alloc); + +void +vk_device_finish(struct vk_device *device); #ifdef __cplusplus } |