summaryrefslogtreecommitdiffstats
path: root/source/core/slang-render-api-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-render-api-util.cpp')
-rw-r--r--source/core/slang-render-api-util.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/core/slang-render-api-util.cpp b/source/core/slang-render-api-util.cpp
index a9339c14e..960537a0b 100644
--- a/source/core/slang-render-api-util.cpp
+++ b/source/core/slang-render-api-util.cpp
@@ -18,6 +18,7 @@ namespace Slang {
{ RenderApiType::D3D12, "dx12,d3d12", ""},
{ RenderApiType::D3D11, "dx11,d3d11", "hlsl,hlsl-rewrite,slang"},
{ RenderApiType::CPU, "cpu", ""},
+ { RenderApiType::CUDA, "cuda", "cuda,ptx"},
};
static int _calcAvailableApis()
@@ -268,6 +269,11 @@ static bool _canLoadSharedLibrary(const char* libName)
case RenderApiType::D3D11: return _canLoadSharedLibrary("d3d11");
case RenderApiType::D3D12: return _canLoadSharedLibrary("d3d12");
case RenderApiType::CPU: return true;
+ case RenderApiType::CUDA:
+ {
+ // We'll assume it's available, and if not trying to create it will detect it
+ return true;
+ }
default: break;
}
#elif SLANG_UNIX_FAMILY