mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 05:58:29 +00:00
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`.
This commit is contained in:

committed by
Sam Lantinga

parent
249a74e436
commit
f61d4db39a
@@ -1158,7 +1158,7 @@ typedef struct SDL_GPUColorAttachmentDescription
|
|||||||
|
|
||||||
typedef struct SDL_GPUGraphicsPipelineAttachmentInfo
|
typedef struct SDL_GPUGraphicsPipelineAttachmentInfo
|
||||||
{
|
{
|
||||||
SDL_GPUColorAttachmentDescription *colorAttachmentDescriptions;
|
const SDL_GPUColorAttachmentDescription *colorAttachmentDescriptions;
|
||||||
Uint32 colorAttachmentCount;
|
Uint32 colorAttachmentCount;
|
||||||
SDL_bool hasDepthStencilAttachment;
|
SDL_bool hasDepthStencilAttachment;
|
||||||
SDL_GPUTextureFormat depthStencilFormat;
|
SDL_GPUTextureFormat depthStencilFormat;
|
||||||
|
@@ -1250,7 +1250,7 @@ static void D3D11_ReleaseGraphicsPipeline(
|
|||||||
static ID3D11BlendState *D3D11_INTERNAL_FetchBlendState(
|
static ID3D11BlendState *D3D11_INTERNAL_FetchBlendState(
|
||||||
D3D11Renderer *renderer,
|
D3D11Renderer *renderer,
|
||||||
Uint32 numColorAttachments,
|
Uint32 numColorAttachments,
|
||||||
SDL_GPUColorAttachmentDescription *colorAttachments)
|
const SDL_GPUColorAttachmentDescription *colorAttachments)
|
||||||
{
|
{
|
||||||
ID3D11BlendState *result;
|
ID3D11BlendState *result;
|
||||||
D3D11_BLEND_DESC blendDesc;
|
D3D11_BLEND_DESC blendDesc;
|
||||||
|
@@ -997,7 +997,7 @@ static SDL_GPUGraphicsPipeline *METAL_CreateGraphicsPipeline(
|
|||||||
MetalShader *vertexShader = (MetalShader *)pipelineCreateInfo->vertexShader;
|
MetalShader *vertexShader = (MetalShader *)pipelineCreateInfo->vertexShader;
|
||||||
MetalShader *fragmentShader = (MetalShader *)pipelineCreateInfo->fragmentShader;
|
MetalShader *fragmentShader = (MetalShader *)pipelineCreateInfo->fragmentShader;
|
||||||
MTLRenderPipelineDescriptor *pipelineDescriptor;
|
MTLRenderPipelineDescriptor *pipelineDescriptor;
|
||||||
SDL_GPUColorAttachmentBlendState *blendState;
|
const SDL_GPUColorAttachmentBlendState *blendState;
|
||||||
MTLVertexDescriptor *vertexDescriptor;
|
MTLVertexDescriptor *vertexDescriptor;
|
||||||
Uint32 binding;
|
Uint32 binding;
|
||||||
MTLDepthStencilDescriptor *depthStencilDescriptor;
|
MTLDepthStencilDescriptor *depthStencilDescriptor;
|
||||||
|
Reference in New Issue
Block a user