Commit 20248ddb by Nicolas Capens

Use the main thread for draw execution when single-threaded.

Bug 23073037 Change-Id: I47d5a7d80dc48dffae0014fbf619810290c30628 Reviewed-on: https://swiftshader-review.googlesource.com/3840Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarGreg Hartman <ghartman@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent ffec96c1
......@@ -610,14 +610,24 @@ namespace sw
nextDraw++;
schedulerMutex.unlock();
if(!threadsAwake)
if(threadCount > 1)
{
suspend[0]->wait();
if(!threadsAwake)
{
suspend[0]->wait();
threadsAwake = 1;
task[0].type = Task::RESUME;
resume[0]->signal();
}
}
else // Use main thread for draw execution
{
threadsAwake = 1;
task[0].type = Task::RESUME;
resume[0]->signal();
taskLoop(0);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment