Skip to main content
gamedev.net
🔒 Locked

Device Reset

Started by Night Elf Nov 23, 2003 at 6:34 PM 4 replies 550+ views
Original Post
Night Elf
Night Elf
When I try to reset my device after ALT-TABbing back to my Direct3D app, I get the following message from the DirectX Debug Runtime:
Direct3D8: (ERROR) :The following D3DPOOL_DEFAULT surfaces/buffers/textures still exist
Direct3D8: (ERROR) :  D3DRTYPE_VERTEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_INDEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_VERTEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_INDEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_VERTEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_INDEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_VERTEXBUFFER
Direct3D8: (ERROR) :  D3DRTYPE_INDEXBUFFER
Direct3D8: (ERROR) :All user created D3DPOOL_DEFAULT surfaces must be freed before Reset can succeed. Reset Fails
Direct3D8: (ERROR) :Reset failed and Reset/TestCooperativeLevel/Release are the only legal APIs to be called subsequently
I haven't used D3DPOOL_DEFAULT anywhere in my code, so I'm guessing some DirectX interface is using them internally. What I want to know is which of the DirectX interfaces may be causing this problem or how I can track the allocation of these buffers. Thanks. EDIT: I'm using DirectX 8.1. One of the interfaces that behave like I was describing earlier is D3DXSprite, which comes with functions to deal with lost/reset devices. I want to know of any others. [edited by - Night Elf on November 23, 2003 7:40:10 PM]
hplus0603
hplus0603
Do you use D3DX perhaps? Also, D3D may place things in pools other than what you request.

Another approach is to go _MANAGED.
enum Bool { True, False, FileNotFound };
Night Elf
Night Elf
quote:
Do you use D3DX perhaps?


I do, but that doesn''t mean anything...

quote:
Also, D3D may place things in pools other than what you request.


Mmmmh... That doesn''t make much sense to me. I haven''t heared such thing before...

quote:
Another approach is to go _MANAGED.


If you mean using D3DPOOL_MANAGED, I''m already doing that.
Nairou
Nairou
If you use any of the D3DX Text output stuff (I forget the name now), those need to be freed as well, since they use internal _DEFAULT buffers. Many D3DX features do. I got hung up on that in the past as well.
IFooBar
IFooBar
Why dont you check all the ID3DX* interfaces you are using. Check if they have the OnLostDevice and OnResetDevice functions and then check if you are not calling them for a perticular interface.




:::: [ Triple Buffer ] ::::
[size=2]aliak.net
Night Elf
Night Elf
quote:
If you use any of the D3DX Text output stuff (I forget the name now), those need to be freed as well, since they use internal _DEFAULT buffers.


No, I''m not using D3DXFont or CD3DFont.

quote:
Why dont you check all the ID3DX* interfaces you are using. Check if they have the OnLostDevice and OnResetDevice functions and then check if you are not calling them for a perticular interface.


I''ve already checked those and the seem OK.

Is there any way I can track the DX debug output to where the VBs and IBs where allocated?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.