From 872936a485ecf2ba00f5028190087274d8fe0d01 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 21 Nov 2018 23:46:37 -0400 Subject: [PATCH] metal: Fix an incorrect division. --- src/render/metal/SDL_render_metal.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m index 1e9a2e839..70f470448 100644 --- a/src/render/metal/SDL_render_metal.m +++ b/src/render/metal/SDL_render_metal.m @@ -1163,7 +1163,7 @@ METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver case SDL_RENDERCMD_FILL_RECTS: { const size_t count = cmd->data.draw.count; - const size_t maxcount = UINT16_MAX / 6; + const size_t maxcount = UINT16_MAX / 4; SetDrawState(renderer, cmd, SDL_METAL_FRAGMENT_SOLID, CONSTANTS_OFFSET_IDENTITY, mtlbufvertex, &statecache); /* Our index buffer has 16 bit indices, so we can only draw 65k * vertices (16k rects) at a time. */