Sign in to follow this  

DX10 HLSL Shader Debuggin in PIX

This topic is 3665 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

Hello, I want to debug my DirectX10 HLSL Vertex and Pixel Shader. So I started a new PIX "Single Frame Capture" projected, pressed F12, selected the frame, clicked on the Render Tab, made a right click on the picture and selected "Debug this Pixel". In the new Debugger Tab I am now able to debug vertex0, 1 and 2 and the selected pixel. But the problem is: if I click on "Debug Vertex 0" PIX shows me the assembler code of my shader (though my shader is written in HLSL). Is there a way to debug through my HLSL code? Thanks!

Share this post


Link to post
Share on other sites
For me it shows the HLSL code. This is just a guess but, do you load your shader from a bytecode or from text?
I load it from text, but maybe if you load it from bytecode it can only disassemble it to assembly level. After all, there is no way to get the HLSL code from the already compiled shader AFAIK.

Share this post


Link to post
Share on other sites
Admittedly I haven't tried it recently, but I'm pretty sure you have to compile the shader with the debug flag (D3D10_SHADER_DEBUG) and it often makes more sense to skip optimization as well (D3D10_SHADER_SKIP_OPTIMIZATION).

hth
Jack

Share this post


Link to post
Share on other sites

This topic is 3665 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this