From a2b27528dbe4c34a17d1b42b024be0f5c423f15e Mon Sep 17 00:00:00 2001
From: Jaan Soulier <[EMAIL REDACTED]>
Date: Mon, 10 Aug 2026 00:01:22 -0400
Subject: [PATCH] fix SDL_gpu_vulkan validation warning
---
src/gpu/vulkan/SDL_gpu_vulkan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c
index 3ff8237b4a97c..51b9980fc6a34 100644
--- a/src/gpu/vulkan/SDL_gpu_vulkan.c
+++ b/src/gpu/vulkan/SDL_gpu_vulkan.c
@@ -6209,6 +6209,8 @@ static VkRenderPass VULKAN_INTERNAL_CreateRenderPass(
colorAttachmentReferences[colorAttachmentReferenceCount].attachment = attachmentDescriptionCount;
colorAttachmentReferences[colorAttachmentReferenceCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+ resolveReferences[colorAttachmentReferenceCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+
attachmentDescriptionCount += 1;
if (colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE || colorTargetInfos[i].store_op == SDL_GPU_STOREOP_RESOLVE_AND_STORE) {
@@ -6225,7 +6227,6 @@ static VkRenderPass VULKAN_INTERNAL_CreateRenderPass(
attachmentDescriptions[attachmentDescriptionCount].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
resolveReferences[colorAttachmentReferenceCount].attachment = attachmentDescriptionCount;
- resolveReferences[colorAttachmentReferenceCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
attachmentDescriptionCount += 1;
resolveReferenceCount += 1;