Monado OpenXR Runtime
oxr_vulkan.c File Reference

Holds Vulkan related functions. More...

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_string_list.h"
#include "vk/vk_helpers.h"
#include "xrt/xrt_gfx_vk.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_two_call.h"
Include dependency graph for oxr_vulkan.c:

Macros

#define GET_PROC(name)   PFN_##name name = (PFN_##name)getProc(vkInstance, #name)
 
#define UUID_STR_SIZE   (XRT_UUID_SIZE * 3 + 1)
 

Functions

static void snprint_uuid (char *str, size_t size, const xrt_uuid_t *uuid)
 
static void snprint_luid (char *str, size_t size, xrt_luid_t *luid)
 
XrResult oxr_vk_get_instance_exts (struct oxr_logger *log, struct oxr_system *sys, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString)
 
XrResult oxr_vk_get_device_exts (struct oxr_logger *log, struct oxr_system *sys, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString)
 
XrResult oxr_vk_get_requirements (struct oxr_logger *log, struct oxr_system *sys, XrGraphicsRequirementsVulkanKHR *graphicsRequirements)
 
static bool vk_check_extension (VkExtensionProperties *props, uint32_t prop_count, const char *ext)
 
static XrResult vk_get_instance_ext_props (struct oxr_logger *log, VkInstance instance, PFN_vkGetInstanceProcAddr GetInstanceProcAddr, VkExtensionProperties **out_props, uint32_t *out_prop_count)
 
XrResult oxr_vk_create_vulkan_instance (struct oxr_logger *log, struct oxr_system *sys, const XrVulkanInstanceCreateInfoKHR *createInfo, VkInstance *vulkanInstance, VkResult *vulkanResult)
 
static XrResult vk_get_device_ext_props (struct oxr_logger *log, VkInstance instance, PFN_vkGetInstanceProcAddr GetInstanceProcAddr, VkPhysicalDevice physical_device, VkExtensionProperties **out_props, uint32_t *out_prop_count)
 
static XrResult vk_get_device_features (struct oxr_logger *log, VkInstance instance, PFN_vkGetInstanceProcAddr GetInstanceProcAddr, VkPhysicalDevice physical_device, VkPhysicalDeviceFeatures2 *physical_device_features)
 
static VkBaseInStructure const * vk_find_struct_in_chain (const VkBaseInStructure *base, VkStructureType type)
 
XrResult oxr_vk_create_vulkan_device (struct oxr_logger *log, struct oxr_system *sys, const XrVulkanDeviceCreateInfoKHR *createInfo, VkDevice *vulkanDevice, VkResult *vulkanResult)
 
XrResult oxr_vk_get_physical_device (struct oxr_logger *log, struct oxr_instance *inst, struct oxr_system *sys, VkInstance vkInstance, PFN_vkGetInstanceProcAddr getProc, VkPhysicalDevice *vkPhysicalDevice)
 

Variables

static const char * required_vk_instance_extensions []
 
static const char * optional_vk_instance_extensions []
 
static const char * required_vk_device_extensions []
 
static const char * optional_device_extensions []
 

Detailed Description

Variable Documentation

◆ optional_device_extensions

const char* optional_device_extensions[]
static
Initial value:
= {
NULL,
}

◆ optional_vk_instance_extensions

const char* optional_vk_instance_extensions[]
static
Initial value:
= {
}

◆ required_vk_instance_extensions

const char* required_vk_instance_extensions[]
static
Initial value:
= {
VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
}
Todo:
extension lists are duplicated as long strings in comp_vk_glue.c