mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-12 05:11:45 +00:00
- upload using all threads
This commit is contained in:
parent
4a7824c380
commit
a5608c67b5
1 changed files with 13 additions and 4 deletions
|
@ -147,10 +147,6 @@ void PolyFrameBuffer::Update()
|
|||
Flush3D.Unclock();
|
||||
|
||||
FlushDrawCommands();
|
||||
DrawerThreads::WaitForWorkers();
|
||||
mFrameMemory.Clear();
|
||||
FrameDeleteList.Buffers.clear();
|
||||
FrameDeleteList.Images.clear();
|
||||
|
||||
if (mCanvas)
|
||||
{
|
||||
|
@ -162,14 +158,27 @@ void PolyFrameBuffer::Update()
|
|||
uint8_t *dst = I_PolyPresentLock(w, h, pitch);
|
||||
if (dst)
|
||||
{
|
||||
#if 1
|
||||
auto copyqueue = std::make_shared<DrawerCommandQueue>(&mFrameMemory);
|
||||
copyqueue->Push<MemcpyCommand>(dst, pitch / pixelsize, src, w, h, w, pixelsize);
|
||||
DrawerThreads::Execute(copyqueue);
|
||||
#else
|
||||
for (int y = 0; y < h; y++)
|
||||
{
|
||||
memcpy(dst + y * pitch, src + y * w * pixelsize, w * pixelsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
DrawerThreads::WaitForWorkers();
|
||||
I_PolyPresentUnlock(mOutputLetterbox.left, mOutputLetterbox.top, mOutputLetterbox.width, mOutputLetterbox.height);
|
||||
}
|
||||
}
|
||||
|
||||
DrawerThreads::WaitForWorkers();
|
||||
mFrameMemory.Clear();
|
||||
FrameDeleteList.Buffers.clear();
|
||||
FrameDeleteList.Images.clear();
|
||||
|
||||
CheckCanvas();
|
||||
|
||||
Super::Update();
|
||||
|
|
Loading…
Reference in a new issue