Jump to content
  • Advertisement
Sign in to follow this  
jdyyx1984

how to show the shader source code in GPA or Nsight

This topic is 2148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i precompiled and saved all DX9 shaders into a BIN file which was loaded at runtime to avoid shader compiling .when i dragged the exe to GPA or Nsight i could only see the assembly which mad the debugging a little difficult.
Does any one know how to show hlsl in such debugging tools, should i compile the shader with some specific flag or function ??

Edited by jdyyx1984

Share this post


Link to post
Share on other sites
Advertisement

Doesn't seem to work with precompiled shaders (quoting this):

The HLSL option is only available if you compile the application shaders at run time using the Microsoft DirectX* API. If your application uses shaders compiled at build time, only the IL Assembly option is available for these shaders.

I also wonder if one has to use the D3DX legacy compiler functions (like referenced in that link), or if it works with D3DCompile as well.

Share this post


Link to post
Share on other sites

You should compile your shader with the debug flag (D3DXSHADER_DEBUG).

i did try this flag ,but it didn't work,the assembly changed with some additional comment which indicated the line number of the HLSL this assembly code belonged to ,but  the HLSL code column was still blank

Edited by jdyyx1984

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!