SDL: GPU: Rename struct members and parameters for SDL3 naming conventions (#10730)

From 9730f62e8cb535646fb28d32b1add493f67bae0d Mon Sep 17 00:00:00 2001
From: Caleb Cornett <[EMAIL REDACTED]>
Date: Fri, 6 Sep 2024 18:38:23 -0500
Subject: [PATCH] GPU: Rename struct members and parameters for SDL3 naming
 conventions (#10730)

---------

Co-authored-by: Evan Hemsley <2342303+thatcosmonaut@users.noreply.github.com>
---
 include/SDL3/SDL_gpu.h               |  833 ++++++++-------
 src/dynapi/SDL_dynapi_procs.h        |    2 +-
 src/gpu/SDL_gpu.c                    | 1416 +++++++++++++-------------
 src/gpu/SDL_sysgpu.h                 |  116 +--
 src/gpu/d3d11/SDL_gpu_d3d11.c        |  723 ++++++-------
 src/gpu/d3d12/SDL_gpu_d3d12.c        |  930 ++++++++---------
 src/gpu/metal/SDL_gpu_metal.m        |  686 ++++++-------
 src/gpu/vulkan/SDL_gpu_vulkan.c      |  948 ++++++++---------
 src/render/sdlgpu/SDL_pipeline_gpu.c |   62 +-
 src/render/sdlgpu/SDL_render_gpu.c   |   70 +-
 src/render/sdlgpu/SDL_shaders_gpu.c  |    8 +-
 test/testgpu_simple_clear.c          |   23 +-
 test/testgpu_spinning_cube.c         |  134 +--
 13 files changed, 2971 insertions(+), 2980 deletions(-)

diff --git a/include/SDL3/SDL_gpu.h b/include/SDL3/SDL_gpu.h
index 09f46738b4167..ce026a485a99b 100644
--- a/include/SDL3/SDL_gpu.h
+++ b/include/SDL3/SDL_gpu.h
@@ -494,7 +494,7 @@ typedef enum SDL_GPUTextureType
  * Specifies the sample count of a texture.
  *
  * Used in multisampling. Note that this value only applies when the texture
- * is used as a render pass attachment.
+ * is used as a render target.
  *
  * \since This enum is available since SDL 3.0.0
  *
@@ -751,8 +751,7 @@ typedef enum SDL_GPUStencilOp
 } SDL_GPUStencilOp;
 
 /**
- * Specifies the operator to be used when pixels in a render pass texture
- * attachment are blended with existing pixels in the texture.
+ * Specifies the operator to be used when pixels in a render target are blended with existing pixels in the texture.
  *
  * The source color is the value written by the fragment shader. The
  * destination color is the value currently existing in the texture.
@@ -771,8 +770,7 @@ typedef enum SDL_GPUBlendOp
 } SDL_GPUBlendOp;
 
 /**
- * Specifies a blending factor to be used when pixels in a render pass texture
- * attachment are blended with existing pixels in the texture.
+ * Specifies a blending factor to be used when pixels in a render target are blended with existing pixels in the texture.
  *
  * The source color is the value written by the fragment shader. The
  * destination color is the value currently existing in the texture.
@@ -958,28 +956,28 @@ typedef struct SDL_GPUViewport
     float y;
     float w;
     float h;
-    float minDepth;
-    float maxDepth;
+    float min_depth;
+    float max_depth;
 } SDL_GPUViewport;
 
 typedef struct SDL_GPUTextureTransferInfo
 {
-    SDL_GPUTransferBuffer *transferBuffer;
-    Uint32 offset;      /* starting location of the image data */
-    Uint32 imagePitch;  /* number of pixels from one row to the next */
-    Uint32 imageHeight; /* number of rows from one layer/depth-slice to the next */
+    SDL_GPUTransferBuffer *transfer_buffer;
+    Uint32 offset;         /* starting location of the image data */
+    Uint32 pixels_per_row; /* number of pixels from one row to the next */
+    Uint32 rows_per_layer; /* number of rows from one layer/depth-slice to the next */
 } SDL_GPUTextureTransferInfo;
 
 typedef struct SDL_GPUTransferBufferLocation
 {
-    SDL_GPUTransferBuffer *transferBuffer;
+    SDL_GPUTransferBuffer *transfer_buffer;
     Uint32 offset;
 } SDL_GPUTransferBufferLocation;
 
 typedef struct SDL_GPUTextureLocation
 {
     SDL_GPUTexture *texture;
-    Uint32 mipLevel;
+    Uint32 mip_level;
     Uint32 layer;
     Uint32 x;
     Uint32 y;
@@ -989,7 +987,7 @@ typedef struct SDL_GPUTextureLocation
 typedef struct SDL_GPUTextureRegion
 {
     SDL_GPUTexture *texture;
-    Uint32 mipLevel;
+    Uint32 mip_level;
     Uint32 layer;
     Uint32 x;
     Uint32 y;
@@ -1002,8 +1000,8 @@ typedef struct SDL_GPUTextureRegion
 typedef struct SDL_GPUBlitRegion
 {
     SDL_GPUTexture *texture;
-    Uint32 mipLevel;
-    Uint32 layerOrDepthPlane;
+    Uint32 mip_level;
+    Uint32 layer_or_depth_plane;
     Uint32 x;
     Uint32 y;
     Uint32 w;
@@ -1023,54 +1021,54 @@ typedef struct SDL_GPUBufferRegion
     Uint32 size;
 } SDL_GPUBufferRegion;
 
-/* Note that the `firstVertex` and `firstInstance` parameters are NOT compatible with
+/* Note that the `first_vertex` and `first_instance` parameters are NOT compatible with
  * built-in vertex/instance ID variables in shaders (for example, SV_VertexID). If
  * your shader depends on these variables, the correlating draw call parameter MUST
  * be 0.
  */
 typedef struct SDL_GPUIndirectDrawCommand
 {
-    Uint32 vertexCount;   /* number of vertices to draw */
-    Uint32 instanceCount; /* number of instances to draw */
-    Uint32 firstVertex;   /* index of the first vertex to draw */
-    Uint32 firstInstance; /* ID of the first instance to draw */
+    Uint32 num_vertices;   /* number of vertices to draw */
+    Uint32 num_instances;  /* number of instances to draw */
+    Uint32 first_vertex;   /* index of the first vertex to draw */
+    Uint32 first_instance; /* ID of the first instance to draw */
 } SDL_GPUIndirectDrawCommand;
 
 typedef struct SDL_GPUIndexedIndirectDrawCommand
 {
-    Uint32 indexCount;    /* number of vertices to draw per instance */
-    Uint32 instanceCount; /* number of instances to draw */
-    Uint32 firstIndex;    /* base index within the index buffer */
-    Sint32 vertexOffset;  /* value added to vertex index before indexing into the vertex buffer */
-    Uint32 firstInstance; /* ID of the first instance to draw */
+    Uint32 num_indices;    /* number of vertices to draw per instance */
+    Uint32 num_instances;  /* number of instances to draw */
+    Uint32 first_index;    /* base index within the index buffer */
+    Sint32 vertex_offset;  /* value added to vertex index before indexing into the vertex buffer */
+    Uint32 first_instance; /* ID of the first instance to draw */
 } SDL_GPUIndexedIndirectDrawCommand;
 
 typedef struct SDL_GPUIndirectDispatchCommand
 {
-    Uint32 groupCountX;
-    Uint32 groupCountY;
-    Uint32 groupCountZ;
+    Uint32 groupcount_x;
+    Uint32 groupcount_y;
+    Uint32 groupcount_z;
 } SDL_GPUIndirectDispatchCommand;
 
 /* State structures */
 
 typedef struct SDL_GPUSamplerCreateInfo
 {
-    SDL_GPUFilter minFilter;
-    SDL_GPUFilter magFilter;
-    SDL_GPUSamplerMipmapMode mipmapMode;
-    SDL_GPUSamplerAddressMode addressModeU;
-    SDL_GPUSamplerAddressMode addressModeV;
-    SDL_GPUSamplerAddressMode addressModeW;
-    float mipLodBias;
-    float maxAnisotropy;
-    SDL_bool anisotropyEnable;
-    SDL_bool compareEnable;
+    SDL_GPUFilter min_filter;
+    SDL_GPUFilter mag_filter;
+    SDL_GPUSamplerMipmapMode mipmap_mode;
+    SDL_GPUSamplerAddressMode address_mode_u;
+    SDL_GPUSamplerAddressMode address_mode_v;
+    SDL_GPUSamplerAddressMode address_mode_w;
+    float mip_lod_bias;
+    float max_anisotropy;
+    SDL_bool enable_anisotropy;
+    SDL_bool enable_compare;
     Uint8 padding1;
     Uint8 padding2;
-    SDL_GPUCompareOp compareOp;
-    float minLod;
-    float maxLod;
+    SDL_GPUCompareOp compare_op;
+    float min_lod;
+    float max_lod;
 
     SDL_PropertiesID props;
 } SDL_GPUSamplerCreateInfo;
@@ -1078,9 +1076,9 @@ typedef struct SDL_GPUSamplerCreateInfo
 typedef struct SDL_GPUVertexBinding
 {
     Uint32 binding;
-    Uint32 stride;
-    SDL_GPUVertexInputRate inputRate;
-    Uint32 instanceStepRate; /* ignored unless inputRate is INSTANCE */
+    Uint32 pitch;
+    SDL_GPUVertexInputRate input_rate;
+    Uint32 instance_step_rate; /* ignored unless input_rate is INSTANCE */
 } SDL_GPUVertexBinding;
 
 typedef struct SDL_GPUVertexAttribute
@@ -1093,46 +1091,46 @@ typedef struct SDL_GPUVertexAttribute
 
 typedef struct SDL_GPUVertexInputState
 {
-    const SDL_GPUVertexBinding *vertexBindings;
-    Uint32 vertexBindingCount;
-    const SDL_GPUVertexAttribute *vertexAttributes;
-    Uint32 vertexAttributeCount;
+    const SDL_GPUVertexBinding *vertex_bindings;
+    Uint32 num_vertex_bindings;
+    const SDL_GPUVertexAttribute *vertex_attributes;
+    Uint32 num_vertex_attributes;
 } SDL_GPUVertexInputState;
 
 typedef struct SDL_GPUStencilOpState
 {
-    SDL_GPUStencilOp failOp;
-    SDL_GPUStencilOp passOp;
-    SDL_GPUStencilOp depthFailOp;
-    SDL_GPUCompareOp compareOp;
+    SDL_GPUStencilOp fail_op;
+    SDL_GPUStencilOp pass_op;
+    SDL_GPUStencilOp depth_fail_op;
+    SDL_GPUCompareOp compare_op;
 } SDL_GPUStencilOpState;
 
-typedef struct SDL_GPUColorAttachmentBlendState
+typedef struct SDL_GPUColorTargetBlendState
 {
-    SDL_bool blendEnable;
+    SDL_bool enable_blend;
     Uint8 padding1;
     Uint8 padding2;
     Uint8 padding3;
-    SDL_GPUBlendFactor srcColorBlendFactor;
-    SDL_GPUBlendFactor dstColorBlendFactor;
-    SDL_GPUBlendOp colorBlendOp;
-    SDL_GPUBlendFactor srcAlphaBlendFactor;
-    SDL_GPUBlendFactor dstAlphaBlendFactor;
-    SDL_GPUBlendOp alphaBlendOp;
-    SDL_GPUColorComponentFlags colorWriteMask;
-} SDL_GPUColorAttachmentBlendState;
+    SDL_GPUBlendFactor src_color_blendfactor;
+    SDL_GPUBlendFactor dst_color_blendfactor;
+    SDL_GPUBlendOp color_blend_op;
+    SDL_GPUBlendFactor src_alpha_blendfactor;
+    SDL_GPUBlendFactor dst_alpha_blendfactor;
+    SDL_GPUBlendOp alpha_blend_op;
+    SDL_GPUColorComponentFlags color_write_mask;
+} SDL_GPUColorTargetBlendState;
 
 typedef struct SDL_GPUShaderCreateInfo
 {
-    size_t codeSize;
+    size_t code_size;
     const Uint8 *code;
-    const char *entryPointName;
+    const char *entrypoint;
     SDL_GPUShaderFormat format;
     SDL_GPUShaderStage stage;
-    Uint32 samplerCount;
-    Uint32 storageTextureCount;
-    Uint32 storageBufferCount;
-    Uint32 uniformBufferCount;
+    Uint32 num_samplers;
+    Uint32 num_storage_textures;
+    Uint32 num_storage_buffers;
+    Uint32 num_uniform_buffers;
 
     SDL_PropertiesID props;
 } SDL_GPUShaderCreateInfo;
@@ -1141,12 +1139,12 @@ typedef struct SDL_GPUTextureCreateInfo
 {
     SDL_GPUTextureType type;
     SDL_GPUTextureFormat format;
-    SDL_GPUTextureUsageFlags usageFlags;
+    SDL_GPUTextureUsageFlags usage;
     Uint32 width;
     Uint32 height;
-    Uint32 layerCountOrDepth;
-    Uint32 levelCount;
-    SDL_GPUSampleCount sampleCount;
+    Uint32 layer_count_or_depth;
+    Uint32 num_levels;
+    SDL_GPUSampleCount sample_count;
 
     SDL_PropertiesID props;
 } SDL_GPUTextureCreateInfo;
@@ -1160,8 +1158,8 @@ typedef struct SDL_GPUTextureCreateInfo
 
 typedef struct SDL_GPUBufferCreateInfo
 {
-    SDL_GPUBufferUsageFlags usageFlags;
-    Uint32 sizeInBytes;
+    SDL_GPUBufferUsageFlags usage;
+    Uint32 size;
 
     SDL_PropertiesID props;
 } SDL_GPUBufferCreateInfo;
@@ -1169,7 +1167,7 @@ typedef struct SDL_GPUBufferCreateInfo
 typedef struct SDL_GPUTransferBufferCreateInfo
 {
     SDL_GPUTransferBufferUsage usage;
-    Uint32 sizeInBytes;
+    Uint32 size;
 
     SDL_PropertiesID props;
 } SDL_GPUTransferBufferCreateInfo;
@@ -1178,97 +1176,97 @@ typedef struct SDL_GPUTransferBufferCreateInfo
 
 typedef struct SDL_GPURasterizerState
 {
-    SDL_GPUFillMode fillMode;
-    SDL_GPUCullMode cullMode;
-    SDL_GPUFrontFace frontFace;
-    SDL_bool depthBiasEnable;
+    SDL_GPUFillMode fill_mode;
+    SDL_GPUCullMode cull_mode;
+    SDL_GPUFrontFace front_face;
+    SDL_bool enable_depth_bias;
     Uint8 padding1;
     Uint8 padding2;
     Uint8 padding3;
-    float depthBiasConstantFactor;
-    float depthBiasClamp;
-    float depthBiasSlopeFactor;
+    float depth_bias_constant_factor;
+    float depth_bias_clamp;
+    float depth_bias_slope_factor;
 } SDL_GPURasterizerState;
 
 typedef struct SDL_GPUMultisampleState
 {
-    SDL_GPUSampleCount sampleCount;
-    Uint32 sampleMask;
+    SDL_GPUSampleCount sample_count;
+    Uint32 sample_mask;
 } SDL_GPUMultisampleState;
 
 typedef struct SDL_GPUDepthStencilState
 {
-    SDL_bool depthTestEnable;
-    SDL_bool depthWriteEnable;
-    SDL_bool stencilTestEnable;
+    SDL_bool enable_depth_test;
+    SDL_bool enable_depth_write;
+    SDL_bool enable_stencil_test;
     Uint8 padding1;
-    SDL_GPUCompareOp compareOp;
-    SDL_GPUStencilOpState backStencilState;
-    SDL_GPUStencilOpState frontStencilState;
-    Uint8 compareMask;
-    Uint8 writeMask;
+    SDL_GPUCompareOp compare_op;
+    SDL_GPUStencilOpState back_stencil_state;
+    SDL_GPUStencilOpState front_stencil_state;
+    Uint8 compare_mask;
+    Uint8 write_mask;
     Uint8 padding2;
     Uint8 padding3;
 } SDL_GPUDepthStencilState;
 
-typedef struct SDL_GPUColorAttachmentDescription
+typedef struct SDL_GPUColorTargetDescription
 {
     SDL_GPUTextureFormat format;
-    SDL_GPUColorAttachmentBlendState blendState;
-} SDL_GPUColorAttachmentDescription;
+    SDL_GPUColorTargetBlendState blend_state;
+} SDL_GPUColorTargetDescription;
 
-typedef struct SDL_GPUGraphicsPipelineAttachmentInfo
+typedef struct SDL_GpuGraphicsPipelineTargetInfo
 {
-    const SDL_GPUColorAttachmentDescription *colorAttachmentDescriptions;
-    Uint32 colorAttachmentCount;
-    SDL_bool hasDepthStencilAttachment;
+    const SDL_GPUColorTargetDescription *color_target_descriptions;
+    Uint32 num_color_targets;
+    SDL_bool has_depth_stencil_target;
     Uint8 padding1;
     Uint8 padding2;
     Uint8 padding3;
-    SDL_GPUTextureFormat depthStencilFormat;
-} SDL_GPUGraphicsPipelineAttachmentInfo;
+    SDL_GPUTextureFormat depth_stencil_format;
+} SDL_GpuGraphicsPipelineTargetInfo;
 
 typedef struct SDL_GPUGraphicsPipelineCreateInfo
 {
-    SDL_GPUShader *vertexShader;
-    SDL_GPUShader *fragmentShader;
-    SDL_GPUVertexInputState vertexInputState;
-    SDL_GPUPrimitiveType primitiveType;
-    SDL_GPURasterizerState rasterizerState;
-    SDL_GPUMultisampleState multisampleState;
-    SDL_GPUDepthStencilState depthStencilState;
-    SDL_GPUGraphicsPipelineAttachmentInfo attachmentInfo;
+    SDL_GPUShader *vertex_shader;
+    SDL_GPUShader *fragment_shader;
+    SDL_GPUVertexInputState vertex_input_state;
+    SDL_GPUPrimitiveType primitive_type;
+    SDL_GPURasterizerState rasterizer_state;
+    SDL_GPUMultisampleState multisample_state;
+    SDL_GPUDepthStencilState depth_stencil_state;
+    SDL_GpuGraphicsPipelineTargetInfo target_info;
 
     SDL_PropertiesID props;
 } SDL_GPUGraphicsPipelineCreateInfo;
 
 typedef struct SDL_GPUComputePipelineCreateInfo
 {
-    size_t codeSize;
+    size_t code_size;
     const Uint8 *code;
-    const char *entryPointName;
+    const char *entrypoint;
     SDL_GPUShaderFormat format;
-    Uint32 readOnlyStorageTextureCount;
-    Uint32 readOnlyStorageBufferCount;
-    Uint32 writeOnlyStorageTextureCount;
-    Uint32 writeOnlyStorageBufferCount;
-    Uint32 uniformBufferCount;
-    Uint32 threadCountX;
-    Uint32 threadCountY;
-    Uint32 threadCountZ;
+    Uint32 num_readonly_storage_textures;
+    Uint32 num_readonly_storage_buffers;
+    Uint32 num_writeonly_storage_textures;
+    Uint32 num_writeonly_storage_buffers;
+    Uint32 num_uniform_buffers;
+    Uint32 threadcount_x;
+    Uint32 threadcount_y;
+    Uint32 threadcount_z;
 
     SDL_PropertiesID props;
 } SDL_GPUComputePipelineCreateInfo;
 
