1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00
OpenDX/src/dxvk/dxvk_openxr.h

75 lines
1.4 KiB
C
Raw Normal View History

#pragma once
#include <mutex>
#include <vector>
#include "dxvk_extension_provider.h"
#ifdef __WINE__
using SoHandle = void*;
#else
using SoHandle = HMODULE;
#endif
namespace dxvk {
class DxvkInstance;
/**
* \brief OpenXR instance
*
* Loads OpenXR to provide access to Vulkan extension queries.
*/
class DxvkXrProvider : public DxvkExtensionProvider {
public:
DxvkXrProvider();
~DxvkXrProvider();
std::string_view getName();
DxvkNameSet getInstanceExtensions();
DxvkNameSet getDeviceExtensions(
uint32_t adapterId);
void initInstanceExtensions();
void initDeviceExtensions(
const DxvkInstance* instance);
static DxvkXrProvider s_instance;
private:
2021-06-28 19:19:29 +02:00
dxvk::mutex m_mutex;
SoHandle m_wineOxr = nullptr;
bool m_loadedOxrApi = false;
bool m_initializedInsExt = false;
bool m_initializedDevExt = false;
DxvkNameSet m_insExtensions;
DxvkNameSet m_devExtensions;
DxvkNameSet queryInstanceExtensions() const;
DxvkNameSet queryDeviceExtensions() const;
DxvkNameSet parseExtensionList(
const std::string& str) const;
bool loadFunctions();
void shutdown();
SoHandle loadLibrary();
void freeLibrary();
void* getSym(const char* sym);
};
}