From c0b6f59a6920a9efbb4ecc3b622529db484c64ef Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 4 May 2023 15:44:09 -0400 Subject: Improvements around HLSLToVulkanLayout (#2867) * #include an absolute path didn't work - because paths were taken to always be relative. * Improve the HLSLToVulkanLayoutOptions interface. Add more diagnostics. Add diagnostics test. * Add check for global binding using file check. * Fix issues with some tests around making some diagnostics ids unique. * Small improvements with doc/handling of vk-<>-shift option setup. --------- Co-authored-by: Yong He --- docs/command-line-slangc-reference.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md index 8b91096e7..7a16b380f 100644 --- a/docs/command-line-slangc-reference.md +++ b/docs/command-line-slangc-reference.md @@ -311,12 +311,20 @@ Remove all source file information from outputs. Force using scalar block layout for uniform and shader storage buffers in GLSL output. + +## -fvk-b-shift, -fvk-s-shift, -fvk-t-shift, -fvk-u-shift + +**-vk-<[vulkan-shift](#vulkan-shift)>-shift <N> <space>** + +For example '-vk-b-shift <N> <space>' shifts by N the inferred binding numbers for all resources in 'b' registers of space <space>. For a resource attached with :register(bX, <space>) but not \[vk::binding(...)\], sets its Vulkan descriptor set to <space> 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 <space>. + + ## -fvk-bind-globals **-fvk-bind-globals <N> <descriptor-set>** -Places the $Globals cbuffer at descriptor set <descriptor-set> and binding <N>. See HLSL global variables and Vulkan binding for explanation and examples. +Places the $Globals cbuffer at descriptor set <descriptor-set> and binding <N>. @@ -324,14 +332,6 @@ Places the $Globals cbuffer at descriptor set <descriptor-set> and binding Enables support for legacy effect annotation syntax. - -## -fvk-b-shift, -fvk-s-shift, -fvk-t-shift, -fvk-u-shift - -**-vk-<[vulkan-shift](#vulkan-shift)>-shift <N> <space>** - -Shifts by N the inferred binding numbers for all resources in b-type registers of space <space>. Specifically, for a resouce attached with :register(bX, <space>) but not \[vk::binding(...)\], sets its Vulkan descriptor set to <space> 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 <space>. - - # Downstream -- cgit v1.2.3