-typedef struct SDL_GPUColorAttachmentInfo
+typedef struct SDL_GPUColorTargetInfo
 {
-    /* The texture that will be used as a color attachment by a render pass. */
+    /* The texture that will be used as a color target by a render pass. */
     SDL_GPUTexture *texture;
-    Uint32 mipLevel;
-    Uint32 layerOrDepthPlane; /* For 3D textures, you can bind an individual depth plane as an attachment. */
+    Uint32 mip_level;
+    Uint32 layer_or_depth_plane; /* For 3D textures, you can bind an individual depth plane as a target. */
 
     /* Can be ignored by RenderPass if CLEAR is not used */
-    SDL_FColor clearColor;
+    SDL_FColor clear_color;
 
     /* Determines what is done with the texture at the beginning of the render pass.
      *
@@ -1282,7 +1280,7 @@ typedef struct SDL_GPUColorAttachmentInfo
      *     The driver will do whatever it wants with the texture memory.
      *     This is a good option if you know that every single pixel will be touched in the render pass.
      */
-    SDL_GPULoadOp loadOp;
+    SDL_GPULoadOp load_op;
 
     /* Determines what is done with the texture at the end of the render pass.
      *
@@ -1293,22 +1291,22 @@ typedef struct SDL_GPUColorAttachmentInfo
      *     The driver will do whatever it wants with the texture memory.
      *     This is often a good option for depth/stencil textures.
      */
-    SDL_GPUStoreOp storeOp;
+    SDL_GPUStoreOp store_op;
 
-    /* if SDL_TRUE, cycles the texture if the texture is bound and loadOp is not LOAD */
+    /* if SDL_TRUE, cycles the texture if the texture is bound and load_op is not LOAD */
     SDL_bool cycle;
     Uint8 padding1;
     Uint8 padding2;
     Uint8 padding3;
-} SDL_GPUColorAttachmentInfo;
+} SDL_GPUColorTargetInfo;
 
