diff options
Diffstat (limited to 'tools/gfx/render.cpp')
| -rw-r--r-- | tools/gfx/render.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/gfx/render.cpp b/tools/gfx/render.cpp index 68f81fba5..f6e32fef8 100644 --- a/tools/gfx/render.cpp +++ b/tools/gfx/render.cpp @@ -13,6 +13,7 @@ using namespace Slang; Result SLANG_MCALL createD3D11Device(const IDevice::Desc* desc, IDevice** outDevice); Result SLANG_MCALL createD3D12Device(const IDevice::Desc* desc, IDevice** outDevice); Result SLANG_MCALL createVKDevice(const IDevice::Desc* desc, IDevice** outDevice); +Result SLANG_MCALL createMetalDevice(const IDevice::Desc* desc, IDevice** outDevice); Result SLANG_MCALL createCUDADevice(const IDevice::Desc* desc, IDevice** outDevice); Result SLANG_MCALL createCPUDevice(const IDevice::Desc* desc, IDevice** outDevice); @@ -328,7 +329,17 @@ extern "C" return SLANG_FAIL; } break; -#elif (SLANG_LINUX_FAMILY || SLANG_APPLE_FAMILY) && !defined(__CYGWIN__) +#elif SLANG_APPLE_FAMILY + case DeviceType::Default: + case DeviceType::Metal: + { + return createMetalDevice(desc, outDevice); + } + case DeviceType::Vulkan: + { + return createVKDevice(desc, outDevice); + } +#elif SLANG_LINUX_FAMILY && !defined(__CYGWIN__) case DeviceType::Default: case DeviceType::Vulkan: { |
