The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/vk: Print more VkSurface info

+22 -4
+22 -4
src/xrt/auxiliary/vk/vk_surface_info.c
··· 20 20 #define P(...) u_pp(dg, __VA_ARGS__) 21 21 #define PNT(...) u_pp(dg, "\n\t" __VA_ARGS__) 22 22 #define PNTT(...) u_pp(dg, "\n\t\t" __VA_ARGS__) 23 + #define PRINT_BITS(BITS, FUNC) \ 24 + do { \ 25 + for (uint32_t index = 0; index < 32; index++) { \ 26 + uint32_t bit = (BITS) & (1u << index); \ 27 + if (!bit) { \ 28 + continue; \ 29 + } \ 30 + const char *str = FUNC(bit, true); \ 31 + if (str != NULL) { \ 32 + PNTT("%s", str); \ 33 + } else { \ 34 + PNTT("0x%08x", bit); \ 35 + } \ 36 + } \ 37 + } while (false) 23 38 24 39 XRT_CHECK_RESULT static VkResult 25 40 surface_info_get_present_modes(struct vk_bundle *vk, struct vk_surface_info *info, VkSurfaceKHR surface) ··· 193 208 PNT("caps.minImageExtent: %ux%u", info->caps.minImageExtent.width, info->caps.minImageExtent.height); 194 209 PNT("caps.maxImageExtent: %ux%u", info->caps.maxImageExtent.width, info->caps.maxImageExtent.height); 195 210 PNT("caps.maxImageArrayLayers: %u", info->caps.maxImageArrayLayers); 196 - // PNT("caps.supportedTransforms") 197 - // PNT("caps.currentTransform") 198 - // PNT("caps.supportedCompositeAlpha") 199 - // PNT("caps.supportedUsageFlags") 211 + PNT("caps.supportedTransforms:"); 212 + PRINT_BITS(info->caps.supportedTransforms, vk_surface_transform_flag_string); 213 + PNT("caps.currentTransform: %s", vk_surface_transform_flag_string(info->caps.currentTransform, false)); 214 + PNT("caps.supportedCompositeAlpha:"); 215 + PRINT_BITS(info->caps.supportedCompositeAlpha, vk_composite_alpha_flag_string); 216 + PNT("caps.supportedUsageFlags:"); 217 + PRINT_BITS(info->caps.supportedUsageFlags, vk_image_usage_flag_string); 200 218 201 219 PNT("present_modes(%u):", info->present_mode_count); 202 220 for (uint32_t i = 0; i < info->present_mode_count; i++) {