Monado OpenXR Runtime

File for verifying app input into api functions. More...

#include "xrt/xrt_compiler.h"
#include "math/m_mathinclude.h"
#include "util/u_debug.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_api_verify.h"
#include "oxr_chain.h"
#include "oxr_subaction.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for oxr_verify.c:

Macros

#define HANDLE_SUBACTION_PATH(X)
 
#define GET_PATH(X)
 
#define CHECK_CREATION_TIME(X)
 

Enumerations

enum  verify_state { VERIFY_START , VERIFY_MIDDLE , VERIFY_SLASH , VERIFY_SLASHDOTS }
 

Functions

static bool valid_path_char (const char c)
 
static bool contains_zero (const char *path, uint32_t size)
 
XrResult oxr_verify_fixed_size_single_level_path (struct oxr_logger *log, const char *path, uint32_t array_size, const char *name)
 Verify a single path level that sits inside of a fixed sized array. More...
 
XrResult oxr_verify_localized_name (struct oxr_logger *log, const char *string, uint32_t array_size, const char *name)
 Verify an arbitrary UTF-8 string that sits inside of a fixed sized array. More...
 
XrResult oxr_verify_full_path_c (struct oxr_logger *log, const char *path, const char *name)
 
XrResult oxr_verify_full_path (struct oxr_logger *log, const char *path, size_t length, const char *name)
 Verify a full path. More...
 
static XrResult subaction_path_no_dups (struct oxr_logger *log, struct oxr_instance *inst, struct oxr_subaction_paths *subaction_paths, XrPath path, const char *variable, uint32_t index)
 
XrResult oxr_verify_subaction_paths_create (struct oxr_logger *log, struct oxr_instance *inst, uint32_t countSubactionPaths, const XrPath *subactionPaths, const char *variable)
 Verify a set of subaction paths for action creation. More...
 
XrResult oxr_verify_subaction_path_sync (struct oxr_logger *log, const struct oxr_instance *inst, const struct oxr_action_set *act_set, XrPath path, uint32_t index)
 Verify a set of subaction paths for action sync. More...
 
XrResult oxr_verify_subaction_path_get (struct oxr_logger *log, struct oxr_instance *inst, XrPath path, const struct oxr_subaction_paths *act_subaction_paths, struct oxr_subaction_paths *out_subaction_paths, const char *variable)
 Verify a set of subaction paths for action state get. More...
 
XrResult oxr_verify_extensions (struct oxr_logger *log, const struct oxr_extension_status *extensions)
 
XrResult oxr_verify_view_config_type (struct oxr_logger *log, struct oxr_instance *inst, XrViewConfigurationType view_conf, const char *view_conf_name)
 
XrResult oxr_verify_XrSessionCreateInfo (struct oxr_logger *log, const struct oxr_instance *inst, const XrSessionCreateInfo *createInfo)
 
XrResult oxr_verify_XrGraphicsBindingOpenGLXlibKHR (struct oxr_logger *log, const XrGraphicsBindingOpenGLXlibKHR *next)
 
XrResult oxr_verify_XrGraphicsBindingVulkanKHR (struct oxr_logger *log, const XrGraphicsBindingVulkanKHR *next)
 

Detailed Description

File for verifying app input into api functions.

Author
Rylie Pavlik rylie.nosp@m..pav.nosp@m.lik@c.nosp@m.olla.nosp@m.bora..nosp@m.com
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

◆ CHECK_CREATION_TIME

#define CHECK_CREATION_TIME (   X)
Value:
if (subaction_paths.X && !act_subaction_paths->X) { \
fail = true; \
}

◆ GET_PATH

#define GET_PATH (   X)
Value:
else if (path == inst->path_cache.X) \
{ \
subaction_paths.X = true; \
}

◆ HANDLE_SUBACTION_PATH

#define HANDLE_SUBACTION_PATH (   X)
Value:
if (path == inst->path_cache.X) { \
if (subaction_paths->X) { \
duplicate = true; \
} else { \
subaction_paths->X = true; \
} \
} else