Monado OpenXR Runtime
vk_enumerate.c File Reference

Vulkan enumeration helpers code. More...

#include "xrt/xrt_handles.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "vk/vk_helpers.h"
Include dependency graph for vk_enumerate.c:

Macros

#define CHECK_FIRST_CALL(FUNC, RET, COUNT)
 
#define CHECK_SECOND_CALL(FUNC, RET, TO_FREE)
 

Functions

VkResult vk_enumerate_instance_extensions_properties (struct vk_bundle *vk, const char *layer_name, uint32_t *out_prop_count, VkExtensionProperties **out_props)
 Return the VkExtensionProperties of the given layer_name, NULL means the "base" driver instance. More...
 
VkResult vk_enumerate_physical_devices (struct vk_bundle *vk, uint32_t *out_physical_device_count, VkPhysicalDevice **out_physical_devices)
 Enumerate the physical devices of the VkInstance that has been opened on the given vk_bundle. More...
 
VkResult vk_enumerate_physical_device_extension_properties (struct vk_bundle *vk, VkPhysicalDevice physical_device, const char *layer_name, uint32_t *out_prop_count, VkExtensionProperties **out_props)
 Enumerate the extension properties of the given VkPhysicalDevice for the named layer_name, NULL means the "base" driver physical device. More...
 

Detailed Description

Vulkan enumeration helpers code.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ CHECK_FIRST_CALL

#define CHECK_FIRST_CALL (   FUNC,
  RET,
  COUNT 
)
Value:
do { \
VkResult _ret = RET; \
if (_ret != VK_SUCCESS) { \
vk_print_result(vk, __FILE__, __LINE__, __func__, _ret, FUNC); \
return RET; \
} \
if (COUNT == 0) { \
goto out; \
} \
} while (false)

◆ CHECK_SECOND_CALL

#define CHECK_SECOND_CALL (   FUNC,
  RET,
  TO_FREE 
)
Value:
do { \
VkResult _ret = RET; \
if (_ret != VK_SUCCESS) { \
vk_print_result(vk, __FILE__, __LINE__, __func__, _ret, FUNC); \
free(TO_FREE); \
return RET; \
} \
} while (false)