Sign in to follow this  
radiationz

"D3DERR_INVALIDCALL"

Recommended Posts

I have a problem in SkinInformation.ConvertToIndexedBlendedMesh(...) it gives me exception "D3DERR_INVALIDCALL". This only happens on my other computer with video card Nvidia 7600GT. I want to know what is causing the problem. Any help will be appreciated, thnx.

Share this post


Link to post
Share on other sites
Friendly note from your neighbourhood moderator: Please refer to the forum guidelines on bumping threads. You're breaking all of them. This forum is a shared forum for the entire community, and I'd rather I didn't have to start getting grumpy about it [wink]

Try running your code against the reference rasterizer. If it runs fine under the RefRast then yes, the IHV is probably in the wrong; if it fails under the RefRast then your code is wrong and you just got lucky with it working on other hardware.

hth
Jack

Share this post


Link to post
Share on other sites
It seems i got lucky having it working on 2 other computers.. The error comes from this function SkinInformation.ConvertToIndexedBlendedMesh(...) it returns "D3DERR_INVALIDCALL".. what could be the possible reasons ?

Share this post


Link to post
Share on other sites
Quote:
Original post by radiationz
what could be the possible reasons ?
Quote:
Original post by Evil Steve
Use the debug runtimes. What do they say when you run your app? You should get a proper textual error description.


Share this post


Link to post
Share on other sites
Quote:
Original post by radiationz
no i didnt use debug runtime libraries. Where can i find them ?
If you're using a recent SDK, they'll be in start menu -> DirectX SDK -> DirectX Utilities -> DirectX Control Pannel. Make sure "Use Debug Version of Direct3D 9" is selected, and the debug output level is set all the way to the right (Towards "More").

If you're using an old SDK, the DirectX control pannel is in the control pannel.

Share this post


Link to post
Share on other sites
I am using now the debug runtime libraries as you stated. Exception details still not shown. I am using managed code (c#).. i think something i have to set in the compiler so the exceptions get shown in details.. I hope somebody knows..

Share this post


Link to post
Share on other sites
well, i have found that the problems comes from Manager.GetDeviceCaps(0, DeviceType.Hardware); it gives me that caps.MaxVertexBlendMatrixIndex = 0. Which means that my card doesnt support rendering Indexed Blended Mesh. My card is Nvidia 7600GT which for sure supports that. So i need to know what the problem is and what to do..

Share this post


Link to post
Share on other sites
Quote:
Original post by radiationz
well, i have found that the problems comes from Manager.GetDeviceCaps(0, DeviceType.Hardware); it gives me that caps.MaxVertexBlendMatrixIndex = 0.
Did you get that from the debug output?

Share this post


Link to post
Share on other sites
i debugged the code normally using the visual studio and that what i found in the variables. caps.MaxVertexBlendMatrixIndex = 0 which means that the video card Nvidia 7600GT doesnt support rendering Indexed Blended Mesh, and that's wrong. I installed the directx SDK and i am using the debug version of direct3d 9 and output level towards more, still till now details of exception not visible.

Share this post


Link to post
Share on other sites
This is the output of dbgview.exe, it seems that something is wrong with renderstate.. i hope somebody can help..



[2288] Direct3D9: :====> ENTER: DLLMAIN(033fe6e0): Process Attach: 000008f0, tid=00000ce8
[2288]
[2288] Direct3D9: :====> EXIT: DLLMAIN(033fe6e0): Process Attach: 000008f0
[2288]
[2288] Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
[2288]
[2288] D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
[2288] Direct3D9: (INFO) :======================= Hal HWVP device selected
[2288]
[2288] Direct3D9: (INFO) :HalDevice Driver style 9
[2288]
[2288] Direct3D9: :DoneExclusiveMode
[2288]
[2288] Direct3D9: (WARN) :Ignoring redundant SetRenderState - 27
[2288]
[2288] Direct3D9: (WARN) :Ignoring redundant SetRenderState - 19
[2288]
[2288] Direct3D9: (WARN) :Ignoring redundant SetRenderState - 20
[2288]
[2288] Direct3D9: (WARN) :Ignoring redundant SetRenderState - 137
[2288]
[2288] Direct3D9: (ERROR) :Illegal value for D3DRENDERSTATE_VERTEXBLEND
[2288]
[2288] Direct3D9: (ERROR) :SetRenderState failed.
[2288]

Share this post


Link to post
Share on other sites
Quote:
Original post by radiationz
caps.MaxVertexBlendMatrixIndex = 0 which means that the video card Nvidia 7600GT doesnt support rendering Indexed Blended Mesh, and that's wrong.
No it isn't wrong. If the device says you can't do something then you can't do it. It's that simple [rolleyes].

I was pretty sure Nvidia dropped this feature with the GeForce 4 line of hardware. I had a Ti4600 on loan to do a review when they'd just been released and I had to verify this with an engineer at their end - in a nutshell they just said "use a vertex shader".

Quote:
it seems that something is wrong with renderstate.. i hope somebody can help..
Nope, can't really help at all. You didn't post what value you're trying to set for the render state (or is it definitely coming via D3DX? - use OutputDebugString() to narrow it down). Have you checked the SDK Documentation for what values are legal?


Jack

Share this post


Link to post
Share on other sites
thnx for feedback. It is obvious that the renderstate makes problem from trying to render an Indexed Blended Mesh "device.RenderState.IndexedVertexBlendEnable = true;". the question is how can i render and Indexed Blended Mesh in my card ?
do i HAVE to use vertex shaders ?

Share this post


Link to post
Share on other sites
Yes, you must use a shader. nVidia never supported fixed pipe skinning. It was introduced at the same time as shaders, and nVidia felt it was pointless to support it. They also didn't support the UBYTE4 vertex element for quite some time. UBYTE4 is often used for passing bone ids to the shader. The 7x00 cards do support it, but I'm not sure when it was introduced. It's one of the first things you're going to run into when running across different hardware. I use a D3DCOLOR to pass this data to the shader.

The D3D errors can be found by enabling the debug runtime, but if it's a D3DX function that's failing, you need to link with the debug version of the D3DX library. In C++ it's d3dx9.lib vs. d3dx9d.lib, where 'd' is for debug. I have no idea how anything works in managed code.

Share this post


Link to post
Share on other sites
I know nothing about shaders.. do you recommend a link or something so i can learn more about them. Is there a ready made vertex shader that can help me render my indexed skinned mesh ?

Share this post


Link to post
Share on other sites
Quote:
Original post by radiationz
I know nothing about shaders.. do you recommend a link or something so i can learn more about them. Is there a ready made vertex shader that can help me render my indexed skinned mesh ?


You can start with my chapter on vertex shaders.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this