Sign in to follow this  

DX call freezing my system

This topic is 3969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have my system laid out like the following FrameBegin(); DrawEverything(); FrameEnd(); Inside FrameBegin() there color buffer and depth buffer are cleared out and mDevice->BeginScene() is called. Inside DrawEverything() a vertexbuffer is locked and filled with data and unlocked and finally rendered. But for some reason the lock freezes my system.... whereas a similar type of lock()/unlock() and rendering works find when i do it inside the FrameBegin() ( just for a test). I m wondering what possible things might cause Lock() to freeze the whole system.

Share this post


Link to post
Share on other sites
We need to see the part of the DrawEverything function where you lock and render, in order to effectively help you.

Most likely cause of the freeze is that you first lock the vertex buffer, then try drawing with it before unlocking it. The graphics card cannot use locked resources, and the situation would cause an internal access violation or a deadlock (both of which could in turn freeze the graphics driver).

In a rarer case, your graphics driver may have a bug where it prevents locking of a vertex buffer currently bound in the card's draw command queue and causes the hang of the graphics driver this way. This seldom happens with new drivers, but is possible (I've seen such bugs in action a few years ago).

Also, check that you use the locked pointers correctly to avoid CPU access violations.

Share this post


Link to post
Share on other sites
Sign in to follow this