SDL: GPU: `colorAttachmentDescriptions` should be `const`

From f61d4db39af534fe3a36df084c5f7766cdd8cbc9 Mon Sep 17 00:00:00 2001
From: "Quinn X. J." <[EMAIL REDACTED]>
Date: Thu, 5 Sep 2024 17:20:27 +1000
Subject: [PATCH] GPU: `colorAttachmentDescriptions` should be `const`

The `colorAttachmentDescriptions` field of `SDL_GPUGraphicsPipelineAttachmentInfo` should be marked `const`,
similarly to the `vertexBindings` and `vertexAttributes` fields of `SDL_GPUVertexInputState`.
---
 include/SDL3/SDL_gpu.h        | 2 +-
 src/gpu/d3d11/SDL_gpu_d3d11.c | 2 +-
 src/gpu/metal/SDL_gpu_metal.m | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/SDL3/SDL_gpu.h b/include/SDL3/SDL_gpu.h
index 5c823c5902eb0..f09ffb69a6d52 100644
--- a/include/SDL3/SDL_gpu.h
+++ b/include/SDL3/SDL_gpu.h
@@ -1158,7 +1158,7 @@ typedef struct SDL_GPUColorAttachmentDescription
 
 typedef struct SDL_GPUGraphicsPipelineAttachmentInfo
 {
-    SDL_GPUColorAttachmentDescription *colorAttachmentDescriptions;
+    const SDL_GPUColorAttachmentDescription *colorAttachmentDescriptions;
     Uint32 colorAttachmentCount;
     SDL_bool hasDepthStencilAttachment;
     SDL_GPUTextureFormat depthStencilFormat;
diff --git a/src/gpu/d3d11/SDL_gpu_d3d11.c b/src/gpu/d3d11/SDL_gpu_d3d11.c
index b3acc4b2df459..edeafe32412b7 100644
--- a/src/gpu/d3d11/SDL_gpu_d3d11.c
+++ b/src/gpu/d3d11/SDL_gpu_d3d11.c
@@ -1250,7 +1250,7 @@ static void D3D11_ReleaseGraphicsPipeline(
 static ID3D11BlendState *D3D11_INTERNAL_FetchBlendState(
     D3D11Renderer *renderer,
     Uint32 numColorAttachments,
-    SDL_GPUColorAttachmentDescription *colorAttachments)
+    const SDL_GPUColorAttachmentDescription *colorAttachments)
 {
     ID3D11BlendState *result;
     D3D11_BLEND_DESC blendDesc;
diff --git a/src/gpu/metal/SDL_gpu_metal.m b/src/gpu/metal/SDL_gpu_metal.m
index b3861d01d5fdf..cee78caded768 100644
--- a/src/gpu/metal/SDL_gpu_metal.m
+++ b/src/gpu/metal/SDL_gpu_metal.m
@@ -997,7 +997,7 @@ static void METAL_ReleaseGraphicsPipeline(
         MetalShader *vertexShader = (MetalShader *)pipelineCreateInfo->vertexShader;
         MetalShader *fragmentShader = (MetalShader *)pipelineCreateInfo->fragmentShader;
         MTLRenderPipelineDescriptor *pipelineDescriptor;
-        SDL_GPUColorAttachmentBlendState *blendState;
+        const SDL_GPUColorAttachmentBlendState *blendState;
         MTLVertexDescriptor *vertexDescriptor;
         Uint32 binding;
         MTLDepthStencilDescriptor *depthStencilDescriptor;