-typedef struct SDL_GPUDepthStencilAttachmentInfo
+typedef struct SDL_GPUDepthStencilTargetInfo
 {
-    /* The texture that will be used as the depth stencil attachment by a render pass. */
+    /* The texture that will be used as the depth stencil target by a render pass. */
     SDL_GPUTexture *texture;
 
     /* Can be ignored by the render pass if CLEAR is not used */
-    SDL_GPUDepthStencilValue depthStencilClearValue;
+    SDL_GPUDepthStencilValue clear_value;
 
     /* Determines what is done with the depth values at the beginning of the render pass.
      *
@@ -1322,7 +1320,7 @@ typedef struct SDL_GPUDepthStencilAttachmentInfo
      *     The driver will do whatever it wants with the memory.
      *     This is a good option if you know that every single pixel will be touched in the render pass.
      */
-    SDL_GPULoadOp loadOp;
+    SDL_GPULoadOp load_op;
 
     /* Determines what is done with the depth values at the end of the render pass.
      *
@@ -1333,7 +1331,7 @@ typedef struct SDL_GPUDepthStencilAttachmentInfo
      *     The driver will do whatever it wants with the texture memory.
      *     This is often a good option for depth/stencil textures.
      */
-    SDL_GPUStoreOp storeOp;
+    SDL_GPUStoreOp store_op;
 
     /* Determines what is done with the stencil values at the beginning of the render pass.
      *
@@ -1347,7 +1345,7 @@ typedef struct SDL_GPUDepthStencilAttachmentInfo
      *     The driver will do whatever it wants with the memory.
      *     This is a good option if you know that every single pixel will be touched in the render pass.
      */
-    SDL_GPULoadOp stencilLoadOp;
+    SDL_GPULoadOp stencil_load_op;
 
     /* Determines what is done with the stencil values at the end of the render pass.
      *
@@ -1358,14 +1356,14 @@ typedef struct SDL_GPUDepthStencilAttachmentInfo
      *     The driver will do whatever it wants with the texture memory.
      *     This is often a good option for depth/stencil textures.
      */
-    SDL_GPUStoreOp stencilStoreOp;
+    SDL_GPUStoreOp stencil_store_op;
 
     /* if SDL_TRUE, cycles the texture if the texture is bound and any load ops are not LOAD */
     SDL_bool cycle;
     Uint8 padding1;
     Uint8 padding2;
     Uint8 padding3;
-} SDL_GPUDepthStencilAttachmentInfo;
+} SDL_GPUDepthStencilTargetInfo;
 
 /* Binding structs */
 
