From 138a44ef272841cb555fa0eb5c49cc889bf1d64a Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Sat, 15 Jul 2023 01:40:11 -0400 Subject: Fix vk-shift-* mapping issue (#2993) * Fix vk-shift-* mappings. * Add some doc info about vk-shift. * Fix diagnostic test. --- source/slang/slang-options.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-options.cpp') diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 552d5bc47..dd4473497 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -484,13 +484,16 @@ void initCommandOptions(CommandOptions& options) { OptionKind::GLSLForceScalarLayout, "-force-glsl-scalar-layout", nullptr, "Force using scalar block layout for uniform and shader storage buffers in GLSL output."}, - { OptionKind::VulkanBindShift, vkShiftNames.getBuffer(), "-vk--shift ", - "For example '-vk-b-shift ' shifts by N the inferred binding numbers for all resources in 'b' registers of space . " + { OptionKind::VulkanBindShift, vkShiftNames.getBuffer(), "-fvk--shift ", + "For example '-fvk-b-shift ' shifts by N the inferred binding numbers for all resources in 'b' registers of space . " "For a resource attached with :register(bX, ) but not [vk::binding(...)], " "sets its Vulkan descriptor set to and binding number to X + N. If you need to shift the " "inferred binding numbers for more than one space, provide more than one such option. " "If more than one such option is provided for the same space, the last one takes effect. " - "If you need to shift the inferred binding numbers for all sets, use 'all' as ." }, + "If you need to shift the inferred binding numbers for all sets, use 'all' as . " + "\n" + "* [DXC description](https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/SPIR-V.rst#implicit-binding-number-assignment)\n" + "* [GLSL wiki](https://github.com/KhronosGroup/glslang/wiki/HLSL-FAQ#auto-mapped-binding-numbers)\n" }, { OptionKind::VulkanBindGlobals, "-fvk-bind-globals", "-fvk-bind-globals ", "Places the $Globals cbuffer at descriptor set and binding ."}, { OptionKind::EnableEffectAnnotations, -- cgit v1.2.3