Tried to get it to pause the video thread while calling ovrHmd_EndFrame, but it didn't work so I had to comment it out. My theory is that calling OpenGL from multiple threads at once causes slowdowns. But freezing the other thread just seems to lock everything up. I don't know why.
cegli wrote:
Okay, good news and bad news! On the upside, I think I've found the source of the AMD driver crash and corrected it! It's now running without any driver crashing. It seems to have been a race-condition between the init thread which was initializing the FramebufferManager::m_frontBuffer[eye]; and the rendering thread doing the AsyncTimewarpDraw(). By putting a 5 second delay the first time the AsyncTimewarpDraw() is called, it works! Took me days to figure that one out... Race conditions are so hard to find.  :?

Downside is it seems quite slow... I'm not sure if this is because of a setting I'm missing or another problem. Paper Mario has a strobe like effect, and Mario Kart: Double Dash is working perfectly, but the game is running at 5fps (judder free with asynchtimewarp :)). Smash Brothers Brawl works judder free as well, but at 30fps.

I'm going to have to keep playing around and see what I can do with it... It's definitely closer now at least!

Does this same problem happen on Nvidia cards? I can't tell if I've got AMD cards to the spot as Nvidia now...

Edit:

Anyone who wants to try it out:

   s_nonvr_thread_ready.Wait(); //line 360 of Core.cpp

   std::this_thread::sleep_for(std::chrono::milliseconds(5000)); //Add this line to fix race condition with init thread.

   NOTICE_LOG(VR, "[VR Thread] Main VR loop");