@@ -1395,7 +1393,7 @@ typedef struct SDL_GPUStorageBufferWriteOnlyBinding
 typedef struct SDL_GPUStorageTextureWriteOnlyBinding
 {
     SDL_GPUTexture *texture;
-    Uint32 mipLevel;
+    Uint32 mip_level;
     Uint32 layer;
 
     /* if SDL_TRUE, cycles the texture if the texture is bound. */
@@ -1412,9 +1410,9 @@ typedef struct SDL_GPUStorageTextureWriteOnlyBinding
 /**
  * Creates a GPU context.
  *
- * \param formatFlags a bitflag indicating which shader formats the app is
+ * \param format_flags a bitflag indicating which shader formats the app is
  *                    able to provide.
- * \param debugMode enable debug mode properties and validations.
+ * \param debug_mode enable debug mode properties and validations.
  * \param name the preferred GPU driver, or NULL to let SDL pick the optimal
  *             driver.
  * \returns a GPU context on success or NULL on failure.
@@ -1425,8 +1423,8 @@ typedef struct SDL_GPUStorageTextureWriteOnlyBinding
  * \sa SDL_DestroyGPUDevice
  */
 extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice(
-    SDL_GPUShaderFormat formatFlags,
-    SDL_bool debugMode,
+    SDL_GPUShaderFormat format_flags,
+    SDL_bool debug_mode,
     const char *name);
 
 /**
@@ -1542,8 +1540,7 @@ extern SDL_DECLSPEC SDL_GPUDriver SDLCALL SDL_GetGPUDriver(SDL_GPUDevice *device
  *   textures
  *
  * \param device a GPU Context.
- * \param computePipelineCreateInfo a struct describing the state of the
- *                                  requested compute pipeline.
+ * \param createinfo a struct describing the state of the compute pipeline to create.
  * \returns a compute pipeline object on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1553,14 +1550,13 @@ extern SDL_DECLSPEC SDL_GPUDriver SDLCALL SDL_GetGPUDriver(SDL_GPUDevice *device
  */
 extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline(
     SDL_GPUDevice *device,
-    const SDL_GPUComputePipelineCreateInfo *computePipelineCreateInfo);
+    const SDL_GPUComputePipelineCreateInfo *createinfo);
 
 /**
  * Creates a pipeline object to be used in a graphics workflow.
  *
  * \param device a GPU Context.
- * \param pipelineCreateInfo a struct describing the state of the desired
- *                           graphics pipeline.
+ * \param createinfo a struct describing the state of the graphics pipeline to create.
  * \returns a graphics pipeline object on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1571,15 +1567,14 @@ extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline
  */
 extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeline(
     SDL_GPUDevice *device,
-    const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo);
+    const SDL_GPUGraphicsPipelineCreateInfo *createinfo);
 
 /**
  * Creates a sampler object to be used when binding textures in a graphics
  * workflow.
  *
  * \param device a GPU Context.
- * \param samplerCreateInfo a struct describing the state of the desired
- *                          sampler.
+ * \param createinfo a struct describing the state of the sampler to create.
  * \returns a sampler object on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1590,7 +1585,7 @@ extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeli
  */
 extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
     SDL_GPUDevice *device,
