Skip to main content
GameDev.net gamedev.net
🔒 Locked

Debugging

Started by yurixd Oct 17, 2005 at 4:51 AM 2 replies 500+ views
Original Post
yurixd
yurixd
Im writting a code using HLSL to program my vertex and pixel shader. My output is always 0 .....when it should not be, and I will like to know, how can I debug my code...! There is any site or someone can explain me how to debug a code in HLSL ??? Thanks, Jesus
kovacsp
kovacsp
Hi,

have a look at the SDK docs here:
DirectX Graphics / Graphics tools / Shader debugger.

It explains all you need to debug your shader.

Good luck debugging,
kp
------------------------------------------------------------Neo, the Matrix should be 16-byte aligned for better performance!
LosBrutalos
LosBrutalos
If you´re using .Net with C it does´nt seem a real problem. You have to had a look into your in your directx documentation, where it is detailed described.
A quick check list:
1. You have installed the debug features from sdk ?
2. You have to set Extras/options/debug/directX -> Enable shader debug...you have to switch to the debug runtime too.
3. You have to use a software processing device (instead hardware or mixedmode device). Therefore its a good idea to create a own compiler switch.
4. You have tocreate the effect with the following flags:
shaderFlags.Debug
shaderFlags.SkipOptimization
shaderFlags.ForcePixelShaderSoftwareNoOptimizations
shaderFlags.ForceVertexShaderSoftwareNoOptimizations
5. You have to start your app with Debug > Direct3d > Start with direct3d debugging

If you´re using vb.net like me ...i´m still looking for a answer too.... because the app doesnt start (like seen in point 5) and if i set a breakpoint into the shader, then the debugger replies, that there´s no debug information at that line(s) ...

Good luck

ps: if somebody can help me with my VB-NET-shader-debugging-problem i will be very happy... (a few posts ago) :)
*Los Brutalos*

Los Brutalos(Sorry for my brutal english ;)
BlacknRedGT
BlacknRedGT
If you get a answer for the VB.net plz message me.. thanx

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.