diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-08 13:54:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-08 13:54:05 -0700 |
| commit | ea1f1653896163d0f3aadc35f7fedf3d8102a71b (patch) | |
| tree | 115ba46ed1ecb4804258af176338594f044087c2 /source/slang/slang-options.cpp | |
| parent | 0b2d7533d475a4853a9c8fbc14537a1a8ec2c3f6 (diff) | |
Support `-fvk-use-gl-layout` for ByteAddressBuffer load/store. (#3068)
* Support `-fvk-use-gl-layout` for ByteAddressBuffer load/store.
* Fix.
* Fix.
* Add test for unaligned load.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index b31a502e7..dbd6b97a4 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -94,6 +94,7 @@ enum class OptionKind VulkanBindGlobals, VulkanInvertY, VulkanUseEntryPointName, + VulkanUseGLLayout, GLSLForceScalarLayout, @@ -501,6 +502,7 @@ void initCommandOptions(CommandOptions& options) "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::VulkanUseGLLayout, "-fvk-use-gl-layout", nullptr, "Use std430 layout instead of D3D buffer layout for raw buffer load/stores."}, { OptionKind::EnableEffectAnnotations, "-enable-effect-annotations", nullptr, "Enables support for legacy effect annotation syntax."}, @@ -2025,6 +2027,12 @@ SlangResult OptionsParser::_parse( m_hlslToVulkanLayoutOptions->setUseOriginalEntryPointName(true); break; } + case OptionKind::VulkanUseGLLayout: + { + // -fvk-use-gl-layout + m_hlslToVulkanLayoutOptions->setUseGLLayout(true); + break; + } case OptionKind::Profile: SLANG_RETURN_ON_FAIL(_parseProfile(arg)); break; case OptionKind::Capability: { |
