Build: Make OpenGL/Vulkan renderers optional

And disabled on Windows/arm64.
This commit is contained in:
Connor McLaughlin
2022-07-31 01:06:40 +10:00
parent cb127b6412
commit a899ca88f2
20 changed files with 396 additions and 173 deletions

View File

@ -358,10 +358,16 @@ struct Settings
static const char* GetMultitapModeDisplayName(MultitapMode mode);
// Default to D3D11 on Windows as it's more performant and at this point, less buggy.
#ifdef _WIN32
#if defined(_WIN32) && defined(_M_ARM64)
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareD3D12;
#elif defined(_WIN32)
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareD3D11;
#else
#elif defined(WITH_OPENGL)
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareOpenGL;
#elif defined(WITH_VULKAN)
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::HardwareVulkan;
#else
static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::Software;
#endif
static constexpr GPUTextureFilter DEFAULT_GPU_TEXTURE_FILTER = GPUTextureFilter::Nearest;
static constexpr GPUDownsampleMode DEFAULT_GPU_DOWNSAMPLE_MODE = GPUDownsampleMode::Disabled;