diff options
| author | Yong He <yonghe@outlook.com> | 2021-01-27 10:02:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-27 10:02:44 -0800 |
| commit | 615dfba810964bed1caad8ecb87850c8eb1544b4 (patch) | |
| tree | 3fefe8c801a15213ca16eb947ce305a5ed69c6fa /tools/gfx/d3d12/render-d3d12.cpp | |
| parent | a90c850735664e2928e4cc961442a126c6859b97 (diff) | |
Make own a slang session. (#1678)
Diffstat (limited to 'tools/gfx/d3d12/render-d3d12.cpp')
| -rw-r--r-- | tools/gfx/d3d12/render-d3d12.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index 648fc3052..407f0dbf2 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -1348,7 +1348,10 @@ static bool _isSupportedNVAPIOp(ID3D12Device* dev, uint32_t op) Result D3D12Renderer::initialize(const Desc& desc, void* inWindowHandle) { + SLANG_RETURN_ON_FAIL(slangContext.initialize(desc.slang, SLANG_DXBC, "sm_5_1")); + m_hwnd = (HWND)inWindowHandle; + // Rather than statically link against D3D, we load it dynamically. HMODULE d3dModule = LoadLibraryA("d3d12.dll"); |
