No shader Debug Info

Hi everyone,

I’m compiling my HLSL files using HLSL shader compiler 10.1 with the following arguments:

> fxc.exe "MyShader.hlsl" /T ps_5_0 /E PS /Od /Zi /Gfp /Fo "MyShader.cso"

And if I open the .cso file I can see embedded the actual HLSL source code with (what I believe is) debug information normaly not present without /Od /Zi /Gfp.

However, while debugging a frame with Nsight Graphics (2019.2.1.0) in my GTX 1050 Ti PC, Debug Info appears as “None”, and while clicking the shader only the assambly code is shown (although HLSL code is in the .cso file) with a message on top of the tab: “Shader editing is not supported by this shader”, and not able to put breakpoints or debug at all.

Any ideas what could I be missing to be able to debug the shader?

Thanks in advance!

Hi Jakovo,

Sorry about this issue!

Based on the flags you have set, it should be working. As you stated, /Od /Zi and /Gfp should lead to the best experience. https://docs.nvidia.com/nsight-graphics/UserGuide/index.html#unique_1258749833

Which graphics driver version are you using?

Thanks,
Seth

Hi Seth,

I’m using the most recent driver version: 430.39

Hi Jakovo,

Very interesting, this should be working. Looks like we may have a bug. Is it possible for you to private message me and share your application?

The first step will be to try to reproduce the problem on our side.

Thanks,
Seth

Thanks,

I’ll send you a very basic dx application which behaves the same way.

Just wanted to follow up in the thread. This issue has been fixed and will be available in the 2019.4 release of Nsight Graphics.

Hi,

I just upgraded to 2019.3 and when applying D3DCOMPILE_SKIP_OPTIMIZATION and D3DCOMPILE_DEBUG when compiling with D3DCompile, NSight graphics crashes my clients app when running via Nsight Graphics.

When can we expect 2019.4 to be released? Shader source would be really useful in complex pipeline debugging / profiling.

Thanks,

Neil

Hi Neil,

2019.4 will be released in just a couple of weeks! Hopefully that will fix the issue you are seeing.

Just incase this is not the same thing, is there any errors generated in the Nsight Graphics log when the application crashes?

Thanks,
Seth

I’m running into a similar (I believe) problem in 2019.5.1.0. I build shaders offline using D3DCompile with the D3DCOMPILE_DEBUG and D3DCOMPILE_SKIP_OPTIMIZATION flags.

When I run Nsight it shows me the name of my shader and “Source + µCode” under status in the Linked Programs View. But when I click on the shader I’m greeted with the “Shader editing is not supported for HLSL bytecode without HLSL source”.

I do see some debug e.g. buffer/resource names and definitions in the comments above the bytecode which leads me to believe debug information is available but no source.

Just for comparison, I’m able to view source in RenderDoc with current setup.

Hello,

Thanks for your feedback on Nsight Graphics 2019.5.1. I’ll discuss with the engineering team and get back to you.

Darrell

Hi,

I have created a bug for your issue and assigned to our engineering team.

Darrell

Thank you very much for the feedback! I believe I have this issue fixed, but it would help to confirm if you could provide a sample app that I could test.

Regards,
Chris