softgpu: Use persistent bin task state.

It's constant, so it's better to avoid the copying and allocation.  A
small win, but removes new from the profile.
This commit is contained in:
Unknown W. Brackets
2022-01-20 16:58:43 -08:00
parent 3e4d768e7a
commit 55c11425e4
4 changed files with 31 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ bool ThreadManager::TeardownTask(Task *task, bool enqueue) {
if (task->Cancellable()) {
task->Cancel();
delete task;
task->Release();
return true;
}
@@ -174,7 +174,7 @@ static void WorkerThreadFunc(GlobalThreadContext *global, ThreadContext *thread)
// responsibility of the ThreadManager (although it could be!).
if (task) {
task->Run();
delete task;
task->Release();
// Reduce the queue size once complete.
thread->queue_size--;