-    const SDL_GPUSamplerCreateInfo *samplerCreateInfo);
+    const SDL_GPUSamplerCreateInfo *createinfo);
 
 /**
  * Creates a shader to be used when creating a graphics pipeline.
@@ -1648,8 +1643,7 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
  *   information from the SDL_GPUPipeline.
  *
  * \param device a GPU Context.
- * \param shaderCreateInfo a struct describing the state of the desired
- *                         shader.
+ * \param createinfo a struct describing the state of the shader to create.
  * \returns a shader object on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1659,7 +1653,7 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
  */
 extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader(
     SDL_GPUDevice *device,
-    const SDL_GPUShaderCreateInfo *shaderCreateInfo);
+    const SDL_GPUShaderCreateInfo *createinfo);
 
 /**
  * Creates a texture object to be used in graphics or compute workflows.
@@ -1675,8 +1669,7 @@ extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader(
  * count.
  *
  * \param device a GPU Context.
- * \param textureCreateInfo a struct describing the state of the texture to
- *                          create.
+ * \param createinfo a struct describing the state of the texture to create.
  * \returns a texture object on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1694,7 +1687,7 @@ extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader(
  */
 extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture(
     SDL_GPUDevice *device,
-    const SDL_GPUTextureCreateInfo *textureCreateInfo);
+    const SDL_GPUTextureCreateInfo *createinfo);
 
 /**
  * Creates a buffer object to be used in graphics or compute workflows.
@@ -1706,8 +1699,7 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture(
  * buffer cannot have both the VERTEX and INDEX flags.
  *
  * \param device a GPU Context.
- * \param bufferCreateInfo a struct describing the state of the buffer to
- *                         create.
+ * \param createinfo a struct describing the state of the buffer to create.
  * \returns a buffer object on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1728,15 +1720,14 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture(
  */
 extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer(
     SDL_GPUDevice *device,
-    const SDL_GPUBufferCreateInfo *bufferCreateInfo);
+    const SDL_GPUBufferCreateInfo *createinfo);
 
 /**
  * Creates a transfer buffer to be used when uploading to or downloading from
  * graphics resources.
  *
  * \param device a GPU Context.
- * \param transferBufferCreateInfo a struct describing the state of the
- *                                 transfer buffer to create.
+ * \param createinfo a struct describing the state of the transfer buffer to create.
  * \returns a transfer buffer on success, or NULL on failure.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1749,7 +1740,7 @@ extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer(
  */
 extern SDL_DECLSPEC SDL_GPUTransferBuffer *SDLCALL SDL_CreateGPUTransferBuffer(
     SDL_GPUDevice *device,
-    const SDL_GPUTransferBufferCreateInfo *transferBufferCreateInfo);
+    const SDL_GPUTransferBufferCreateInfo *createinfo);
 
 /* Debug Naming */
 
@@ -1790,13 +1781,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUTextureName(
  *
  * Useful for debugging.
  *
- * \param commandBuffer a command buffer.
+ * \param command_buffer a command buffer.
  * \param text a UTF-8 string constant to insert as the label.
  *
  * \since This function is available since SDL 3.0.0.
  */
 extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel(
-    SDL_GPUCommandBuffer *commandBuffer,
+    SDL_GPUCommandBuffer *command_buffer,
     const char *text);
 
 /**
@@ -1813,7 +1804,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel(
  * pass rather than the command buffer. For best results, if you push a debug
  * group during a pass, always pop it in the same pass.
  *
- * \param commandBuffer a command buffer.
+ * \param command_buffer a command buffer.
  * \param name a UTF-8 string constant that names the group.
  *
  * \since This function is available since SDL 3.0.0.
@@ -1821,20 +1812,20 @@ extern SDL_DECLSPEC void SDLCALL SDL_InsertGPUDebugLabel(
  * \sa SDL_PopGPUDebugGroup
  */
 extern SDL_DECLSPEC void SDLCALL SDL_PushGPUDebugGroup(
-    SDL_GPUCommandBuffer *commandBuffer,
+    SDL_GPUCommandBuffer *command_buffer,
     const char *name);
 
 /**
  * Ends the most-recently pushed debug group.
  *
- * \param commandBuffer a command buffer.
+ * \param command_buffer a command buffer.
  *
  * \since This function is available since SDL 3.0.0.
  *
  * \sa SDL_PushGPUDebugGroup
  */
 extern SDL_DECLSPEC void SDLCALL SDL_PopGPUDebugGroup(
-    SDL_GPUCommandBuffer *commandBuffer);
+    SDL_GPUCommandBuffer *command_buffer);
 
 /* Disposal */
 
