Closed helviett closed 4 months ago
Thanks, I can indeed reproduce this issue. Preliminarily I think the issue is with how #line
directives are handled in preprocessed code and how that corresponds to OpDebugSource
opcodes. This is definitely something that should be fixed.
Good news, looks like this is also fixed by #3496 so I will try to get that reviewed and merged as soon as I can.
Update, #3496 has been merged, could you confirm that your issue is fixed and close it if so?
@arcady-lunarg sorry, couldn't check it earlier. I tested every ShaderList in https://github.com/ConfettiFX/The-Forge and can confirm that everything compiles now.
If you take almost any preprocessed shader from https://github.com/ConfettiFX/The-Forge you won't be able to compile it with -gVS option. Reproduction steps:
FSL_COMPILER_VK
env variable to the folder that contains desired glslangValidator executable (e.g.$env:FSL_COMPILER_VK="C:\VulkanSDK\1.3.268.0\Bin\"
in powershell)py.exe .\Common_3\Tools\ForgeShadingLanguage\fsl.py --compile -b CompiledShaders -d PreprocessedShaders -l VULKAN --debug .\Examples_3\Unit_Tests\src\01_Transformations\Shaders\FSL\ShaderList.fsl
If you're a bit lazy to follow all the steps:
glslangValidator.exe -D_DEBUG -gVS -V PreprocessedShaders/VULKAN/skybox.vert -o CompiledShaders/VULKAN/skybox.vert_0.spv -IPath\To\The-Forge\Common_3\Tools\ForgeShadingLanguage -S vert --target-env spirv1.3 -DVK_EXT_DESCRIPTOR_INDEXING_ENABLED=0 -DVK_FEATURE_TEXTURE_ARRAY_DYNAMIC_INDEXING_ENABLED=0
I can preprocess entire The-Forge for you if you're going to fix this annoying issue. Debugging SPIR-V is okay but I prefer to look at GLSL code.