Move VulkanRenderDriver::_pick_device to RenderDevice::choose_device

This commit is contained in:
2025-03-27 15:07:24 +10:00
parent add724db70
commit 4e47c97539
5 changed files with 49 additions and 36 deletions

View File

@@ -10,9 +10,10 @@
#include <nova/types.h>
#include <string>
#include <vector>
namespace Nova {
struct NOVA_API RenderDevice {
struct RenderDevice {
static constexpr u32 AUTO = static_cast<u32>(-1);
enum class Vendor { UNKNOWN = 0, INTEL = 0x8086, AMD = 0x1002, NVIDIA = 0x10de };
enum class Type { OTHER = 0, INTEGRATED = 1, DISCRETE = 2, VIRTUAL = 3, CPU = 4 };
@@ -22,5 +23,7 @@ namespace Nova {
Type type;
u32 deviceID;
void* handle;
NOVA_API static u32 choose_device(const std::vector<RenderDevice>& devices);
};
} // namespace Nova