Monado OpenXR Runtime
vk_surface_info.c File Reference

Helper for getting information from a VkSurfaceKHR. More...

Include dependency graph for vk_surface_info.c:

Macros

#define P(...)   u_pp(dg, __VA_ARGS__)
 
#define PNT(...)   u_pp(dg, "\n\t" __VA_ARGS__)
 
#define PNTT(...)   u_pp(dg, "\n\t\t" __VA_ARGS__)
 
#define PRINT_BITS(BITS, FUNC)
 

Functions

void vk_surface_info_destroy (struct vk_surface_info *info)
 Free all lists allocated by vk_surface_info. More...
 
XRT_CHECK_RESULT VkResult vk_surface_info_fill_in (struct vk_bundle *vk, struct vk_surface_info *info, VkSurfaceKHR surface)
 Fill in the given vk_surface_info, will allocate lists. More...
 
void vk_print_surface_info (struct vk_bundle *vk, struct vk_surface_info *info, enum u_logging_level log_level)
 Print out the gathered information about the surface given to vk_surface_info_fill_in. More...
 

Detailed Description

Helper for getting information from a VkSurfaceKHR.

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

Macro Definition Documentation

◆ PRINT_BITS

#define PRINT_BITS (   BITS,
  FUNC 
)
Value:
do { \
for (uint32_t index = 0; index < 32; index++) { \
uint32_t bit = (BITS) & (1u << index); \
if (!bit) { \
continue; \
} \
const char *str = FUNC(bit, true); \
if (str != NULL) { \
PNTT("%s", str); \
} else { \
PNTT("0x%08x", bit); \
} \
} \
} while (false)

Function Documentation

◆ vk_print_surface_info()

void vk_print_surface_info ( struct vk_bundle vk,
struct vk_surface_info info,
enum u_logging_level  log_level 
)

Print out the gathered information about the surface given to vk_surface_info_fill_in.

◆ vk_surface_info_destroy()

void vk_surface_info_destroy ( struct vk_surface_info info)

Free all lists allocated by vk_surface_info.

References U_ZERO.

Referenced by vk_surface_info_fill_in().

◆ vk_surface_info_fill_in()

XRT_CHECK_RESULT VkResult vk_surface_info_fill_in ( struct vk_bundle vk,
struct vk_surface_info info,
VkSurfaceKHR  surface 
)