Monado OpenXR Runtime
oxr_api_system.c File Reference

Holds system related entrypoints. More...

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xrt/xrt_compiler.h"
#include "xrt/xrt_gfx_gl.h"
#include "xrt/xrt_gfx_gles.h"
#include "util/u_debug.h"
#include "util/u_trace_marker.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_two_call.h"
#include "oxr_api_funcs.h"
#include "oxr_api_verify.h"
Include dependency graph for oxr_api_system.c:

Macros

#define OXR_VERIFY_SYSTEM_AND_GET(log, inst, sysId, system)
 A helper define that verifies the systemId. More...
 
#define OXR_VERIFY_XSYSC(LOG, SYS)
 

Functions

XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetSystem (XrInstance instance, const XrSystemGetInfo *getInfo, XrSystemId *systemId)
 OpenXR API function xrGetSystem. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetSystemProperties (XrInstance instance, XrSystemId systemId, XrSystemProperties *properties)
 OpenXR API function xrGetSystemProperties. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrEnumerateViewConfigurations (XrInstance instance, XrSystemId systemId, uint32_t viewConfigurationTypeCapacityInput, uint32_t *viewConfigurationTypeCountOutput, XrViewConfigurationType *viewConfigurationTypes)
 OpenXR API function xrEnumerateViewConfigurations. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrEnumerateEnvironmentBlendModes (XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t environmentBlendModeCapacityInput, uint32_t *environmentBlendModeCountOutput, XrEnvironmentBlendMode *environmentBlendModes)
 OpenXR API function xrEnumerateEnvironmentBlendModes. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetViewConfigurationProperties (XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, XrViewConfigurationProperties *configurationProperties)
 OpenXR API function xrGetViewConfigurationProperties. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrEnumerateViewConfigurationViews (XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t viewCapacityInput, uint32_t *viewCountOutput, XrViewConfigurationView *views)
 OpenXR API function xrEnumerateViewConfigurationViews. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetOpenGLGraphicsRequirementsKHR (XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsOpenGLKHR *graphicsRequirements)
 OpenXR API function xrGetOpenGLGraphicsRequirementsKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetVulkanInstanceExtensionsKHR (XrInstance instance, XrSystemId systemId, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString)
 OpenXR API function xrGetVulkanInstanceExtensionsKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetVulkanDeviceExtensionsKHR (XrInstance instance, XrSystemId systemId, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString)
 OpenXR API function xrGetVulkanDeviceExtensionsKHR. More...
 
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr (VkInstance instance, const char *pName)
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetVulkanGraphicsDeviceKHR (XrInstance instance, XrSystemId systemId, VkInstance vkInstance, VkPhysicalDevice *vkPhysicalDevice)
 OpenXR API function xrGetVulkanGraphicsDeviceKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetVulkanGraphicsDevice2KHR (XrInstance instance, const XrVulkanGraphicsDeviceGetInfoKHR *getInfo, VkPhysicalDevice *vkPhysicalDevice)
 OpenXR API function xrGetVulkanGraphicsDeviceKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetVulkanGraphicsRequirementsKHR (XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR *graphicsRequirements)
 OpenXR API function xrGetVulkanGraphicsRequirementsKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetVulkanGraphicsRequirements2KHR (XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkan2KHR *graphicsRequirements)
 OpenXR API function xrGetVulkanGraphicsRequirements2KHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrCreateVulkanInstanceKHR (XrInstance instance, const XrVulkanInstanceCreateInfoKHR *createInfo, VkInstance *vulkanInstance, VkResult *vulkanResult)
 OpenXR API function xrCreateVulkanInstanceKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrCreateVulkanDeviceKHR (XrInstance instance, const XrVulkanDeviceCreateInfoKHR *createInfo, VkDevice *vulkanDevice, VkResult *vulkanResult)
 OpenXR API function xrCreateVulkanDeviceKHR. More...
 

Detailed Description

Holds system related entrypoints.

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

Macro Definition Documentation

◆ OXR_VERIFY_SYSTEM_AND_GET

#define OXR_VERIFY_SYSTEM_AND_GET (   log,
  inst,
  sysId,
  system 
)
Value:
struct oxr_system *system = NULL; \
do { \
XrResult ret = oxr_system_get_by_id(log, inst, sysId, &system); \
if (ret != XR_SUCCESS) { \
return ret; \
} \
assert(system != NULL); \
} while (false)
Single or multiple devices grouped together to form a system that sessions can be created from.
Definition: oxr_objects.h:1453

A helper define that verifies the systemId.

◆ OXR_VERIFY_XSYSC

#define OXR_VERIFY_XSYSC (   LOG,
  SYS 
)
Value:
do { \
if ((SYS)->xsysc == NULL) { \
return oxr_error((LOG), XR_ERROR_VALIDATION_FAILURE, \
" Function can not be called when specifically not asking for graphics"); \
} \
} while (false)
XrResult oxr_error(struct oxr_logger *logger, XrResult result, const char *fmt,...)
Definition: oxr_logger.c:203