From 7c7fbd572874bdbb3e6f965da3abb918013e1ac8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 11 Mar 2024 14:52:16 -0700 Subject: Add `-fvk-use-dx-position-w` and fix ExecutionMode ordering for geometry shaders. (#3731) * Add `-fvk-use-dx-position-w`. * Fix ordering of OutputVertices and output primitive type decoration in spirv. * Fix. * fix * Fix. * Move test around. --- source/slang/slang-options.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-options.cpp') diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 42eb66517..3d0b22edd 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -399,6 +399,7 @@ void initCommandOptions(CommandOptions& options) { OptionKind::VulkanBindGlobals, "-fvk-bind-globals", "-fvk-bind-globals ", "Places the $Globals cbuffer at descriptor set and binding ."}, { OptionKind::VulkanInvertY, "-fvk-invert-y", nullptr, "Negates (additively inverts) SV_Position.y before writing to stage output."}, + { OptionKind::VulkanUseDxPositionW, "-fvk-use-dx-position-w", nullptr, "Reciprocates (multiplicatively inverts) SV_Position.w after reading from stage input. For use in fragment shaders only."}, { 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."}, @@ -1681,6 +1682,7 @@ SlangResult OptionsParser::_parse( case OptionKind::ValidateIr: case OptionKind::DumpIr: case OptionKind::VulkanInvertY: + case OptionKind::VulkanUseDxPositionW: case OptionKind::VulkanUseEntryPointName: case OptionKind::VulkanUseGLLayout: case OptionKind::VulkanEmitReflection: -- cgit v1.2.3