Jump to content
  • Advertisement
Sign in to follow this  
AnAss

Quasi-lost device?

This topic is 3765 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'm having an annoying issue with multiple monitor display. I first create a windows D3D app, using DXUT. Then I create a full screen D3D device on another monitor. This works OK and does not cause the windowed app's device to be lost. Then I release the external monitor's device. This works, it causes the app's device to be lost, which I handle, and the app continues normally. If I then repeat the exact same process above, DXUT fails to see the device being lost the second time around (does not call my device lost/reset callbacks). The app then behaves very strangely. It continues to run, but some portion of the D3D calls fail. The GUI renders properly, but the game environment 'stutters' on the last frames it displayed. At the moment the ONLY thing the extra monitor does is create the device, and then release it. Absolutely nothing else. If I manually call my device lost/reset handlers, it solves the problem. But this is stupid. There must be a reason for this behavior, any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
At the moment the ONLY thing the extra monitor does is create the device, and then release it. Absolutely nothing else.

Is that done in one call? That is, is the second device released immediately after it's created?

If not, and you release it after something is done with the first device, I would think you have to check for a lost device on the second device before you release it.

Share this post


Link to post
Share on other sites
I solved this by forward declaring DXUTReset3DEnvironment9 (since it is not in the DXUT headers) and calling it manually after I mess with my external monitor devices. This forces a reset, and fixes the issue.


Steve, there was no output from the debug runtime, and nothing was actually failing.

Buckeye, I agree I need to handle lost/reset on the second device, but how could releasing a lost device cause the first device to be messed up? It was simply for debugging purposes to do absolutely nothing, but the same issue occurred when I had my second device do its rendering, and handle its lost/reset device.

Share this post


Link to post
Share on other sites
Working with multi-monitor and multiple devices/swapchains is not a well tested case, from my frustrated experience. I have ever encountered stranger issue than yours. That is, randomly Device.Reset returned success but it actually failed. I asked in MSDN forum and they said it was a driver bug. Then I tested on other machines but I got the same problem. I finally solved that by using a normal usage pattern - single device and single swapchain but different target window.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!