From 4d20fd329956ac89408b1628a8291fea01bc9a6d Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 20 Feb 2024 12:24:00 -0800 Subject: 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. --- tools/gfx/cuda/cuda-shader-object-layout.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tools/gfx/cuda/cuda-shader-object-layout.cpp') 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())); } -- cgit v1.2.3