Add Vulkan support on Switch

This commit is contained in:
Wojtek Figat
2021-03-15 15:47:54 +01:00
parent c930d32b2b
commit 3fb0b56c10
8 changed files with 60 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ public class Graphics : EngineModule
options.PrivateDependencies.Add("GraphicsDeviceVulkan");
break;
case TargetPlatform.Switch:
options.PrivateDependencies.Add("GraphicsDeviceNull"); // TODO: use Vulkan on Switch
options.PrivateDependencies.Add("GraphicsDeviceVulkan");
break;
default: throw new InvalidPlatformException(options.Platform.Target);
}

View File

@@ -171,6 +171,14 @@ bool GraphicsService::Init()
device = CreateGPUDeviceVulkan();
#endif
#elif PLATFORM_SWITCH
// Switch
#if GRAPHICS_API_VULKAN
if (!device)
device = CreateGPUDeviceVulkan();
#endif
#elif !defined(GRAPHICS_API_NULL)
#error "Platform does not support GPU devices."