Add Vulkan support on Switch
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user