You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIR-V] Failed to compile raytracing shaders with "-fspv-debug=vulkan-with-source" #5113
Internal compiler error: access violation. Attempted to read from address 0x0000000000000008
If I delete option "-fspv-debug=vulkan-with-source", the compiling works.
If I delete this line "RaytracingAccelerationStructure scene : register(t0);" and the code that references "scene", the compiling works.
After I build dxc myself, I see there's a null pointer access without checking in EmitVisitor.cpp:
Would adding proper implementation for that type be the desired implementation? If this issue is triable for first contributing, I want to try it.
Hi Snowapril (@Snowapril), Just kindly ask if there's any progress for this issue? I'm not familiar with dxc implementation or the plan. It's just dxc is the only hope to compile raytracing shaders to SPIRV with debug information, as glslangValidator is even worse. :-p
Snowapril (@Snowapril)maoenpei -fspv-debug=vulkan-with-source for ray tracing shaders has not been tested a lot, partly due to the fact that renderdoc does not currently support source shader debugging for ray tracing. Why are you interested in compiling with -fspv-debug=vulkan-with-source?
Greg Fischer (@greg-lunarg) I'm working on a developing tool (Nsight Graphics, similar to RenderDoc) that reflects the SPIRV <-> HLSL correlation. Recently we've added support of the "function scope" information for the shader. The first version only supports DXIL and now it's on SPIRV. There's a spec that clearly describes the non_semantic_info extension so the dxc bug doesn't block our work (coding, testing). But our tool cannot say the functionality is fully supported as long as dxc crashes.
Snowapril (@Snowapril) If you believe you have a fix please contribute. I don't know when any of the maintainers will be able to get to it. As Greg said, there may be many more issue with ray tracing, so you might be opening up a much bigger issue. However, I am happy as long as we keep getting better.
Activity
Snowapril commentedon Mar 27, 2023
I've tracked a little bit why the
debugTypeof the instruction becamenullptr.At
DebugTypeVisitor::visitInstruction, the instruction'sspirvType(kind :TK_AccelerationStructureNV) has never been matched by switch-case stmt inlowerToDebugType. ThereforelowerToDebugTypereturns nullptr fordebugTypeof that instruction. There is no matching condition forTK_AccelerationStructureNV.https://github.com/microsoft/DirectXShaderCompiler/blob/main/tools/clang/lib/SPIRV/DebugTypeVisitor.cpp#L412-L441
Would adding proper implementation for that type be the desired implementation? If this issue is triable for first contributing, I want to try it.
maoenpei commentedon Apr 10, 2023
Hi Snowapril (@Snowapril), Just kindly ask if there's any progress for this issue? I'm not familiar with dxc implementation or the plan. It's just dxc is the only hope to compile raytracing shaders to SPIRV with debug information, as glslangValidator is even worse. :-p
greg-lunarg commentedon Apr 10, 2023
Snowapril (@Snowapril) maoenpei -fspv-debug=vulkan-with-source for ray tracing shaders has not been tested a lot, partly due to the fact that renderdoc does not currently support source shader debugging for ray tracing. Why are you interested in compiling with -fspv-debug=vulkan-with-source?
maoenpei commentedon Apr 11, 2023
Greg Fischer (@greg-lunarg) I'm working on a developing tool (Nsight Graphics, similar to RenderDoc) that reflects the SPIRV <-> HLSL correlation. Recently we've added support of the "function scope" information for the shader. The first version only supports DXIL and now it's on SPIRV. There's a spec that clearly describes the non_semantic_info extension so the dxc bug doesn't block our work (coding, testing). But our tool cannot say the functionality is fully supported as long as dxc crashes.
I'll give you an example:

s-perron commentedon Jun 13, 2023
Snowapril (@Snowapril) If you believe you have a fix please contribute. I don't know when any of the maintainers will be able to get to it. As Greg said, there may be many more issue with ray tracing, so you might be opening up a much bigger issue. However, I am happy as long as we keep getting better.
[SPIR-V] Add debug type for acceleration structure
[SPIR-V] Add debug type for acceleration structure (#6562)
[SPIR-V] Add debug type for acceleration structure (microsoft#6562)