Jump to content

  • Log In with Google      Sign In   
  • Create Account


Snapshot taken from PIX


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 lucky6969b   Members   -  Reputation: 529

Like
0Likes
Like

Posted 24 August 2012 - 04:30 AM

Hi,
I got a snapshot from PIX from my DX9 (with D3DX helpers) application showing that the following things were never released
1) Device
2) Index Buffer
3) Vertex Buffer
4) Vertex Declaration
5) Swap Chain
6) Surface
7) D3D9 Object

All these belong to D3DX helper, I was wondering the Application itself was never destructed.

I derived CD3DApplication to a customized class say CDemo
I overrided all D3DX methods such as initDeviceObjects, restoreDeviceObjects, invalidateDevice, DeleteDeviceObjects
Each CDemo method calls each mesh'es internal initDeviceObjects, invalidateDevice, DeleteDeviceObjects.

CDemo's FinalCleanup has nothing.

The crash happens at WM_CLOSE: Cleanup3DEnvironment() where it finds the Device COM object has a reference count bigger than 1.
Why doesn't the object of 1-7 never getting destructed?

I also get this when it comes to the draw call (inside PIX)
draw_call.png

Also I have the following debug warnings and info in my vs2010 prompt

D3DX: Failed to link up Camera01_Target.
D3DX: ConvertToIndexedBlendedMesh: Number of combinations = 1
Direct3D9: (WARN) :Static index buffer locked more than once per frame. Could have severe performance penalty.
Assertion failure! (h:\gfx_sdkaugust08\windows\directx\dxg\d3d11\d3dx9\anim\loadxh.cpp 1392): D3DXFrameNumNamedMatrices(pframeRoot) == plc->cNamedMatrices
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration
Direct3D9: (INFO) :The vertex declaration is (Stream, Offset, Type, Method, Usage, UsageIndex):
Direct3D9: (INFO) :0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0
Direct3D9: (INFO) :0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0
Direct3D9: (WARN) :Vertex shader function usage (D3DDECLUSAGE_TEXCOORD, 0) does not have corresponding usage in the current vertex declaration


Thanks
Jack

Edited by lucky6969b, 24 August 2012 - 04:45 AM.


Sponsor:

#2 lucky6969b   Members   -  Reputation: 529

Like
0Likes
Like

Posted 24 August 2012 - 04:55 AM

Can this also explain why my skinnedmesh never gets deformed?
Thanks

#3 Seabolt   Members   -  Reputation: 609

Like
0Likes
Like

Posted 24 August 2012 - 09:08 AM

So you have a lot going on here it looks like. First off is your DirectX SDK from 2008? If so you should definitely update it. Second, it looks like your driver is failing to create an index buffer, that would definitely be an issue. Make sure your drivers are up to date. Second it looks like you're using a vertex shader that has a texcoord in it, but the vertex declaration you're using doesn't have a texcoord specified.
Perception is when one imagination clashes with another

#4 lucky6969b   Members   -  Reputation: 529

Like
0Likes
Like

Posted 24 August 2012 - 08:42 PM

Hi Seabolt,
Thanks for your help.
Might we just first tackle the texture issue? Yes, I don't have a vertex declaration at all, but I have 2 TEXCOORD0 + 1 in my vertex shader input data structures
Basically I don't really need any textures, but I would like to leave it as a place holder for further expansion. I think I need to create a secondary shader and comment out the current one. Right?
Thanks
Jack

#5 lucky6969b   Members   -  Reputation: 529

Like
0Likes
Like

Posted 25 August 2012 - 02:45 AM

Hi Everybody,
I have got rid of all the memory leaks, now the only problem I am facing is I can't create normals for the mesh I've loaded in.
It's the same tiny.x found in Frank's book. Same Vertex Declaration, same calling orders. I have initialized the vertex declarations, I've seen the elements being correct.
But when it comes to here, the tempmesh becomes 0x00000000

void CSkinnedMesh::buildSkinnedMesh(ID3DXMesh* mesh)
{
//====================================================================
// First add a normal component and 2D texture coordinates component.
D3DVERTEXELEMENT9 elements[64];
UINT numElements = 0;
VertexPNT::Decl->GetDeclaration(elements, &numElements);
ID3DXMesh* tempMesh = 0;
mesh->CloneMesh(D3DXMESH_SYSTEMMEM, elements, gd3dDevice, &tempMesh);

I am using D3DXMESH_SYSTEMMEM as the example in Frank's CD. The shaders are copied right over.
I am really puzzled.
Thanks
Jack

#6 lucky6969b   Members   -  Reputation: 529

Like
0Likes
Like

Posted 25 August 2012 - 02:54 AM

D3DX: CloneMesh: Cannot clone when the source mesh's index buffer is write only.
Seabolt is correct. But what specifically do you mean by Updating drivers? Do I reinstall DX SDK?
The problem is quite troublesome. I need to un-install vc redistributables and reinstall SDK then the redistributables again
But I would try

#7 lucky6969b   Members   -  Reputation: 529

Like
0Likes
Like

Posted 25 August 2012 - 03:09 AM

But I am amazed how come Skinned Mesh Demo from Frank does work. Our work is almost identical.

#8 Seabolt   Members   -  Reputation: 609

Like
0Likes
Like

Posted 27 August 2012 - 08:18 AM

Sorry for the late reply, I've been fairly busy.

As far as the vertex declaration issue, that's fine. It will be a warning, but if you're not using any textures, then it will be okay.

As far as the clone mesh call, catch the result of the call and look it up using the directx error lookup tool. Then see what the issue is compared to the docs (http://msdn.microsoft.com/en-us/library/windows/desktop/bb205732(v=vs.85).aspx). The DX error lookup tool is located at Programs->Microsoft DirectX SDK (your date here)->DirectX Utilities->DirectX Error Lookup. It may also be in a 64 bit version of the DirectX Utilities folder.

And as far as updating your drivers, first thing is find out what graphics card you have, then do a search for a driver update and that type of card.

Also you may want to see if your DX SDK is up to date, if not, just download it here: http://www.microsoft.com/en-us/download/details.aspx?id=6812
Perception is when one imagination clashes with another




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS