diff options
| author | Simon Kallweit <simon.kallweit@gmail.com> | 2024-05-27 06:03:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 15:03:13 +0200 |
| commit | d9443d670ef8413971fe7c3f02368b60a7fc5904 (patch) | |
| tree | 001e763846b23814b0e4960991fc457d7b580a0f /tools/gfx/render.cpp | |
| parent | 4f1cbf6f4d561320b8e3c73b871cc95dd13c6207 (diff) | |
[gfx] metal backend skeleton (#4223)
* add metal-cpp submodule
* add metal-cpp cmake target
* gfx metal backend skeleton
* add premake support
* add foundation framework
* add metal-cpp include to premake
* update vs project file
---------
Co-authored-by: Simon Kallweit <skallweit@nvidia.com>
Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
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: { |
