mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Add calls to XInitThreads() to allow driver multithreading optimisations
This commit is contained in:
@@ -52,6 +52,10 @@ void sharedLogOutput(QtMsgType type, const QMessageLogContext &context, const QS
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// call this as the very first thing - no-op on other platforms, but on linux it means
|
||||
// XInitThreads will be called allowing driver access to xlib on multiple threads.
|
||||
QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
|
||||
|
||||
qInstallMessageHandler(sharedLogOutput);
|
||||
|
||||
qInfo() << "QRenderDoc initialising.";
|
||||
|
||||
@@ -210,6 +210,9 @@ void DisplayRendererPreview(IReplayController *renderer, TextureDisplay &display
|
||||
// need to create a hybrid setup xlib and xcb in case only one or the other is supported.
|
||||
// We'll prefer xcb
|
||||
|
||||
// call XInitThreads - although we don't use xlib concurrently the driver might need to.
|
||||
XInitThreads();
|
||||
|
||||
Display *display = XOpenDisplay(NULL);
|
||||
|
||||
if(display == NULL)
|
||||
|
||||
Reference in New Issue
Block a user