mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Fix speed regression caused by the DrawerThread object being recreated every frame
This commit is contained in:
parent
3e59ebb48d
commit
4125da9fc3
2 changed files with 2 additions and 12 deletions
|
@ -114,7 +114,7 @@ void DrawerCommandQueue::Finish()
|
|||
|
||||
// Do one thread ourselves:
|
||||
|
||||
DrawerThread thread;
|
||||
static DrawerThread thread;
|
||||
thread.core = 0;
|
||||
thread.num_cores = (int)(queue->threads.size() + 1);
|
||||
|
||||
|
|
|
@ -202,17 +202,7 @@ public:
|
|||
if (queue->threaded_render == 0 || !r_multithreaded)
|
||||
{
|
||||
T command(std::forward<Types>(args)...);
|
||||
VectoredTryCatch(&command,
|
||||
[](void *data)
|
||||
{
|
||||
T *c = (T*)data;
|
||||
c->Execute(&Instance()->single_core_thread);
|
||||
},
|
||||
[](void *data, const char *reason, bool fatal)
|
||||
{
|
||||
T *c = (T*)data;
|
||||
ReportDrawerError(c, false, reason, fatal);
|
||||
});
|
||||
command.Execute(&Instance()->single_core_thread);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue