shader debug

Started by
3 comments, last by antber 16 years, 10 months ago
Can I debug HLSL & ASM within VC2005 Express? And How? BTW, I port these ASM into HLSL, am I right? ASM:

ps_1_1

tex t0

mad r0, v1, t0.a, v0

mul r0, r0, t0
HLSL:

sampler plane;

float4 BasicPixel( in float4 color : COLOR0,
                   in float4 v     : COLOR1,
                   in  float2 vTex : TEXCOORD0) : COLOR
{
	float4 temp = tex2D(plane, vTex);
	
	float4 res  = temp.a * v + color;
	return res * color;
}
Advertisement
Quote:Original post by jhq
Can I debug HLSL & ASM within VC2005 Express? And How?
Pull up the SDK documentation on "PIX for Windows" - it's where most of the D3D debugging tools are now located.

You used to be able to debug within VStudio, but they removed it - even then, the VS'05 EE SKU's don't allow plugins so you'd of been out of luck anyway.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

I normally keep a VS2003 project space around and fall back to that when I need to debug a shader, since I find that debugger to be a bit nicer and more streamlined than the PIX one. The main thing is, if I am having a shader problem, it most likely has to do with setting up state, so it's nice to be able to step from the application, into the shader, and back out again. But then again, keeping around VS2003 is a pain in the but too (unless you need it for other reasons, like me).
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
Looking at the assembly, the last line should be return res * temp;
SDK -> DirectX Graphics -> Direct3D9 -> Tutorials and Samples -> Shader Debugging Tutorial

This topic is closed to new replies.

Advertisement