# [vs03,dx9] can't debug vs

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

## Recommended Posts

hi, i step back to dx9 from dx10, since dx9+vs03 has shader debugger addin. but i can't debug vs -- i followed all "Getting Started Debugging Shaders (Direct3D 9)" entry says, such as dx control panel, SHADER_DEBUGGER, SWVP, . i can only step in ps, as below.
void vs(in float4 vert: POSITION,
out float4 pos: POSITION)
{
pos = mul(vert, matProj); //can't step into this
}

void ps(in float2 pix: VPOS,
out int4 col : COLOR)
{
if(pix.y > 0)
col = int4(255, 255, 255, pix.x); //avoid skipping ps
}

unabling to debug vs is a long existing problem, i never got answer. thanks. vs's output info:
Quote:
 Direct3D9: (INFO) :======================= Reference SWVP device selected 'Direct3D REF Device 1': Attached to debug monitor. 'Direct3D REF-owned HAL (SWVP) Device 1': Attached to debug monitor. D3DX: (INFO) Using SSE2 optimizations 'Direct3D REF-owned HAL (SWVP) Device 1': Loaded vertex shader 'vs' 'Direct3D REF Device 1': Loaded pixel shader 'ps'

##### Share on other sites
Have you tried using PIX for debugging your shaders? It's the preferred method these days, AFAIK.

##### Share on other sites
yes, but that doesn't answer my question. thanks.
Quote:
 Original post by MJPHave you tried using PIX for debugging your shaders? It's the preferred method these days, AFAIK.

##### Share on other sites
Which SDK are you using? If you're getting some debugging you might be using an old enough one, but the addin was part of the SDK in a broken form for a while before they removed it. Although I forget if it was only VS8 that it was broken for.

Are you getting any error messages? Are you 100% certain that VS is actually being used?

##### Share on other sites
A check-list for you:

1. Enable debug runtime
2. 'Enable Shaders Debugging' in the DX control panel
3. Create a software or reference IDirect3DDevice9 object

This is old technology, and unless you have a good reason, you really should be using PIX.

##### Share on other sites
i'm not certain that vs is being used. i don't know how to use vs rather than fixed function in dx9. i'm confused about SetFVF, such and such.
Good men please check where am i wrong, could you? bow.
V(D3DXCreateEffectFromFile(g_pd3dDevice, "1.fx", 0, 0, dwShaderFlags, 0, &g_pEffect, &err));	if( FAILED(g_pd3dDevice->CreateVertexBuffer(nS * sizeof(CUSTOMVERTEX), D3DUSAGE_WRITEONLY, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT , &g_pVBR, NULL))) 		return E_FAIL;..V(g_pd3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX ));

IDirect3DDevice9::CreateVertexBuffer has an FVF para, but it's for fixed function. i'm crazy about it. i'm too tired to be clearminded now. bow

Quote:
 Original post by jollyjeffersWhich SDK are you using? If you're getting some debugging you might be using an old enough one, but the addin was part of the SDK in a broken form for a while before they removed it. Although I forget if it was only VS8 that it was broken for.Are you getting any error messages? Are you 100% certain that VS is actually being used?

##### Share on other sites
You're familiar with Direct3D 10 so just use D3D9's vertex declarations. They're much the same as with D3D10 if a little more limited, but a lot lot better than FVF's. There is no real reason to use FVF's in D3D9 anymore except for legacy code paths.

As for knowing if the VS is actually being used you need to know if any calls via the effect or device framework are failing. If you set (intentionally or unintentionally) a NULL vertex shader it'll skip your code and use FF instead.

hth
Jack

##### Share on other sites
the reason i can't debug vs is that i didn't use vs at all.
the reason for that is that i used FVF-related funcs below.
i haven't found any good samples, since dx sdk's examples all encapsulates a DXUT which is not suitable for gpgpu, while samples not using DXUT interface are all fixed function ones. Samples are important!
I found an old post of mine and followed some replier's suggestion to solve this problem. thanks to him and you very much.

///////////////////////

i'm trying to find samples that avoid using FVF while meantime using
V(D3DXCreateEffectFromFile(g_pd3dDevice, "1.fx", 0, 0, dwShaderFlags, 0, &g_pEffect, &err));

but i can't find. i'm still finding. thanks a lot lot.
Quote:
 Original post by jollyjeffersYou're familiar with Direct3D 10 so just use D3D9's vertex declarations. They're much the same as with D3D10 if a little more limited, but a lot lot better than FVF's. There is no real reason to use FVF's in D3D9 anymore except for legacy code paths.As for knowing if the VS is actually being used you need to know if any calls via the effect or device framework are failing. If you set (intentionally or unintentionally) a NULL vertex shader it'll skip your code and use FF instead.hthJack

[Edited by - yk_cadcg on September 28, 2007 9:13:43 PM]

1. 1
2. 2
Rutin
22
3. 3
4. 4
frob
18
5. 5

• 33
• 13
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
632565
• Total Posts
3007106

×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!