diff options
| author | Yong He <yonghe@outlook.com> | 2021-06-04 14:32:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-04 14:32:22 -0700 |
| commit | 95a90d7fda3097d085cde1fea5213667277e729b (patch) | |
| tree | 54558aabdaaa27b2298a214781e13218cc3881e9 /tools/gfx/d3d12/render-d3d12.cpp | |
| parent | bf068b17406a202ae3112f5617bbb4da595c9ae9 (diff) | |
Fix D3D11 `uploadBufferResource`. (#1869)
Diffstat (limited to 'tools/gfx/d3d12/render-d3d12.cpp')
| -rw-r--r-- | tools/gfx/d3d12/render-d3d12.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index 8b5721cda..427e98125 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -4254,7 +4254,11 @@ static bool _isSupportedNVAPIOp(ID3D12Device* dev, uint32_t op) Result D3D12Device::initialize(const Desc& desc) { - SLANG_RETURN_ON_FAIL(slangContext.initialize(desc.slang, SLANG_DXBC, "sm_5_1")); + SLANG_RETURN_ON_FAIL(slangContext.initialize( + desc.slang, + SLANG_DXBC, + "sm_5_1", + makeArray(slang::PreprocessorMacroDesc{ "__D3D12__", "1" }).getView())); SLANG_RETURN_ON_FAIL(RendererBase::initialize(desc)); |
