Monado OpenXR Runtime
oxr_instance.c File Reference

Holds instance related functions. More...

#include "bindings/b_generated_bindings.h"
#include "xrt/xrt_config_os.h"
#include "xrt/xrt_config_build.h"
#include "xrt/xrt_instance.h"
#include "math/m_mathinclude.h"
#include "util/u_var.h"
#include "util/u_time.h"
#include "util/u_misc.h"
#include "util/u_debug.h"
#include "util/u_git_tag.h"
#include "util/u_builders.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_handle.h"
#include "oxr_extension_support.h"
#include "oxr_subaction.h"
#include "oxr_chain.h"
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for oxr_instance.c:

Macros

#define D(INDEX)   (roles.INDEX < 0 ? NULL : sys->xsysd->xdevs[roles.INDEX])
 
#define P(XDEV)   (XDEV != NULL ? XDEV->str : "<none>")
 
#define CACHE_SUBACTION_PATHS(NAME, NAME_CAPS, PATH)   cache_path(log, inst, PATH, &inst->path_cache.NAME);
 

Functions

static XrResult oxr_instance_destroy (struct oxr_logger *log, struct oxr_handle_base *hb)
 
static void cache_path (struct oxr_logger *log, struct oxr_instance *inst, const char *str, XrPath *out_path)
 
static bool starts_with (const char *with, const char *string)
 
static void debug_print_devices (struct oxr_logger *log, struct oxr_system *sys)
 
static void detect_engine (struct oxr_logger *log, struct oxr_instance *inst, const XrInstanceCreateInfo *createInfo)
 
static void apply_quirks (struct oxr_logger *log, struct oxr_instance *inst)
 
XrResult oxr_instance_create (struct oxr_logger *log, const XrInstanceCreateInfo *createInfo, XrVersion major_minor, const struct oxr_extension_status *extensions, struct oxr_instance **out_instance)
 
XrResult oxr_instance_get_properties (struct oxr_logger *log, struct oxr_instance *inst, XrInstanceProperties *instanceProperties)
 
XrResult oxr_instance_convert_time_to_timespec (struct oxr_logger *log, struct oxr_instance *inst, XrTime time, struct timespec *timespecTime)
 
XrResult oxr_instance_convert_timespec_to_time (struct oxr_logger *log, struct oxr_instance *inst, const struct timespec *timespecTime, XrTime *time)
 

Detailed Description

Function Documentation

◆ oxr_instance_create()

XrResult oxr_instance_create ( struct oxr_logger log,
const XrInstanceCreateInfo *  createInfo,
XrVersion  major_minor,
const struct oxr_extension_status extensions,
struct oxr_instance **  out_instance 
)
Todo:
check if this (and other creates) failed?