GPU: Cap batch sizes at 1024 vertices, flush if exceeded
This commit is contained in:
parent
4ca3b4b570
commit
a58b687352
|
@ -377,8 +377,11 @@ void GPU_HW::DispatchRenderCommand(RenderCommand rc, u32 num_vertices)
|
|||
}
|
||||
|
||||
// flush when the command changes
|
||||
if (!m_batch_vertices.empty() && m_batch_command.bits != rc.bits)
|
||||
FlushRender();
|
||||
if (!m_batch_vertices.empty())
|
||||
{
|
||||
if (m_batch_vertices.size() >= MAX_BATCH_VERTEX_COUNT || m_batch_command.bits != rc.bits)
|
||||
FlushRender();
|
||||
}
|
||||
|
||||
m_batch_command = rc;
|
||||
LoadVertices(rc, num_vertices);
|
||||
|
|
|
@ -11,6 +11,8 @@ public:
|
|||
virtual ~GPU_HW();
|
||||
|
||||
protected:
|
||||
static constexpr u32 MAX_BATCH_VERTEX_COUNT = 1024;
|
||||
|
||||
struct HWVertex
|
||||
{
|
||||
s32 x;
|
||||
|
|
Loading…
Reference in New Issue