summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-02-17 01:15:05 -0800
committerGitHub <noreply@github.com>2022-02-17 01:15:05 -0800
commite031e0e5fb05d024d56dc70c3dd4ef7111d98ba4 (patch)
tree2a01bedb6db98d44fbcf402888595668d3bbb2fc /source/slang/slang-compiler.h
parentd4145519dd86f6d18b07393d989141bda4d4ceb3 (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-compiler.h')
-rwxr-xr-xsource/slang/slang-compiler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.h b/source/slang/slang-compiler.h
index a97ec54d8..d73a03b42 100755
--- a/source/slang/slang-compiler.h
+++ b/source/slang/slang-compiler.h
@@ -1461,6 +1461,11 @@ namespace Slang
{
dumpIntermediates = value;
}
+ void setForceGLSLScalarBufferLayout(bool value)
+ {
+ forceGLSLScalarBufferLayout = value;
+ }
+
void addCapability(CapabilityAtom capability);
bool shouldEmitSPIRVDirectly()
@@ -1482,6 +1487,7 @@ namespace Slang
LineDirectiveMode getLineDirectiveMode() { return lineDirectiveMode; }
SlangTargetFlags getTargetFlags() { return targetFlags; }
CapabilitySet getTargetCaps();
+ bool getForceGLSLScalarBufferLayout() { return forceGLSLScalarBufferLayout; }
Session* getSession();
MatrixLayoutMode getDefaultMatrixLayoutMode();
@@ -1503,6 +1509,7 @@ namespace Slang
CapabilitySet cookedCapabilities;
LineDirectiveMode lineDirectiveMode = LineDirectiveMode::Default;
bool dumpIntermediates = false;
+ bool forceGLSLScalarBufferLayout = false;
};
/// Are we generating code for a D3D API?
@@ -2243,6 +2250,7 @@ namespace Slang
virtual SLANG_NO_THROW void SLANG_MCALL setTargetFlags(int targetIndex, SlangTargetFlags flags) SLANG_OVERRIDE;
virtual SLANG_NO_THROW void SLANG_MCALL setTargetFloatingPointMode(int targetIndex, SlangFloatingPointMode mode) SLANG_OVERRIDE;
virtual SLANG_NO_THROW void SLANG_MCALL setTargetMatrixLayoutMode(int targetIndex, SlangMatrixLayoutMode mode) SLANG_OVERRIDE;
+ virtual SLANG_NO_THROW void SLANG_MCALL setTargetForceGLSLScalarBufferLayout(int targetIndex, bool value) SLANG_OVERRIDE;
virtual SLANG_NO_THROW void SLANG_MCALL setMatrixLayoutMode(SlangMatrixLayoutMode mode) SLANG_OVERRIDE;
virtual SLANG_NO_THROW void SLANG_MCALL setDebugInfoLevel(SlangDebugInfoLevel level) SLANG_OVERRIDE;
virtual SLANG_NO_THROW void SLANG_MCALL setOptimizationLevel(SlangOptimizationLevel level) SLANG_OVERRIDE;