Snapshot taken from PIX

Started by
6 comments, last by Seabolt 11 years, 8 months ago
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)
[attachment=10898: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
[/quote]

Thanks
Jack
Advertisement
Can this also explain why my skinnedmesh never gets deformed?
Thanks
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
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
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
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
But I am amazed how come Skinned Mesh Demo from Frank does work. Our work is almost identical.
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

This topic is closed to new replies.

Advertisement