diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-04 15:55:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-04 15:55:06 -0700 |
| commit | 856086cf2ac6fb1544b5b08ffa64b2f01931d35c (patch) | |
| tree | 67f521b4750c01263ce8038cfe6d771b7c3b9cfb /source/slang/slang-options.cpp | |
| parent | a2d90fb275962da84611160f8ddd74d934a68dbd (diff) | |
Add option to use original entrypoint in spirv output. (#3047)
* Add option to use original entrypoint in spirv output.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index e59109b37..b31a502e7 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -93,6 +93,8 @@ enum class OptionKind VulkanBindShift, VulkanBindGlobals, VulkanInvertY, + VulkanUseEntryPointName, + GLSLForceScalarLayout, EnableEffectAnnotations, @@ -498,6 +500,7 @@ void initCommandOptions(CommandOptions& options) { OptionKind::VulkanBindGlobals, "-fvk-bind-globals", "-fvk-bind-globals <N> <descriptor-set>", "Places the $Globals cbuffer at descriptor set <descriptor-set> and binding <N>."}, { 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::EnableEffectAnnotations, "-enable-effect-annotations", nullptr, "Enables support for legacy effect annotation syntax."}, @@ -2016,6 +2019,12 @@ SlangResult OptionsParser::_parse( m_hlslToVulkanLayoutOptions->setInvertY(true); break; } + case OptionKind::VulkanUseEntryPointName: + { + // -fvk-use-entrypoint-name + m_hlslToVulkanLayoutOptions->setUseOriginalEntryPointName(true); + break; + } case OptionKind::Profile: SLANG_RETURN_ON_FAIL(_parseProfile(arg)); break; case OptionKind::Capability: { |
