diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-03-31 03:48:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-30 12:48:02 -0700 |
| commit | e3b701c9f56f4a2fb8c56a65b5c75b49ee72ca73 (patch) | |
| tree | f40f494a25e839ed84a68b85f3dd3866c978c721 | |
| parent | 72f792858a951821ff266295e018c9472fe02a14 (diff) | |
Enable CUDA render api on unix (#2757)
* Remove extra qualification in cuda device impl
Only MSVC accepts this illegal code
* Enable CUDA render api on unix
---------
Co-authored-by: Yong He <yonghe@outlook.com>
| -rw-r--r-- | source/core/slang-render-api-util.cpp | 6 | ||||
| -rw-r--r-- | tools/gfx/cuda/cuda-device.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/core/slang-render-api-util.cpp b/source/core/slang-render-api-util.cpp index 6c00e72b0..bc15a8164 100644 --- a/source/core/slang-render-api-util.cpp +++ b/source/core/slang-render-api-util.cpp @@ -277,7 +277,7 @@ static bool _canLoadSharedLibrary(const char* libName) default: break; } #elif SLANG_UNIX_FAMILY - // Assume on unix target we have Opengl and Vulkan for now + // Assume on unix target we never have D3D switch (type) { case RenderApiType::OpenGl: @@ -289,6 +289,10 @@ static bool _canLoadSharedLibrary(const char* libName) { return true; } + case RenderApiType::CUDA: + { + return true; + } default: break; } #endif diff --git a/tools/gfx/cuda/cuda-device.h b/tools/gfx/cuda/cuda-device.h index e6a91393b..bfaf1be6e 100644 --- a/tools/gfx/cuda/cuda-device.h +++ b/tools/gfx/cuda/cuda-device.h @@ -86,7 +86,7 @@ public: Result createRootShaderObject(IShaderProgram* program, ShaderObjectBase** outObject); - virtual SLANG_NO_THROW Result SLANG_MCALL DeviceImpl::createProgram( + virtual SLANG_NO_THROW Result SLANG_MCALL createProgram( const IShaderProgram::Desc& desc, IShaderProgram** outProgram, ISlangBlob** outDiagnosticBlob) override; |
