diff options
Diffstat (limited to 'src/libs/dxvk-native-1.9.2a/src/dxvk/dxvk_device_filter.h')
-rw-r--r-- | src/libs/dxvk-native-1.9.2a/src/dxvk/dxvk_device_filter.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/libs/dxvk-native-1.9.2a/src/dxvk/dxvk_device_filter.h b/src/libs/dxvk-native-1.9.2a/src/dxvk/dxvk_device_filter.h new file mode 100644 index 00000000..7b411e6a --- /dev/null +++ b/src/libs/dxvk-native-1.9.2a/src/dxvk/dxvk_device_filter.h @@ -0,0 +1,54 @@ +#pragma once + +#include "dxvk_adapter.h" + +namespace dxvk { + + /** + * \brief Device filter flags + * + * The device filter flags specify which device + * properties are considered when testing adapters. + * If no flags are set, all devices pass the test. + */ + enum class DxvkDeviceFilterFlag { + MatchDeviceName = 0, + SkipCpuDevices = 1, + }; + + using DxvkDeviceFilterFlags = Flags<DxvkDeviceFilterFlag>; + + + /** + * \brief DXVK device filter + * + * Used to select specific Vulkan devices to use + * with DXVK. This may be useful for games which + * do not offer an option to select the correct + * device. + */ + class DxvkDeviceFilter { + + public: + + DxvkDeviceFilter(DxvkDeviceFilterFlags flags); + ~DxvkDeviceFilter(); + + /** + * \brief Tests an adapter + * + * \param [in] properties Adapter properties + * \returns \c true if the test passes + */ + bool testAdapter( + const VkPhysicalDeviceProperties& properties) const; + + private: + + DxvkDeviceFilterFlags m_flags; + + std::string m_matchDeviceName; + + }; + +}
\ No newline at end of file |