summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 7c442a9d2..c9527bf5e 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -95,6 +95,7 @@ enum class OptionKind
VulkanInvertY,
VulkanUseEntryPointName,
VulkanUseGLLayout,
+ VulkanEmitReflection,
GLSLForceScalarLayout,
EnableEffectAnnotations,
@@ -512,6 +513,7 @@ void initCommandOptions(CommandOptions& options)
{ OptionKind::VulkanInvertY, "-fvk-invert-y", nullptr, "Negates (additively inverts) SV_Position.y before writing to stage output."},
{ OptionKind::VulkanUseEntryPointName, "-fvk-use-entrypoint-name", nullptr, "Uses the entrypoint name from the source instead of 'main' in the spirv output."},
{ OptionKind::VulkanUseGLLayout, "-fvk-use-gl-layout", nullptr, "Use std430 layout instead of D3D buffer layout for raw buffer load/stores."},
+ { OptionKind::VulkanEmitReflection, "-fspv-reflect", nullptr, "Include reflection decorations in the resulting SPIRV for shader parameters."},
{ OptionKind::EnableEffectAnnotations,
"-enable-effect-annotations", nullptr,
"Enables support for legacy effect annotation syntax."},
@@ -2100,6 +2102,12 @@ SlangResult OptionsParser::_parse(
m_hlslToVulkanLayoutOptions->setUseGLLayout(true);
break;
}
+ case OptionKind::VulkanEmitReflection:
+ {
+ // -fvk-invert-y
+ m_hlslToVulkanLayoutOptions->setEmitSPIRVReflectionInfo(true);
+ break;
+ }
case OptionKind::Profile: SLANG_RETURN_ON_FAIL(_parseProfile(arg)); break;
case OptionKind::Capability:
{