Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_binding_point_store.c File Reference

Store of generated binding point source paths. More...

#include "oxr_binding_point_store.h"
#include "util/u_hashmap.h"
#include "util/u_misc.h"
#include "../path/oxr_path_store.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for oxr_binding_point_store.c:

Data Structures

struct  oxr_binding_point_store_entry
 Pointer to the binding point for a given unique path. More...
 

Macros

#define OXR_BINDING_POINT_STORE_MAX_UNIQUE_INDEX   10000
 Maximum unique index for a binding point store entry, this just needs to be large enough to fit all of the unique paths for the binding points covering all interaction profiles.
 

Functions

static void free_entry (void *item, void *priv)
 
static bool make_pair_key (XrPath interaction_profile_path, XrPath binding_path, uint64_t *out_key)
 
static XrResult make_unique_path (struct oxr_binding_point_store *store, struct oxr_path_store *path_store, XrPath *out_path)
 
XrResult oxr_binding_point_store_init (struct oxr_binding_point_store *store)
 
void oxr_binding_point_store_fini (struct oxr_binding_point_store *store)
 
XrResult oxr_binding_point_store_add (struct oxr_binding_point_store *store, XrPath interaction_profile_path, XrPath binding_path, struct oxr_path_store *path_store, struct oxr_binding_point *binding_point, XrPath *out_unique_path)
 
bool oxr_binding_point_store_get (const struct oxr_binding_point_store *store, XrPath unique_path, const struct oxr_binding_point **out_binding_point)
 

Detailed Description

Store of generated binding point source paths.

Macro Definition Documentation

◆ OXR_BINDING_POINT_STORE_MAX_UNIQUE_INDEX

#define OXR_BINDING_POINT_STORE_MAX_UNIQUE_INDEX   10000

Maximum unique index for a binding point store entry, this just needs to be large enough to fit all of the unique paths for the binding points covering all interaction profiles.

But also small enough to avoid collisions with the interaction profile path and binding path.