• Advertisement
Sign in to follow this  

asm shader debugging

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

hi i have been writing asm shaders using shader model 3.0 . i am able to debug the code when i assemble the shader using D3DXAssembleShaderFromFile and having the shader in a different file. i can add new breakpoints in the shader file and can watch the values of the registers at each break. so far so good. when i try to assemble the shader from memory using D3DXAssembleShader, it works fine and i am also adding the # line directive inside the shader code so as to get the debugger to work. the problem is, i am not able to add breakpoints inside the shader. i can see the shader in the active modules but i am not able to figure out how to do find out the value of the registers in vs3.0 or ps3.0 .. can anyone suggest some method? thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I had similar problems while debugging HLSL shaders, while they were compiled from memory. It seems that unless it has a physical source file to work with, it has issues. My solution was to save the modified shader back to a file (I was opening it, modifying the source text, then compiling from memory), and then compiling from file. Note that I only did this while debugging - I kept things like normal otherwise.

Share this post


Link to post
Share on other sites
Well, for starters, if you're using SM 3 anyways, switch to HLSL - you're much less likely to need the debugger. :)

Remember that even with the ASM shaders, you're not really writing directly to the hardware, so writing in HLSL is unlikely to hurt your performance.

Share this post


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

  • Advertisement