We'll assume that GPU idle time == time spent waiting for new
command lists to be added to the queue of the cleanup thread.
This isn't entirely accurate, especially if CPU load is very
high, but should be good enough.
This reverts commit f61ff5d345fdbd1627b2fd833f57ff303015c747.
Apparently, this causes extremely poor frame times on some
configurations. Reason is currently unknown.
Wine needs to setup each thread that has an access to Windows APIs. It means that in winelib builds, we can't let standard C++ library create threads and need to use Wine for that instead. I wrote a thin wrapper around Windows thread functions so that the rest of code just has to use new dxvk::thread class instead of std::thread.
Reduces command submission overhead by reusing fence objects
instead of creating new ones for each submission. Improves
error reporting in case the submission cannot be complete.
Command submission now does not synchronize with the device every single
time. Instead, the command list and the fence that was created for it are
added to a queue. A separate thread will then wait for the execution to
complete and return the command list to the device.