Cg and DirectX debug info

Started by
1 comment, last by laeuchli 16 years, 10 months ago
Dear All, I've just started working on someone elses code, which is basicly a wrapper for DirectX and OpenGL. I've been trying to get familar with the code base, and have been running the DirectX section of the code though the debugger. I notice lots of redundant SetSampler warnings in the debug information. However when I look at the code, I dont see anyplace that could be calling it that often(in fact I've placed break points on the SetSampler calls, and they are only getting called once at startup, whereas I'm getting lots of SetSampelr warnings). I've noticed several of the Cg DirectX demos also have this problem. Is this an issue with Cg(and if so should I be concerned about this), or is it more likely that theres some problem I havent detected in the code? If the latter is the case, does anyone have a suggestion on how to go about debugging this? Regards Jesse
Advertisement
If memory serves me right, that warning only shows when you have the DX warning level set to highest.

Also, in my experience, ID3DXEFFECT tends to generate similar warnings when used, so it's probably safe to say they're coming from the CG handling.

I wouldn't worry about it too much. I mean, it is setting redundant states, but that's not a big deal. Not a big deal at all. I just keep my warning level at a notch under the highest.

Hope this helps.
Sirob Yes.» - status: Work-O-Rama.
I found the problem by stepping though every line for several frames. It had to do with how the guy who'd written it had set it up to handle multiple windows, so he was releasing and resetting the fragement shader each time frame. So in the end it was possible to get rid of most of them. I'm aware its not a super serious error, but my understanding is its better to get rid of them. Then again maybe not. Can anyone pronounce for certain?

This topic is closed to new replies.

Advertisement