Monado OpenXR Runtime
|
File for negotiating with the loader. More...
#include <stdio.h>
#include <string.h>
#include "xrt/xrt_compiler.h"
#include "xrt/xrt_config_os.h"
#include "util/u_debug.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_api_funcs.h"
#include "oxr_api_verify.h"
Macros | |
#define | PRINT_NEGOTIATE(...) |
#define | ENTRY(funcName) |
Helper define for generating that GetInstanceProcAddr function. More... | |
#define | ENTRY_IF(funcName, extraCondition, message) |
Helper define for generating that GetInstanceProcAddr function for conditionally-available functions. More... | |
#define | ENTRY_IF_EXT(funcName, short_ext_name) ENTRY_IF(funcName, inst->extensions.short_ext_name, "Required extension XR_" #short_ext_name " not enabled") |
Helper define for generating that GetInstanceProcAddr function for extension-provided functions. More... | |
#define | ENTRY_IF_VERSION_AT_LEAST(funcName, major, minor) |
Helper define for generating that GetInstanceProcAddr function for functions that have been promoted to core in some OpenXR version. More... | |
Functions | |
XRAPI_ATTR XrResult XRAPI_CALL | xrNegotiateLoaderRuntimeInterface (const XrNegotiateLoaderInfo *loaderInfo, XrNegotiateRuntimeRequest *runtimeRequest) |
XRAPI_ATTR XrResult XRAPI_CALL | oxr_xrEnumerateApiLayerProperties (uint32_t propertyCapacityInput, uint32_t *propertyCountOutput, XrApiLayerProperties *properties) |
OpenXR API function xrEnumerateApiLayerProperties. More... | |
static XrResult | handle_non_null (struct oxr_instance *inst, struct oxr_logger *log, const char *name, PFN_xrVoidFunction *out_function) |
Handle a non-null instance pointer. More... | |
static XrResult | handle_null (struct oxr_logger *log, const char *name, PFN_xrVoidFunction *out_function) |
Special case a null instance pointer. More... | |
XRAPI_ATTR XrResult XRAPI_CALL | oxr_xrGetInstanceProcAddr (XrInstance instance, const char *name, PFN_xrVoidFunction *function) |
OpenXR API function xrGetInstanceProcAddr. More... | |
File for negotiating with the loader.
#define ENTRY | ( | funcName | ) |
Helper define for generating that GetInstanceProcAddr function.
Use for functions that should be unconditionally available.
#define ENTRY_IF | ( | funcName, | |
extraCondition, | |||
message | |||
) |
Helper define for generating that GetInstanceProcAddr function for conditionally-available functions.
Checks the extra condition to e.g. find out if the extension is enabled
#define ENTRY_IF_EXT | ( | funcName, | |
short_ext_name | |||
) | ENTRY_IF(funcName, inst->extensions.short_ext_name, "Required extension XR_" #short_ext_name " not enabled") |
Helper define for generating that GetInstanceProcAddr function for extension-provided functions.
Wraps ENTRY_IF for the common case.
Pass the function name and the (mixed-case) extension name without the leading XR_.
#define ENTRY_IF_VERSION_AT_LEAST | ( | funcName, | |
major, | |||
minor | |||
) |
Helper define for generating that GetInstanceProcAddr function for functions that have been promoted to core in some OpenXR version.
Wraps ENTRY_IF for the common case.
Pass the function name and the OpenXR version the function has first been available in core.
#define PRINT_NEGOTIATE | ( | ... | ) |
|
static |
Handle a non-null instance pointer.
References ENTRY, ENTRY_IF_EXT, and ENTRY_IF_VERSION_AT_LEAST.
|
static |
Special case a null instance pointer.
References ENTRY, and oxr_error().