diff options
| author | Yong He <yonghe@outlook.com> | 2022-02-17 01:15:05 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-17 01:15:05 -0800 |
| commit | e031e0e5fb05d024d56dc70c3dd4ef7111d98ba4 (patch) | |
| tree | 2a01bedb6db98d44fbcf402888595668d3bbb2fc /source/slang/slang.cpp | |
| parent | d4145519dd86f6d18b07393d989141bda4d4ceb3 (diff) | |
Add target option to force `scalar` layout for storage buffers. (#2135)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 - - |
