Commit 13155b35b45745c53287b80edcc33b6b85899d37

Sam Lantinga 2020-02-10T09:42:53

The scissor rect needs to be updated when the viewport changes in the Metal renderer

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m
index 4616a26..74252ba 100644
--- a/src/render/metal/SDL_render_metal.m
+++ b/src/render/metal/SDL_render_metal.m
@@ -1362,6 +1362,7 @@ METAL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *ver
                 SDL_memcpy(&statecache.viewport, &cmd->data.viewport.rect, sizeof (statecache.viewport));
                 statecache.projection_offset = cmd->data.viewport.first;
                 statecache.viewport_dirty = SDL_TRUE;
+                statecache.cliprect_dirty = SDL_TRUE;
                 break;
             }