Monado OpenXR Runtime
oxr_api_instance.c File Reference

Holds instance related entrypoints. More...

#include "xrt/xrt_compiler.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_extension_support.h"
#include "oxr_chain.h"
#include "oxr_api_funcs.h"
#include "oxr_api_verify.h"
#include "openxr/openxr.h"
#include "openxr/openxr_reflection.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for oxr_api_instance.c:

Macros

#define MAKE_EXTENSION_PROPERTIES(mixed_case, all_caps)    {XR_TYPE_EXTENSION_PROPERTIES, NULL, XR_##all_caps##_EXTENSION_NAME, XR_##mixed_case##_SPEC_VERSION},
 
#define CHECK_EXT_NAME(mixed_case, all_caps)
 
#define MAKE_RESULT_CASE(VAL, _)    case VAL: snprintf(buffer, XR_MAX_RESULT_STRING_SIZE, #VAL); break;
 
#define MAKE_TYPE_CASE(VAL, _)    case VAL: snprintf(buffer, XR_MAX_RESULT_STRING_SIZE, #VAL); break;
 

Functions

XRAPI_ATTR XrResult XRAPI_CALL oxr_xrEnumerateInstanceExtensionProperties (const char *layerName, uint32_t propertyCapacityInput, uint32_t *propertyCountOutput, XrExtensionProperties *properties)
 OpenXR API function xrEnumerateInstanceExtensionProperties. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrCreateInstance (const XrInstanceCreateInfo *createInfo, XrInstance *out_instance)
 OpenXR API function xrCreateInstance. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrDestroyInstance (XrInstance instance)
 OpenXR API function xrDestroyInstance. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrGetInstanceProperties (XrInstance instance, XrInstanceProperties *instanceProperties)
 OpenXR API function xrGetInstanceProperties. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrPollEvent (XrInstance instance, XrEventDataBuffer *eventData)
 OpenXR API function xrPollEvent. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrResultToString (XrInstance instance, XrResult value, char buffer[XR_MAX_RESULT_STRING_SIZE])
 OpenXR API function xrResultToString. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrStructureTypeToString (XrInstance instance, XrStructureType value, char buffer[XR_MAX_STRUCTURE_NAME_SIZE])
 OpenXR API function xrStructureTypeToString. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrStringToPath (XrInstance instance, const char *pathString, XrPath *out_path)
 OpenXR API function xrStringToPath. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrPathToString (XrInstance instance, XrPath path, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer)
 OpenXR API function xrPathToString. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrConvertTimespecTimeToTimeKHR (XrInstance instance, const struct timespec *timespecTime, XrTime *time)
 OpenXR API function xrConvertTimespecTimeToTimeKHR. More...
 
XRAPI_ATTR XrResult XRAPI_CALL oxr_xrConvertTimeToTimespecTimeKHR (XrInstance instance, XrTime time, struct timespec *timespecTime)
 OpenXR API function xrConvertTimeToTimespecTimeKHR. More...
 

Variables

static const XrExtensionProperties extension_properties [] = { {XR_TYPE_EXTENSION_PROPERTIES, NULL, XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME, XR_KHR_convert_timespec_time_SPEC_VERSION}, {XR_TYPE_EXTENSION_PROPERTIES, NULL, XR_KHR_OPENGL_ENABLE_EXTENSION_NAME, XR_KHR_opengl_enable_SPEC_VERSION}, {XR_TYPE_EXTENSION_PROPERTIES, NULL, XR_KHR_VULKAN_ENABLE_EXTENSION_NAME, XR_KHR_vulkan_enable_SPEC_VERSION}, }
 

Detailed Description

Holds instance related entrypoints.

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

Macro Definition Documentation

◆ CHECK_EXT_NAME

#define CHECK_EXT_NAME (   mixed_case,
  all_caps 
)
Value:
if (strcmp(createInfo->enabledExtensionNames[i], XR_##all_caps##_EXTENSION_NAME) == 0) { \
extensions.mixed_case = true; \
continue; \
}