diff options
| author | Yong He <yonghe@outlook.com> | 2022-02-09 15:30:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-09 15:30:38 -0800 |
| commit | b8982fcf43b86c1e39dcc3dd19bff2821633eda6 (patch) | |
| tree | 0d66dbf46b50e760cce4aee232bd6a020976e6fb /tools/gfx/cpu/render-cpu.cpp | |
| parent | 59f3fdc0a372d19ce4e989514ee3e9ecbcbf234c (diff) | |
Various fixes to gfx. (#2120)
* Various fixes to gfx.
* Fix.
* Fixes.
* Fix.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/cpu/render-cpu.cpp')
| -rw-r--r-- | tools/gfx/cpu/render-cpu.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tools/gfx/cpu/render-cpu.cpp b/tools/gfx/cpu/render-cpu.cpp index 38b72e28b..a20ed3ebe 100644 --- a/tools/gfx/cpu/render-cpu.cpp +++ b/tools/gfx/cpu/render-cpu.cpp @@ -1091,7 +1091,7 @@ private: ComPtr<ISlangSharedLibrary> sharedLibrary; ComPtr<ISlangBlob> diagnostics; - auto compileResult = program->slangProgram->getEntryPointHostCallable( + auto compileResult = program->slangGlobalScope->getEntryPointHostCallable( entryPointIndex, targetIndex, sharedLibrary.writeRef(), diagnostics.writeRef()); if (diagnostics) { @@ -1205,7 +1205,10 @@ public: } virtual SLANG_NO_THROW Result SLANG_MCALL createBufferView( - IBufferResource* inBuffer, IResourceView::Desc const& desc, IResourceView** outView) override + IBufferResource* inBuffer, + IBufferResource* counterBuffer, + IResourceView::Desc const& desc, + IResourceView** outView) override { auto buffer = static_cast<CPUBufferResource*>(inBuffer); RefPtr<CPUBufferView> view = new CPUBufferView(desc, buffer); @@ -1266,15 +1269,11 @@ public: ISlangBlob** outDiagnosticBlob) override { RefPtr<CPUShaderProgram> cpuProgram = new CPUShaderProgram(); - - // TODO: stuff? - - auto slangProgram = desc.slangProgram; - if( slangProgram ) + cpuProgram->init(desc); + auto slangGlobalScope = cpuProgram->linkedProgram; + if( slangGlobalScope ) { - cpuProgram->slangProgram = slangProgram; - - auto slangProgramLayout = slangProgram->getLayout(); + auto slangProgramLayout = slangGlobalScope->getLayout(); if(!slangProgramLayout) return SLANG_FAIL; |
