From e031e0e5fb05d024d56dc70c3dd4ef7111d98ba4 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 17 Feb 2022 01:15:05 -0800 Subject: Add target option to force `scalar` layout for storage buffers. (#2135) Co-authored-by: Yong He --- source/slang/slang.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 3880d1114..c1834eacb 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -899,6 +899,7 @@ void Linkage::addTarget( target->addTargetFlags(desc.flags); target->setTargetProfile(Profile(desc.profile)); target->setLineDirectiveMode(LineDirectiveMode(desc.lineDirectiveMode)); + target->setForceGLSLScalarBufferLayout(desc.forceGLSLScalarBufferLayout); } #if 0 @@ -4187,6 +4188,11 @@ void EndToEndCompileRequest::setTargetFlags(int targetIndex, SlangTargetFlags fl getLinkage()->targets[targetIndex]->addTargetFlags(flags); } +void EndToEndCompileRequest::setTargetForceGLSLScalarBufferLayout(int targetIndex, bool value) +{ + getLinkage()->targets[targetIndex]->setForceGLSLScalarBufferLayout(value); +} + void EndToEndCompileRequest::setTargetFloatingPointMode(int targetIndex, SlangFloatingPointMode mode) { getLinkage()->targets[targetIndex]->setFloatingPointMode(FloatingPointMode(mode)); @@ -4848,5 +4854,3 @@ SlangResult EndToEndCompileRequest::getEntryPoint(SlangInt entryPointIndex, slan } } // namespace Slang - - -- cgit v1.2.3