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,6 +610,8 @@ namespace sw
nextDraw++;
schedulerMutex.unlock();
if(threadCount > 1)
{
if(!threadsAwake)
{
suspend[0]->wait();
......@@ -620,6 +622,14 @@ namespace sw
resume[0]->signal();
}
}
else // Use main thread for draw execution
{
threadsAwake = 1;
task[0].type = Task::RESUME;
taskLoop(0);
}
}
}
void Renderer::threadFunction(void *parameters)
......
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