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.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/core/slang-render-api-util.cpp b/source/core/slang-render-api-util.cpp
index d8bcaf396..a9339c14e 100644
--- a/source/core/slang-render-api-util.cpp
+++ b/source/core/slang-render-api-util.cpp
@@ -17,6 +17,7 @@ namespace Slang {
{ RenderApiType::Vulkan, "vk,vulkan", ""},
{ RenderApiType::D3D12, "dx12,d3d12", ""},
{ RenderApiType::D3D11, "dx11,d3d11", "hlsl,hlsl-rewrite,slang"},
+ { RenderApiType::CPU, "cpu", ""},
};
static int _calcAvailableApis()
@@ -265,7 +266,8 @@ static bool _canLoadSharedLibrary(const char* libName)
case RenderApiType::OpenGl: return _canLoadSharedLibrary("opengl32");
case RenderApiType::Vulkan: return _canLoadSharedLibrary("vulkan-1");
case RenderApiType::D3D11: return _canLoadSharedLibrary("d3d11");
- case RenderApiType::D3D12: return _canLoadSharedLibrary("d3d12");
+ case RenderApiType::D3D12: return _canLoadSharedLibrary("d3d12");
+ case RenderApiType::CPU: return true;
default: break;
}
#elif SLANG_UNIX_FAMILY
@@ -277,6 +279,10 @@ static bool _canLoadSharedLibrary(const char* libName)
{
return true;
}
+ case RenderApiType::CPU:
+ {
+ return true;
+ }
default: break;
}
#endif