diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-20 12:24:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 12:24:00 -0800 |
| commit | 4d20fd329956ac89408b1628a8291fea01bc9a6d (patch) | |
| tree | 8e62d9c1ec05142fd25d0b31073fdb56d44691b0 /tools/gfx/cuda/cuda-shader-object-layout.cpp | |
| parent | 8e9b61e3bac69dbb37a1451b62302e688a017ced (diff) | |
Refactor compiler option representations. (#3598)
* Refactor compiler option representation.
* Fix binary compatibility.
* Add a test for specifying compiler options at link time.
* Fix binary compatibility.
* Fix binary compatibility.
* Fix backward compatibility on matrix layout.
* Fix.
* Fix.
* Fix.
* Fix gfx.
* Fix gfx.
* Fix dynamic dispatch.
* Polish.
Diffstat (limited to 'tools/gfx/cuda/cuda-shader-object-layout.cpp')
| -rw-r--r-- | tools/gfx/cuda/cuda-shader-object-layout.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/gfx/cuda/cuda-shader-object-layout.cpp b/tools/gfx/cuda/cuda-shader-object-layout.cpp index eacae0fc0..f527d78de 100644 --- a/tools/gfx/cuda/cuda-shader-object-layout.cpp +++ b/tools/gfx/cuda/cuda-shader-object-layout.cpp @@ -9,11 +9,11 @@ using namespace Slang; namespace cuda { -ShaderObjectLayoutImpl::ShaderObjectLayoutImpl(RendererBase* renderer, slang::TypeLayoutReflection* layout) +ShaderObjectLayoutImpl::ShaderObjectLayoutImpl(RendererBase* renderer, slang::ISession* session, slang::TypeLayoutReflection* layout) { m_elementTypeLayout = _unwrapParameterGroups(layout, m_containerType); - initBase(renderer, m_elementTypeLayout); + initBase(renderer, session, m_elementTypeLayout); // Compute the binding ranges that are used to store // the logical contents of the object in memory. These will relate @@ -101,7 +101,7 @@ ShaderObjectLayoutImpl::ShaderObjectLayoutImpl(RendererBase* renderer, slang::Ty if (slangBindingType != slang::BindingType::ExistentialValue) { subObjectLayout = - new ShaderObjectLayoutImpl(renderer, slangLeafTypeLayout->getElementTypeLayout()); + new ShaderObjectLayoutImpl(renderer, session, slangLeafTypeLayout->getElementTypeLayout()); } SubObjectRangeInfo subObjectRange; @@ -118,13 +118,14 @@ BindingRangeInfo ShaderObjectLayoutImpl::getBindingRange(Index index) { return m Index ShaderObjectLayoutImpl::getBindingRangeCount() const { return m_bindingRanges.getCount(); } RootShaderObjectLayoutImpl::RootShaderObjectLayoutImpl(RendererBase* renderer, slang::ProgramLayout* inProgramLayout) - : ShaderObjectLayoutImpl(renderer, inProgramLayout->getGlobalParamsTypeLayout()) + : ShaderObjectLayoutImpl(renderer, inProgramLayout->getSession(), inProgramLayout->getGlobalParamsTypeLayout()) , programLayout(inProgramLayout) { for (UInt i = 0; i < programLayout->getEntryPointCount(); i++) { entryPointLayouts.add(new ShaderObjectLayoutImpl( renderer, + programLayout->getSession(), programLayout->getEntryPointByIndex(i)->getTypeLayout())); } |
