mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +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:
|
// Do one thread ourselves:
|
||||||
|
|
||||||
DrawerThread thread;
|
static DrawerThread thread;
|
||||||
thread.core = 0;
|
thread.core = 0;
|
||||||
thread.num_cores = (int)(queue->threads.size() + 1);
|
thread.num_cores = (int)(queue->threads.size() + 1);
|
||||||
|
|
||||||
|
|
|
@ -202,17 +202,7 @@ public:
|
||||||
if (queue->threaded_render == 0 || !r_multithreaded)
|
if (queue->threaded_render == 0 || !r_multithreaded)
|
||||||
{
|
{
|
||||||
T command(std::forward<Types>(args)...);
|
T command(std::forward<Types>(args)...);
|
||||||
VectoredTryCatch(&command,
|
command.Execute(&Instance()->single_core_thread);
|
||||||
[](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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue