summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-hlsl-to-vulkan-layout-options.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-08-04 15:55:06 -0700
committerGitHub <noreply@github.com>2023-08-04 15:55:06 -0700
commit856086cf2ac6fb1544b5b08ffa64b2f01931d35c (patch)
tree67f521b4750c01263ce8038cfe6d771b7c3b9cfb /source/slang/slang-hlsl-to-vulkan-layout-options.h
parenta2d90fb275962da84611160f8ddd74d934a68dbd (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-hlsl-to-vulkan-layout-options.h')
-rw-r--r--source/slang/slang-hlsl-to-vulkan-layout-options.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-hlsl-to-vulkan-layout-options.h b/source/slang/slang-hlsl-to-vulkan-layout-options.h
index 4ae169d90..2d24dfccb 100644
--- a/source/slang/slang-hlsl-to-vulkan-layout-options.h
+++ b/source/slang/slang-hlsl-to-vulkan-layout-options.h
@@ -119,6 +119,8 @@ public:
/// True if the compiler should invert the Y coordinate of any SV_Position output.
bool shouldInvertY() const { return m_invertY; }
+ bool getUseOriginalEntryPointName() const { return m_useOriginalEntryPointName; }
+
/// Given an kind and a binding infer the vulkan binding.
/// Will return an invalid binding if one is not found
Binding inferBinding(Kind kind, const Binding& inBinding) const;
@@ -145,6 +147,8 @@ public:
void setInvertY(bool value) { m_invertY = value; }
+ void setUseOriginalEntryPointName(bool value) { m_useOriginalEntryPointName = value; }
+
/// Ctor
HLSLToVulkanLayoutOptions();
@@ -171,6 +175,9 @@ protected:
/// Whether to invert the Y coordinate of SV_Position output.
bool m_invertY = false;
+
+ /// If set, will use the original entry point name in the generated SPIRV instead of "main".
+ bool m_useOriginalEntryPointName = false;
};
} // namespace Slang