mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Improve automatic batching performance slightly on AMD gpus by removing some redundant/useless opengl calls (there is no mapped buffer to flush).
This commit is contained in:
@@ -206,7 +206,6 @@ public:
|
|||||||
{
|
{
|
||||||
// We insert a fence for all data from this frame at the end of the
|
// We insert a fence for all data from this frame at the end of the
|
||||||
// frame (in nextFrame), rather than doing anything more fine-grained.
|
// frame (in nextFrame), rather than doing anything more fine-grained.
|
||||||
|
|
||||||
frameGPUReadOffset += usedsize;
|
frameGPUReadOffset += usedsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,13 +426,9 @@ public:
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t unmap(size_t usedsize) override
|
size_t unmap(size_t /*usedsize*/) override
|
||||||
{
|
{
|
||||||
size_t offset = (frameIndex * bufferSize) + frameGPUReadOffset;
|
size_t offset = (frameIndex * bufferSize) + frameGPUReadOffset;
|
||||||
|
|
||||||
gl.bindBuffer(mode, vbo);
|
|
||||||
glFlushMappedBufferRange(glMode, offset, usedsize);
|
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user