godot/thirdparty/openxr/src/loader/loader_logger.hpp

// Copyright (c) 2017-2024, The Khronos Group Inc.
// Copyright (c) 2017-2019 Valve Corporation
// Copyright (c) 2017-2019 LunarG, Inc.
//
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Initial Author: Mark Young <[email protected]>
//

#pragma once

#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <set>
#include <map>
#include <shared_mutex>

#include <openxr/openxr.h>

#include "hex_and_handles.h"
#include "object_info.h"

// Use internal versions of flags similar to XR_EXT_debug_utils so that
// we're not tightly coupled to that extension.  This way, if the extension
// changes or gets replaced, we can be flexible in the loader.
#define XR_LOADER_LOG_MESSAGE_SEVERITY_VERBOSE_BIT
#define XR_LOADER_LOG_MESSAGE_SEVERITY_INFO_BIT
#define XR_LOADER_LOG_MESSAGE_SEVERITY_WARNING_BIT
#define XR_LOADER_LOG_MESSAGE_SEVERITY_ERROR_BIT
#define XR_LOADER_LOG_MESSAGE_SEVERITY_DEFAULT_BITS
XrLoaderLogMessageSeverityFlagBits;
XrLoaderLogMessageSeverityFlags;

#define XR_LOADER_LOG_MESSAGE_TYPE_GENERAL_BIT
#define XR_LOADER_LOG_MESSAGE_TYPE_SPECIFICATION_BIT
#define XR_LOADER_LOG_MESSAGE_TYPE_PERFORMANCE_BIT
#define XR_LOADER_LOG_MESSAGE_TYPE_DEFAULT_BITS
XrLoaderLogMessageTypeFlagBits;
XrLoaderLogMessageTypeFlags;

struct XrLoaderLogMessengerCallbackData {};

enum XrLoaderLogType {};

class LoaderLogRecorder {};

class LoaderLogger {};

// Utility functions for converting to/from XR_EXT_debug_utils values
XrLoaderLogMessageSeverityFlags DebugUtilsSeveritiesToLoaderLogMessageSeverities(
    XrDebugUtilsMessageSeverityFlagsEXT utils_severities);
XrDebugUtilsMessageSeverityFlagsEXT LoaderLogMessageSeveritiesToDebugUtilsMessageSeverities(
    XrLoaderLogMessageSeverityFlags log_severities);
XrLoaderLogMessageTypeFlagBits DebugUtilsMessageTypesToLoaderLogMessageTypes(XrDebugUtilsMessageTypeFlagsEXT utils_types);
XrDebugUtilsMessageTypeFlagsEXT LoaderLogMessageTypesToDebugUtilsMessageTypes(XrLoaderLogMessageTypeFlagBits log_types);