SDL: Fix testautomation failures (including clip rect) - closes #9145. During merging for prep'ing the final PR for the Vulkan...

From 935c197059e21736019ce9d559b76ed317a76000 Mon Sep 17 00:00:00 2001
From: danginsburg <[EMAIL REDACTED]>
Date: Mon, 26 Feb 2024 11:48:10 -0500
Subject: [PATCH] Fix testautomation failures (including clip rect) - closes
 #9145.  During merging for prep'ing the final PR for the Vulkan Renderer, I
 misordered a memcpy that regressed several of the testautomation test.  From
 now on, I will make sure to run testautomation on any future PRs before
 submitting.

---
 src/render/vulkan/SDL_render_vulkan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/render/vulkan/SDL_render_vulkan.c b/src/render/vulkan/SDL_render_vulkan.c
index bce68ca9401f..0691dfd0913c 100644
--- a/src/render/vulkan/SDL_render_vulkan.c
+++ b/src/render/vulkan/SDL_render_vulkan.c
@@ -3363,12 +3363,12 @@ static SDL_bool VULKAN_SetDrawState(SDL_Renderer *renderer, const SDL_RenderComm
             constantBuffer = rendererData->constantBuffers[rendererData->currentCommandBufferIndex][rendererData->currentConstantBufferIndex].buffer;
         }
 
+        SDL_memcpy(&rendererData->currentPipelineState->shader_constants, shader_constants, sizeof(*shader_constants));
+
         /* Upload constants to persistently mapped buffer */
         uint8_t *dst = rendererData->constantBuffers[rendererData->currentCommandBufferIndex][rendererData->currentConstantBufferIndex].mappedBufferPtr;
         dst += constantBufferOffset;
         SDL_memcpy(dst, &rendererData->currentPipelineState->shader_constants, sizeof(PixelShaderConstants));
-
-        SDL_memcpy(&rendererData->currentPipelineState->shader_constants, shader_constants, sizeof(*shader_constants));
     }
 
     /* Allocate/update descriptor set with the bindings */