@@ -1886,13 +1877,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUBuffer(
  * You must not reference the transfer buffer after calling this function.
  *
  * \param device a GPU context.
- * \param transferBuffer a transfer buffer to be destroyed.
+ * \param transfer_buffer a transfer buffer to be destroyed.
  *
  * \since This function is available since SDL 3.0.0.
  */
 extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTransferBuffer(
     SDL_GPUDevice *device,
-    SDL_GPUTransferBuffer *transferBuffer);
+    SDL_GPUTransferBuffer *transfer_buffer);
 
 /**
  * Frees the given compute pipeline as soon as it is safe to do so.
@@ -1900,13 +1891,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUTransferBuffer(
  * You must not reference the compute pipeline after calling this function.
  *
  * \param device a GPU context.
- * \param computePipeline a compute pipeline to be destroyed.
+ * \param compute_pipeline a compute pipeline to be destroyed.
  *
  * \since This function is available since SDL 3.0.0.
  */
 extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUComputePipeline(
     SDL_GPUDevice *device,
-    SDL_GPUComputePipeline *computePipeline);
+    SDL_GPUComputePipeline *compute_pipeline);
 
 /**
  * Frees the given shader as soon as it is safe to do so.
@@ -1928,13 +1919,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUShader(
  * You must not reference the graphics pipeline after calling this function.
  *
  * \param device a GPU context.
- * \param graphicsPipeline a graphics pipeline to be destroyed.
+ * \param graphics_pipeline a graphics pipeline to be destroyed.
  *
  * \since This function is available since SDL 3.0.0.
  */
 extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUGraphicsPipeline(
     SDL_GPUDevice *device,
-    SDL_GPUGraphicsPipeline *graphicsPipeline);
+    SDL_GPUGraphicsPipeline *graphics_pipeline);
 
 /**
  * Acquire a command buffer.
@@ -1980,54 +1971,54 @@ extern SDL_DECLSPEC SDL_GPUCommandBuffer *SDLCALL SDL_AcquireGPUCommandBuffer(
  *
  * Subsequent draw calls will use this uniform data.
  *
- * \param commandBuffer a command buffer.
- * \param slotIndex the vertex uniform slot to push data to.
+ * \param command_buffer a command buffer.
+ * \param slot_index the vertex uniform slot to push data to.
  * \param data client data to write.
- * \param dataLengthInBytes the length of the data to write.
+ * \param length the length of the data to write.
  *
  * \since This function is available since SDL 3.0.0.
  */
 extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData(
-    SDL_GPUCommandBuffer *commandBuffer,
-    Uint32 slotIndex,
+    SDL_GPUCommandBuffer *command_buffer,
+    Uint32 slot_index,
     const void *data,
-    Uint32 dataLengthInBytes);
+    Uint32 length);
 
 /**
  * Pushes data to a fragment uniform slot on the command buffer.
  *
  * Subsequent draw calls will use this uniform data.
  *
- * \param commandBuffer a command buffer.
- * \param slotIndex the fragment uniform slot to push data to.
+ * \param command_buffer a command buffer.
+ * \param slot_index the fragment uniform slot to push data to.
  * \param data client data to write.
- * \param dataLengthInBytes the length of the data to write.
+ * \param length the length of the data to write.
  *
  * \since This function is available since SDL 3.0.0.
  */
 extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData(
-    SDL_GPUCommandBuffer *commandBuffer,
-    Uint32 slotIndex,
+    SDL_GPUCommandBuffer *command_buffer,
+    Uint32 slot_index,
     const void *data,
-    Uint32 dataLengthInBytes);
+    Uint32 length);
 
 /**
  * Pushes data to a uniform slot on the command buffer.
  *
  * Subs

(Patch may be truncated, please check the link at the top of this post.)