mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-28 07:29:09 +00:00
GPU: Add const to some function parameters (#10694)
This commit is contained in:
parent
f317581c91
commit
1788be8547
8 changed files with 328 additions and 326 deletions
|
@ -1075,7 +1075,7 @@ extern SDL_DECLSPEC SDL_GPUDriver SDLCALL SDL_GetGPUDriver(SDL_GPUDevice *device
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUComputePipelineCreateInfo *computePipelineCreateInfo);
|
||||
const SDL_GPUComputePipelineCreateInfo *computePipelineCreateInfo);
|
||||
|
||||
/**
|
||||
* Creates a pipeline object to be used in a graphics workflow.
|
||||
|
@ -1093,7 +1093,7 @@ extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeline(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo);
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo);
|
||||
|
||||
/**
|
||||
* Creates a sampler object to be used when binding textures in a graphics
|
||||
|
@ -1112,7 +1112,7 @@ extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeli
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo);
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo);
|
||||
|
||||
/**
|
||||
* Creates a shader to be used when creating a graphics pipeline.
|
||||
|
@ -1159,7 +1159,7 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler(
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo);
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo);
|
||||
|
||||
/**
|
||||
* Creates a texture object to be used in graphics or compute workflows.
|
||||
|
@ -1194,7 +1194,7 @@ extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader(
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo);
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo);
|
||||
|
||||
/**
|
||||
* Creates a buffer object to be used in graphics or compute workflows.
|
||||
|
@ -1222,7 +1222,7 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture(
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUBufferCreateInfo *bufferCreateInfo);
|
||||
const SDL_GPUBufferCreateInfo *bufferCreateInfo);
|
||||
|
||||
/**
|
||||
* Creates a transfer buffer to be used when uploading to or downloading from
|
||||
|
@ -1243,7 +1243,7 @@ extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer(
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUTransferBuffer *SDLCALL SDL_CreateGPUTransferBuffer(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTransferBufferCreateInfo *transferBufferCreateInfo);
|
||||
const SDL_GPUTransferBufferCreateInfo *transferBufferCreateInfo);
|
||||
|
||||
/* Debug Naming */
|
||||
|
||||
|
@ -1607,9 +1607,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUComputeUniformData(
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPURenderPass *SDLCALL SDL_BeginGPURenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo);
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo);
|
||||
|
||||
/**
|
||||
* Binds a graphics pipeline on a render pass to be used in rendering.
|
||||
|
@ -1635,7 +1635,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUGraphicsPipeline(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_SetGPUViewport(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_GPUViewport *viewport);
|
||||
const SDL_GPUViewport *viewport);
|
||||
|
||||
/**
|
||||
* Sets the current scissor state on a command buffer.
|
||||
|
@ -1647,7 +1647,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUViewport(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_SetGPUScissor(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_Rect *scissor);
|
||||
const SDL_Rect *scissor);
|
||||
|
||||
/**
|
||||
* Binds vertex buffers on a command buffer for use with subsequent draw
|
||||
|
@ -1664,7 +1664,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetGPUScissor(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1681,7 +1681,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexBuffers(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize);
|
||||
|
||||
/**
|
||||
|
@ -1700,7 +1700,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1719,7 +1719,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1738,7 +1738,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1757,7 +1757,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1776,7 +1776,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1795,7 +1795,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/* Drawing */
|
||||
|
@ -1949,9 +1949,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPURenderPass(
|
|||
*/
|
||||
extern SDL_DECLSPEC SDL_GPUComputePass *SDLCALL SDL_BeginGPUComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount);
|
||||
|
||||
/**
|
||||
|
@ -1982,7 +1982,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
||||
SDL_GPUComputePass *computePass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -2001,7 +2001,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers(
|
||||
SDL_GPUComputePass *computePass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
/**
|
||||
|
@ -2133,8 +2133,8 @@ extern SDL_DECLSPEC SDL_GPUCopyPass *SDLCALL SDL_BeginGPUCopyPass(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUTexture(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
SDL_bool cycle);
|
||||
|
||||
/* Uploads data from a TransferBuffer to a Buffer. */
|
||||
|
@ -2155,8 +2155,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUTexture(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
SDL_bool cycle);
|
||||
|
||||
/**
|
||||
|
@ -2178,8 +2178,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_UploadToGPUBuffer(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUTextureToTexture(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -2204,8 +2204,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUTextureToTexture(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUBufferToBuffer(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
SDL_bool cycle);
|
||||
|
||||
|
@ -2224,8 +2224,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_CopyGPUBufferToBuffer(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUTexture(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination);
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination);
|
||||
|
||||
/**
|
||||
* Copies data from a buffer to a transfer buffer on the GPU timeline.
|
||||
|
@ -2241,8 +2241,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUTexture(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_DownloadFromGPUBuffer(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination);
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination);
|
||||
|
||||
/**
|
||||
* Ends the current copy pass.
|
||||
|
@ -2285,8 +2285,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_GenerateMipmapsForGPUTexture(
|
|||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_BlitGPUTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
SDL_bool cycle);
|
||||
|
@ -2515,7 +2515,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitForGPUIdle(
|
|||
extern SDL_DECLSPEC void SDLCALL SDL_WaitForGPUFences(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount);
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,24 +68,24 @@ SDL_DYNAPI_PROC(int,SDL_AtomicSet,(SDL_AtomicInt *a, int b),(a,b),return)
|
|||
SDL_DYNAPI_PROC(void*,SDL_AtomicSetPointer,(void **a, void *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_AttachVirtualJoystick,(const SDL_VirtualJoystickDesc *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_AudioDevicePaused,(SDL_AudioDeviceID a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUComputePass*,SDL_BeginGPUComputePass,(SDL_GPUCommandBuffer *a, SDL_GPUStorageTextureWriteOnlyBinding *b, Uint32 c, SDL_GPUStorageBufferWriteOnlyBinding *d, Uint32 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUComputePass*,SDL_BeginGPUComputePass,(SDL_GPUCommandBuffer *a, const SDL_GPUStorageTextureWriteOnlyBinding *b, Uint32 c, const SDL_GPUStorageBufferWriteOnlyBinding *d, Uint32 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUCopyPass*,SDL_BeginGPUCopyPass,(SDL_GPUCommandBuffer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPURenderPass*,SDL_BeginGPURenderPass,(SDL_GPUCommandBuffer *a, SDL_GPUColorAttachmentInfo *b, Uint32 c, SDL_GPUDepthStencilAttachmentInfo *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPURenderPass*,SDL_BeginGPURenderPass,(SDL_GPUCommandBuffer *a, const SDL_GPUColorAttachmentInfo *b, Uint32 c, const SDL_GPUDepthStencilAttachmentInfo *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_BindAudioStream,(SDL_AudioDeviceID a, SDL_AudioStream *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_BindAudioStreams,(SDL_AudioDeviceID a, SDL_AudioStream **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUComputePipeline,(SDL_GPUComputePass *a, SDL_GPUComputePipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUComputeStorageBuffers,(SDL_GPUComputePass *a, Uint32 b, SDL_GPUBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUComputeStorageTextures,(SDL_GPUComputePass *a, Uint32 b, SDL_GPUTexture **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUFragmentSamplers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTextureSamplerBinding *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUFragmentStorageBuffers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUFragmentStorageTextures,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTexture **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUComputeStorageBuffers,(SDL_GPUComputePass *a, Uint32 b, SDL_GPUBuffer *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUComputeStorageTextures,(SDL_GPUComputePass *a, Uint32 b, SDL_GPUTexture *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUFragmentSamplers,(SDL_GPURenderPass *a, Uint32 b, const SDL_GPUTextureSamplerBinding *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUFragmentStorageBuffers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUBuffer *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUFragmentStorageTextures,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTexture *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUGraphicsPipeline,(SDL_GPURenderPass *a, SDL_GPUGraphicsPipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUIndexBuffer,(SDL_GPURenderPass *a, SDL_GPUBufferBinding *b, SDL_GPUIndexElementSize c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexBuffers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUBufferBinding *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexSamplers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTextureSamplerBinding *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexStorageBuffers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexStorageTextures,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTexture **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BlitGPUTexture,(SDL_GPUCommandBuffer *a, SDL_GPUBlitRegion *b, SDL_GPUBlitRegion *c, SDL_FlipMode d, SDL_GPUFilter e, SDL_bool f),(a,b,c,d,e,f),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUIndexBuffer,(SDL_GPURenderPass *a, const SDL_GPUBufferBinding *b, SDL_GPUIndexElementSize c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexBuffers,(SDL_GPURenderPass *a, Uint32 b, const SDL_GPUBufferBinding *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexSamplers,(SDL_GPURenderPass *a, Uint32 b, const SDL_GPUTextureSamplerBinding *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexStorageBuffers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUBuffer *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BindGPUVertexStorageTextures,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTexture *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BlitGPUTexture,(SDL_GPUCommandBuffer *a, const SDL_GPUBlitRegion *b, const SDL_GPUBlitRegion *c, SDL_FlipMode d, SDL_GPUFilter e, SDL_bool f),(a,b,c,d,e,f),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_BlitSurface,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_BlitSurface9Grid,(SDL_Surface *a, const SDL_Rect *b, int c, int d, int e, int f, float g, SDL_ScaleMode h, SDL_Surface *i, const SDL_Rect *j),(a,b,c,d,e,f,g,h,i,j),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_BlitSurfaceScaled,(SDL_Surface *a, const SDL_Rect *b, SDL_Surface *c, const SDL_Rect *d, SDL_ScaleMode e),(a,b,c,d,e),return)
|
||||
|
@ -119,8 +119,8 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_ConvertPixelsAndColorspace,(int a, int b, SDL_Pixel
|
|||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurface,(SDL_Surface *a, SDL_PixelFormat b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Surface*,SDL_ConvertSurfaceAndColorspace,(SDL_Surface *a, SDL_PixelFormat b, SDL_Palette *c, SDL_Colorspace d, SDL_PropertiesID e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_CopyFile,(const char *a, const char *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_CopyGPUBufferToBuffer,(SDL_GPUCopyPass *a, SDL_GPUBufferLocation *b, SDL_GPUBufferLocation *c, Uint32 d, SDL_bool e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_CopyGPUTextureToTexture,(SDL_GPUCopyPass *a, SDL_GPUTextureLocation *b, SDL_GPUTextureLocation *c, Uint32 d, Uint32 e, Uint32 f, SDL_bool g),(a,b,c,d,e,f,g),)
|
||||
SDL_DYNAPI_PROC(void,SDL_CopyGPUBufferToBuffer,(SDL_GPUCopyPass *a, const SDL_GPUBufferLocation *b, const SDL_GPUBufferLocation *c, Uint32 d, SDL_bool e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_CopyGPUTextureToTexture,(SDL_GPUCopyPass *a, const SDL_GPUTextureLocation *b, const SDL_GPUTextureLocation *c, Uint32 d, Uint32 e, Uint32 f, SDL_bool g),(a,b,c,d,e,f,g),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_CopyProperties,(SDL_PropertiesID a, SDL_PropertiesID b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_CopyStorageFile,(SDL_Storage *a, const char *b, const char *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_AudioStream*,SDL_CreateAudioStream,(const SDL_AudioSpec *a, const SDL_AudioSpec *b),(a,b),return)
|
||||
|
@ -128,15 +128,15 @@ SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateColorCursor,(SDL_Surface *a, int b, int c)
|
|||
SDL_DYNAPI_PROC(SDL_Condition*,SDL_CreateCondition,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_CreateCursor,(const Uint8 *a, const Uint8 *b, int c, int d, int e, int f),(a,b,c,d,e,f),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_CreateDirectory,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUBuffer*,SDL_CreateGPUBuffer,(SDL_GPUDevice *a, SDL_GPUBufferCreateInfo* b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUComputePipeline*,SDL_CreateGPUComputePipeline,(SDL_GPUDevice *a, SDL_GPUComputePipelineCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUBuffer*,SDL_CreateGPUBuffer,(SDL_GPUDevice *a, const SDL_GPUBufferCreateInfo* b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUComputePipeline*,SDL_CreateGPUComputePipeline,(SDL_GPUDevice *a, const SDL_GPUComputePipelineCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDevice,(SDL_GPUShaderFormat a, SDL_bool b, const char *c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDeviceWithProperties,(SDL_PropertiesID a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUGraphicsPipeline*,SDL_CreateGPUGraphicsPipeline,(SDL_GPUDevice *a, SDL_GPUGraphicsPipelineCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUSampler*,SDL_CreateGPUSampler,(SDL_GPUDevice *a, SDL_GPUSamplerCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUShader*,SDL_CreateGPUShader,(SDL_GPUDevice *a, SDL_GPUShaderCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUTexture*,SDL_CreateGPUTexture,(SDL_GPUDevice *a, SDL_GPUTextureCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUTransferBuffer*,SDL_CreateGPUTransferBuffer,(SDL_GPUDevice *a, SDL_GPUTransferBufferCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUGraphicsPipeline*,SDL_CreateGPUGraphicsPipeline,(SDL_GPUDevice *a, const SDL_GPUGraphicsPipelineCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUSampler*,SDL_CreateGPUSampler,(SDL_GPUDevice *a, const SDL_GPUSamplerCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUShader*,SDL_CreateGPUShader,(SDL_GPUDevice *a, const SDL_GPUShaderCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUTexture*,SDL_CreateGPUTexture,(SDL_GPUDevice *a, const SDL_GPUTextureCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUTransferBuffer*,SDL_CreateGPUTransferBuffer,(SDL_GPUDevice *a, const SDL_GPUTransferBufferCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_CreateHapticEffect,(SDL_Haptic *a, const SDL_HapticEffect *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_Mutex*,SDL_CreateMutex,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Palette*,SDL_CreatePalette,(int a),(a),return)
|
||||
|
@ -184,8 +184,8 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_DetachVirtualJoystick,(SDL_JoystickID a),(a),return
|
|||
SDL_DYNAPI_PROC(SDL_bool,SDL_DisableScreenSaver,(void),(),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DispatchGPUCompute,(SDL_GPUComputePass *a, Uint32 b, Uint32 c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DispatchGPUComputeIndirect,(SDL_GPUComputePass *a, SDL_GPUBuffer *b, Uint32 c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DownloadFromGPUBuffer,(SDL_GPUCopyPass *a, SDL_GPUBufferRegion *b, SDL_GPUTransferBufferLocation *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DownloadFromGPUTexture,(SDL_GPUCopyPass *a, SDL_GPUTextureRegion *b, SDL_GPUTextureTransferInfo *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DownloadFromGPUBuffer,(SDL_GPUCopyPass *a, const SDL_GPUBufferRegion *b, const SDL_GPUTransferBufferLocation *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DownloadFromGPUTexture,(SDL_GPUCopyPass *a, const SDL_GPUTextureRegion *b, const SDL_GPUTextureTransferInfo *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DrawGPUIndexedPrimitives,(SDL_GPURenderPass *a, Uint32 b, Uint32 c, Uint32 d, Sint32 e, Uint32 f),(a,b,c,d,e,f),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DrawGPUIndexedPrimitivesIndirect,(SDL_GPURenderPass *a, SDL_GPUBuffer *b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DrawGPUPrimitives,(SDL_GPURenderPass *a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),)
|
||||
|
@ -814,10 +814,10 @@ SDL_DYNAPI_PROC(void,SDL_SetEventEnabled,(Uint32 a, SDL_bool b),(a,b),)
|
|||
SDL_DYNAPI_PROC(void,SDL_SetEventFilter,(SDL_EventFilter a, void *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetFloatProperty,(SDL_PropertiesID a, const char *b, float c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUBufferName,(SDL_GPUDevice *a, SDL_GPUBuffer *b, const char *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUScissor,(SDL_GPURenderPass *a, SDL_Rect *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUScissor,(SDL_GPURenderPass *a, const SDL_Rect *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetGPUSwapchainParameters,(SDL_GPUDevice *a, SDL_Window *b, SDL_GPUSwapchainComposition c, SDL_GPUPresentMode d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUTextureName,(SDL_GPUDevice *a, SDL_GPUTexture *b, const char *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUViewport,(SDL_GPURenderPass *a, SDL_GPUViewport *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUViewport,(SDL_GPURenderPass *a, const SDL_GPUViewport *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGamepadEventsEnabled,(SDL_bool a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetGamepadLED,(SDL_Gamepad *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SetGamepadMapping,(SDL_JoystickID a, const char *b),(a,b),return)
|
||||
|
@ -963,8 +963,8 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, c
|
|||
SDL_DYNAPI_PROC(SDL_bool,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UploadToGPUBuffer,(SDL_GPUCopyPass *a, SDL_GPUTransferBufferLocation *b, SDL_GPUBufferRegion *c, SDL_bool d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_UploadToGPUTexture,(SDL_GPUCopyPass *a, SDL_GPUTextureTransferInfo *b, SDL_GPUTextureRegion *c, SDL_bool d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_UploadToGPUBuffer,(SDL_GPUCopyPass *a, const SDL_GPUTransferBufferLocation *b, const SDL_GPUBufferRegion *c, SDL_bool d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_UploadToGPUTexture,(SDL_GPUCopyPass *a, const SDL_GPUTextureTransferInfo *b, const SDL_GPUTextureRegion *c, SDL_bool d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, const struct VkAllocationCallbacks *c, VkSurfaceKHR *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Vulkan_DestroySurface,(VkInstance a, VkSurfaceKHR b, const struct VkAllocationCallbacks *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(char const* const*,SDL_Vulkan_GetInstanceExtensions,(Uint32 *a),(a),return)
|
||||
|
@ -976,7 +976,7 @@ SDL_DYNAPI_PROC(void,SDL_WaitCondition,(SDL_Condition *a, SDL_Mutex *b),(a,b),)
|
|||
SDL_DYNAPI_PROC(SDL_bool,SDL_WaitConditionTimeout,(SDL_Condition *a, SDL_Mutex *b, Sint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_WaitEvent,(SDL_Event *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_WaitEventTimeout,(SDL_Event *a, Sint32 b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitForGPUFences,(SDL_GPUDevice *a, SDL_bool b, SDL_GPUFence **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitForGPUFences,(SDL_GPUDevice *a, SDL_bool b, SDL_GPUFence *const *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitForGPUIdle,(SDL_GPUDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitSemaphore,(SDL_Semaphore *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_WaitSemaphoreTimeout,(SDL_Semaphore *a, Sint32 b),(a,b),return)
|
||||
|
|
|
@ -226,8 +226,8 @@ SDL_GPUGraphicsPipeline *SDL_GPU_FetchBlitPipeline(
|
|||
|
||||
void SDL_GPU_BlitCommon(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle,
|
||||
|
@ -600,7 +600,7 @@ SDL_bool SDL_GPUTextureSupportsSampleCount(
|
|||
|
||||
SDL_GPUComputePipeline *SDL_CreateGPUComputePipeline(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUComputePipelineCreateInfo *computePipelineCreateInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *computePipelineCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (computePipelineCreateInfo == NULL) {
|
||||
|
@ -637,7 +637,7 @@ SDL_GPUComputePipeline *SDL_CreateGPUComputePipeline(
|
|||
|
||||
SDL_GPUGraphicsPipeline *SDL_CreateGPUGraphicsPipeline(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *graphicsPipelineCreateInfo)
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *graphicsPipelineCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (graphicsPipelineCreateInfo == NULL) {
|
||||
|
@ -669,7 +669,7 @@ SDL_GPUGraphicsPipeline *SDL_CreateGPUGraphicsPipeline(
|
|||
|
||||
SDL_GPUSampler *SDL_CreateGPUSampler(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (samplerCreateInfo == NULL) {
|
||||
|
@ -684,7 +684,7 @@ SDL_GPUSampler *SDL_CreateGPUSampler(
|
|||
|
||||
SDL_GPUShader *SDL_CreateGPUShader(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (shaderCreateInfo == NULL) {
|
||||
|
@ -706,7 +706,7 @@ SDL_GPUShader *SDL_CreateGPUShader(
|
|||
|
||||
SDL_GPUTexture *SDL_CreateGPUTexture(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (textureCreateInfo == NULL) {
|
||||
|
@ -820,7 +820,7 @@ SDL_GPUTexture *SDL_CreateGPUTexture(
|
|||
|
||||
SDL_GPUBuffer *SDL_CreateGPUBuffer(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUBufferCreateInfo *bufferCreateInfo)
|
||||
const SDL_GPUBufferCreateInfo *bufferCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (bufferCreateInfo == NULL) {
|
||||
|
@ -836,7 +836,7 @@ SDL_GPUBuffer *SDL_CreateGPUBuffer(
|
|||
|
||||
SDL_GPUTransferBuffer *SDL_CreateGPUTransferBuffer(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTransferBufferCreateInfo *transferBufferCreateInfo)
|
||||
const SDL_GPUTransferBufferCreateInfo *transferBufferCreateInfo)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, NULL);
|
||||
if (transferBufferCreateInfo == NULL) {
|
||||
|
@ -1168,9 +1168,9 @@ void SDL_PushGPUComputeUniformData(
|
|||
|
||||
SDL_GPURenderPass *SDL_BeginGPURenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
CommandBufferCommonHeader *commandBufferHeader;
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ void SDL_BindGPUGraphicsPipeline(
|
|||
|
||||
void SDL_SetGPUViewport(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
SDL_InvalidParamError("renderPass");
|
||||
|
@ -1261,7 +1261,7 @@ void SDL_SetGPUViewport(
|
|||
|
||||
void SDL_SetGPUScissor(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
SDL_InvalidParamError("renderPass");
|
||||
|
@ -1284,7 +1284,7 @@ void SDL_SetGPUScissor(
|
|||
void SDL_BindGPUVertexBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1309,7 +1309,7 @@ void SDL_BindGPUVertexBuffers(
|
|||
|
||||
void SDL_BindGPUIndexBuffer(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1334,7 +1334,7 @@ void SDL_BindGPUIndexBuffer(
|
|||
void SDL_BindGPUVertexSamplers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1360,7 +1360,7 @@ void SDL_BindGPUVertexSamplers(
|
|||
void SDL_BindGPUVertexStorageTextures(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1386,7 +1386,7 @@ void SDL_BindGPUVertexStorageTextures(
|
|||
void SDL_BindGPUVertexStorageBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1412,7 +1412,7 @@ void SDL_BindGPUVertexStorageBuffers(
|
|||
void SDL_BindGPUFragmentSamplers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1438,7 +1438,7 @@ void SDL_BindGPUFragmentSamplers(
|
|||
void SDL_BindGPUFragmentStorageTextures(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1464,7 +1464,7 @@ void SDL_BindGPUFragmentStorageTextures(
|
|||
void SDL_BindGPUFragmentStorageBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
|
@ -1623,9 +1623,9 @@ void SDL_EndGPURenderPass(
|
|||
|
||||
SDL_GPUComputePass *SDL_BeginGPUComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount)
|
||||
{
|
||||
CommandBufferCommonHeader *commandBufferHeader;
|
||||
|
@ -1697,7 +1697,7 @@ void SDL_BindGPUComputePipeline(
|
|||
void SDL_BindGPUComputeStorageTextures(
|
||||
SDL_GPUComputePass *computePass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (computePass == NULL) {
|
||||
|
@ -1723,7 +1723,7 @@ void SDL_BindGPUComputeStorageTextures(
|
|||
void SDL_BindGPUComputeStorageBuffers(
|
||||
SDL_GPUComputePass *computePass,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
if (computePass == NULL) {
|
||||
|
@ -1873,8 +1873,8 @@ SDL_GPUCopyPass *SDL_BeginGPUCopyPass(
|
|||
|
||||
void SDL_UploadToGPUTexture(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
SDL_bool cycle)
|
||||
{
|
||||
if (copyPass == NULL) {
|
||||
|
@ -1903,8 +1903,8 @@ void SDL_UploadToGPUTexture(
|
|||
|
||||
void SDL_UploadToGPUBuffer(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
SDL_bool cycle)
|
||||
{
|
||||
if (copyPass == NULL) {
|
||||
|
@ -1929,8 +1929,8 @@ void SDL_UploadToGPUBuffer(
|
|||
|
||||
void SDL_CopyGPUTextureToTexture(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -1961,8 +1961,8 @@ void SDL_CopyGPUTextureToTexture(
|
|||
|
||||
void SDL_CopyGPUBufferToBuffer(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
SDL_bool cycle)
|
||||
{
|
||||
|
@ -1989,8 +1989,8 @@ void SDL_CopyGPUBufferToBuffer(
|
|||
|
||||
void SDL_DownloadFromGPUTexture(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination)
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination)
|
||||
{
|
||||
if (copyPass == NULL) {
|
||||
SDL_InvalidParamError("copyPass");
|
||||
|
@ -2013,8 +2013,8 @@ void SDL_DownloadFromGPUTexture(
|
|||
|
||||
void SDL_DownloadFromGPUBuffer(
|
||||
SDL_GPUCopyPass *copyPass,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination)
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination)
|
||||
{
|
||||
if (copyPass == NULL) {
|
||||
SDL_InvalidParamError("copyPass");
|
||||
|
@ -2089,8 +2089,8 @@ void SDL_GenerateMipmapsForGPUTexture(
|
|||
|
||||
void SDL_BlitGPUTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
SDL_bool cycle)
|
||||
|
@ -2366,7 +2366,7 @@ void SDL_WaitForGPUIdle(
|
|||
void SDL_WaitForGPUFences(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, );
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "SDL_internal.h"
|
||||
#include "../video/SDL_sysvideo.h"
|
||||
#include "SDL_internal.h"
|
||||
|
||||
#ifndef SDL_GPU_DRIVER_H
|
||||
#define SDL_GPU_DRIVER_H
|
||||
|
@ -263,8 +263,8 @@ SDL_GPUGraphicsPipeline *SDL_GPU_FetchBlitPipeline(
|
|||
|
||||
void SDL_GPU_BlitCommon(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle,
|
||||
|
@ -297,23 +297,23 @@ struct SDL_GPUDevice
|
|||
|
||||
SDL_GPUComputePipeline *(*CreateComputePipeline)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo);
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo);
|
||||
|
||||
SDL_GPUGraphicsPipeline *(*CreateGraphicsPipeline)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo);
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo);
|
||||
|
||||
SDL_GPUSampler *(*CreateSampler)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo);
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo);
|
||||
|
||||
SDL_GPUShader *(*CreateShader)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo);
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo);
|
||||
|
||||
SDL_GPUTexture *(*CreateTexture)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo);
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo);
|
||||
|
||||
SDL_GPUBuffer *(*CreateBuffer)(
|
||||
SDL_GPURenderer *driverData,
|
||||
|
@ -382,9 +382,9 @@ struct SDL_GPUDevice
|
|||
|
||||
void (*BeginRenderPass)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo);
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo);
|
||||
|
||||
void (*BindGraphicsPipeline)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
|
@ -392,57 +392,57 @@ struct SDL_GPUDevice
|
|||
|
||||
void (*SetViewport)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport);
|
||||
const SDL_GPUViewport *viewport);
|
||||
|
||||
void (*SetScissor)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor);
|
||||
const SDL_Rect *scissor);
|
||||
|
||||
void (*BindVertexBuffers)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindIndexBuffer)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize);
|
||||
|
||||
void (*BindVertexSamplers)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindVertexStorageTextures)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindVertexStorageBuffers)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindFragmentSamplers)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindFragmentStorageTextures)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindFragmentStorageBuffers)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*PushVertexUniformData)(
|
||||
|
@ -493,9 +493,9 @@ struct SDL_GPUDevice
|
|||
|
||||
void (*BeginComputePass)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount);
|
||||
|
||||
void (*BindComputePipeline)(
|
||||
|
@ -505,13 +505,13 @@ struct SDL_GPUDevice
|
|||
void (*BindComputeStorageTextures)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindComputeStorageBuffers)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*PushComputeUniformData)(
|
||||
|
@ -552,20 +552,20 @@ struct SDL_GPUDevice
|
|||
|
||||
void (*UploadToTexture)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
bool cycle);
|
||||
|
||||
void (*UploadToBuffer)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
bool cycle);
|
||||
|
||||
void (*CopyTextureToTexture)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -573,8 +573,8 @@ struct SDL_GPUDevice
|
|||
|
||||
void (*CopyBufferToBuffer)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
bool cycle);
|
||||
|
||||
|
@ -584,21 +584,21 @@ struct SDL_GPUDevice
|
|||
|
||||
void (*DownloadFromTexture)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination);
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination);
|
||||
|
||||
void (*DownloadFromBuffer)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination);
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination);
|
||||
|
||||
void (*EndCopyPass)(
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
void (*Blit)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle);
|
||||
|
@ -654,7 +654,7 @@ struct SDL_GPUDevice
|
|||
void (*WaitForFences)(
|
||||
SDL_GPURenderer *driverData,
|
||||
bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount);
|
||||
|
||||
bool (*QueryFence)(
|
||||
|
|
|
@ -360,7 +360,7 @@ static D3D11_TEXTURE_ADDRESS_MODE SDLToD3D11_SamplerAddressMode[] = {
|
|||
D3D11_TEXTURE_ADDRESS_CLAMP // CLAMP_TO_EDGE
|
||||
};
|
||||
|
||||
static D3D11_FILTER SDLToD3D11_Filter(SDL_GPUSamplerCreateInfo *createInfo)
|
||||
static D3D11_FILTER SDLToD3D11_Filter(const SDL_GPUSamplerCreateInfo *createInfo)
|
||||
{
|
||||
if (createInfo->minFilter == SDL_GPU_FILTER_LINEAR) {
|
||||
if (createInfo->magFilter == SDL_GPU_FILTER_LINEAR) {
|
||||
|
@ -459,7 +459,7 @@ typedef struct D3D11WindowData
|
|||
SDL_GPUSwapchainComposition swapchainComposition;
|
||||
DXGI_FORMAT swapchainFormat;
|
||||
DXGI_COLOR_SPACE_TYPE swapchainColorSpace;
|
||||
D3D11Fence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
Uint32 frameCounter;
|
||||
} D3D11WindowData;
|
||||
|
||||
|
@ -1490,7 +1490,7 @@ static ID3D11DeviceChild *D3D11_INTERNAL_CreateID3D11Shader(
|
|||
|
||||
static SDL_GPUComputePipeline *D3D11_CreateComputePipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)driverData;
|
||||
ID3D11ComputeShader *shader;
|
||||
|
@ -1523,7 +1523,7 @@ static SDL_GPUComputePipeline *D3D11_CreateComputePipeline(
|
|||
|
||||
static SDL_GPUGraphicsPipeline *D3D11_CreateGraphicsPipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)driverData;
|
||||
D3D11Shader *vertShader = (D3D11Shader *)pipelineCreateInfo->vertexShader;
|
||||
|
@ -1787,7 +1787,7 @@ static void D3D11_PopDebugGroup(
|
|||
|
||||
static SDL_GPUSampler *D3D11_CreateSampler(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
{
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)driverData;
|
||||
D3D11_SAMPLER_DESC samplerDesc;
|
||||
|
@ -1820,7 +1820,7 @@ static SDL_GPUSampler *D3D11_CreateSampler(
|
|||
|
||||
SDL_GPUShader *D3D11_CreateShader(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
{
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)driverData;
|
||||
ID3D11DeviceChild *handle;
|
||||
|
@ -1857,7 +1857,7 @@ SDL_GPUShader *D3D11_CreateShader(
|
|||
|
||||
static D3D11Texture *D3D11_INTERNAL_CreateTexture(
|
||||
D3D11Renderer *renderer,
|
||||
SDL_GPUTextureCreateInfo *createInfo,
|
||||
const SDL_GPUTextureCreateInfo *createInfo,
|
||||
D3D11_SUBRESOURCE_DATA *initialData)
|
||||
{
|
||||
Uint8 needsSRV, isColorTarget, isDepthStencil, isMultisample, isStaging, needSubresourceUAV, isMippable;
|
||||
|
@ -2188,7 +2188,7 @@ static bool D3D11_SupportsSampleCount(
|
|||
|
||||
static SDL_GPUTexture *D3D11_CreateTexture(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)driverData;
|
||||
D3D11TextureContainer *container;
|
||||
|
@ -2642,8 +2642,8 @@ static void D3D11_BeginCopyPass(
|
|||
|
||||
static void D3D11_UploadToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -2732,8 +2732,8 @@ static void D3D11_UploadToTexture(
|
|||
|
||||
static void D3D11_UploadToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -2789,8 +2789,8 @@ static void D3D11_UploadToBuffer(
|
|||
|
||||
static void D3D11_DownloadFromTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination)
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
D3D11Renderer *renderer = d3d11CommandBuffer->renderer;
|
||||
|
@ -2894,8 +2894,8 @@ static void D3D11_DownloadFromTexture(
|
|||
|
||||
static void D3D11_DownloadFromBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination)
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
D3D11Renderer *renderer = d3d11CommandBuffer->renderer;
|
||||
|
@ -2952,8 +2952,8 @@ static void D3D11_DownloadFromBuffer(
|
|||
|
||||
static void D3D11_CopyTextureToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -2995,8 +2995,8 @@ static void D3D11_CopyTextureToTexture(
|
|||
|
||||
static void D3D11_CopyBufferToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
bool cycle)
|
||||
{
|
||||
|
@ -3387,9 +3387,9 @@ static void D3D11_INTERNAL_PushUniformData(
|
|||
|
||||
static void D3D11_BeginRenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)d3d11CommandBuffer->renderer;
|
||||
|
@ -3615,7 +3615,7 @@ static void D3D11_BindGraphicsPipeline(
|
|||
|
||||
static void D3D11_SetViewport(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
D3D11_VIEWPORT vp = {
|
||||
|
@ -3635,7 +3635,7 @@ static void D3D11_SetViewport(
|
|||
|
||||
static void D3D11_SetScissor(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
D3D11_RECT rect = {
|
||||
|
@ -3654,7 +3654,7 @@ static void D3D11_SetScissor(
|
|||
static void D3D11_BindVertexBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3674,7 +3674,7 @@ static void D3D11_BindVertexBuffers(
|
|||
|
||||
static void D3D11_BindIndexBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3692,7 +3692,7 @@ static void D3D11_BindIndexBuffer(
|
|||
static void D3D11_BindVertexSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3718,7 +3718,7 @@ static void D3D11_BindVertexSamplers(
|
|||
static void D3D11_BindVertexStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3740,7 +3740,7 @@ static void D3D11_BindVertexStorageTextures(
|
|||
static void D3D11_BindVertexStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3765,7 +3765,7 @@ static void D3D11_BindVertexStorageBuffers(
|
|||
static void D3D11_BindFragmentSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3791,7 +3791,7 @@ static void D3D11_BindFragmentSamplers(
|
|||
static void D3D11_BindFragmentStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -3813,7 +3813,7 @@ static void D3D11_BindFragmentStorageTextures(
|
|||
static void D3D11_BindFragmentStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -4123,8 +4123,8 @@ static void D3D11_PushFragmentUniformData(
|
|||
|
||||
static void D3D11_Blit(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle)
|
||||
|
@ -4156,9 +4156,9 @@ static void D3D11_Blit(
|
|||
|
||||
static void D3D11_BeginComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -4235,7 +4235,7 @@ static void D3D11_BindComputePipeline(
|
|||
static void D3D11_BindComputeStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -4257,7 +4257,7 @@ static void D3D11_BindComputeStorageTextures(
|
|||
static void D3D11_BindComputeStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D11CommandBuffer *d3d11CommandBuffer = (D3D11CommandBuffer *)commandBuffer;
|
||||
|
@ -4695,7 +4695,7 @@ static void D3D11_INTERNAL_WaitForFence(
|
|||
static void D3D11_WaitForFences(
|
||||
SDL_GPURenderer *driverData,
|
||||
bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount)
|
||||
{
|
||||
D3D11Renderer *renderer = (D3D11Renderer *)driverData;
|
||||
|
@ -5175,7 +5175,7 @@ static void D3D11_INTERNAL_DestroySwapchain(
|
|||
if (windowData->inFlightFences[i] != NULL) {
|
||||
D3D11_ReleaseFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)windowData->inFlightFences[i]);
|
||||
windowData->inFlightFences[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5247,12 +5247,12 @@ static SDL_GPUTexture *D3D11_AcquireSwapchainTexture(
|
|||
D3D11_WaitForFences(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
true,
|
||||
(SDL_GPUFence **)&windowData->inFlightFences[windowData->frameCounter],
|
||||
&windowData->inFlightFences[windowData->frameCounter],
|
||||
1);
|
||||
} else {
|
||||
if (!D3D11_QueryFence(
|
||||
(SDL_GPURenderer *)d3d11CommandBuffer->renderer,
|
||||
(SDL_GPUFence *)windowData->inFlightFences[windowData->frameCounter])) {
|
||||
windowData->inFlightFences[windowData->frameCounter])) {
|
||||
/*
|
||||
* In MAILBOX or IMMEDIATE mode, if the least recent fence is not signaled,
|
||||
* return NULL to indicate that rendering should be skipped
|
||||
|
@ -5263,7 +5263,7 @@ static SDL_GPUTexture *D3D11_AcquireSwapchainTexture(
|
|||
|
||||
D3D11_ReleaseFence(
|
||||
(SDL_GPURenderer *)d3d11CommandBuffer->renderer,
|
||||
(SDL_GPUFence *)windowData->inFlightFences[windowData->frameCounter]);
|
||||
windowData->inFlightFences[windowData->frameCounter]);
|
||||
|
||||
windowData->inFlightFences[windowData->frameCounter] = NULL;
|
||||
}
|
||||
|
@ -5447,7 +5447,7 @@ static void D3D11_Submit(
|
|||
|
||||
ID3D11Texture2D_Release(windowData->texture.handle);
|
||||
|
||||
windowData->inFlightFences[windowData->frameCounter] = d3d11CommandBuffer->fence;
|
||||
windowData->inFlightFences[windowData->frameCounter] = (SDL_GPUFence*)d3d11CommandBuffer->fence;
|
||||
|
||||
(void)SDL_AtomicIncRef(&d3d11CommandBuffer->fence->referenceCount);
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ typedef struct D3D12WindowData
|
|||
Uint32 frameCounter;
|
||||
|
||||
D3D12TextureContainer textureContainers[MAX_FRAMES_IN_FLIGHT];
|
||||
D3D12Fence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
} D3D12WindowData;
|
||||
|
||||
typedef struct D3D12PresentData
|
||||
|
@ -864,7 +864,7 @@ struct D3D12UniformBuffer
|
|||
|
||||
static void D3D12_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void D3D12_Wait(SDL_GPURenderer *driverData);
|
||||
static void D3D12_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence **pFences, Uint32 fenceCount);
|
||||
static void D3D12_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence *const *pFences, Uint32 fenceCount);
|
||||
static void D3D12_INTERNAL_ReleaseBlitPipelines(SDL_GPURenderer *driverData);
|
||||
|
||||
// Helpers
|
||||
|
@ -2107,7 +2107,7 @@ static bool D3D12_INTERNAL_CreateShaderBytecode(
|
|||
|
||||
static D3D12ComputeRootSignature *D3D12_INTERNAL_CreateComputeRootSignature(
|
||||
D3D12Renderer *renderer,
|
||||
SDL_GPUComputePipelineCreateInfo *createInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *createInfo)
|
||||
{
|
||||
// FIXME: I think the max can be smaller...
|
||||
D3D12_ROOT_PARAMETER rootParameters[MAX_ROOT_SIGNATURE_PARAMETERS];
|
||||
|
@ -2266,7 +2266,7 @@ static D3D12ComputeRootSignature *D3D12_INTERNAL_CreateComputeRootSignature(
|
|||
|
||||
static SDL_GPUComputePipeline *D3D12_CreateComputePipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
D3D12Renderer *renderer = (D3D12Renderer *)driverData;
|
||||
void *bytecode;
|
||||
|
@ -2376,7 +2376,9 @@ static bool D3D12_INTERNAL_ConvertRasterizerState(SDL_GPURasterizerState rasteri
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool D3D12_INTERNAL_ConvertBlendState(SDL_GPUGraphicsPipelineCreateInfo *pipelineInfo, D3D12_BLEND_DESC *blendDesc)
|
||||
static bool D3D12_INTERNAL_ConvertBlendState(
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineInfo,
|
||||
D3D12_BLEND_DESC *blendDesc)
|
||||
{
|
||||
if (!blendDesc) {
|
||||
return false;
|
||||
|
@ -2505,7 +2507,7 @@ static void D3D12_INTERNAL_AssignCpuDescriptorHandle(
|
|||
|
||||
static SDL_GPUGraphicsPipeline *D3D12_CreateGraphicsPipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
D3D12Renderer *renderer = (D3D12Renderer *)driverData;
|
||||
D3D12Shader *vertShader = (D3D12Shader *)pipelineCreateInfo->vertexShader;
|
||||
|
@ -2614,7 +2616,7 @@ static SDL_GPUGraphicsPipeline *D3D12_CreateGraphicsPipeline(
|
|||
|
||||
static SDL_GPUSampler *D3D12_CreateSampler(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
{
|
||||
D3D12Renderer *renderer = (D3D12Renderer *)driverData;
|
||||
D3D12Sampler *sampler = (D3D12Sampler *)SDL_calloc(1, sizeof(D3D12Sampler));
|
||||
|
@ -2659,7 +2661,7 @@ static SDL_GPUSampler *D3D12_CreateSampler(
|
|||
|
||||
static SDL_GPUShader *D3D12_CreateShader(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
{
|
||||
D3D12Renderer *renderer = (D3D12Renderer *)driverData;
|
||||
void *bytecode;
|
||||
|
@ -2695,7 +2697,7 @@ static SDL_GPUShader *D3D12_CreateShader(
|
|||
|
||||
static D3D12Texture *D3D12_INTERNAL_CreateTexture(
|
||||
D3D12Renderer *renderer,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo,
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo,
|
||||
bool isSwapchainTexture)
|
||||
{
|
||||
D3D12Texture *texture;
|
||||
|
@ -2966,7 +2968,7 @@ static D3D12Texture *D3D12_INTERNAL_CreateTexture(
|
|||
|
||||
static SDL_GPUTexture *D3D12_CreateTexture(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
D3D12TextureContainer *container = (D3D12TextureContainer *)SDL_calloc(1, sizeof(D3D12TextureContainer));
|
||||
if (!container) {
|
||||
|
@ -3574,7 +3576,7 @@ static void D3D12_INTERNAL_ReleaseBlitPipelines(SDL_GPURenderer *driverData)
|
|||
|
||||
static void D3D12_SetViewport(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
D3D12_VIEWPORT d3d12Viewport;
|
||||
|
@ -3589,7 +3591,7 @@ static void D3D12_SetViewport(
|
|||
|
||||
static void D3D12_SetScissor(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
D3D12_RECT scissorRect;
|
||||
|
@ -3767,9 +3769,9 @@ static D3D12Buffer *D3D12_INTERNAL_PrepareBufferForWrite(
|
|||
|
||||
static void D3D12_BeginRenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
/* D3D12Renderer *renderer = d3d12CommandBuffer->renderer; */
|
||||
|
@ -4157,7 +4159,7 @@ static void D3D12_BindGraphicsPipeline(
|
|||
static void D3D12_BindVertexBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4177,7 +4179,7 @@ static void D3D12_BindVertexBuffers(
|
|||
|
||||
static void D3D12_BindIndexBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4199,7 +4201,7 @@ static void D3D12_BindIndexBuffer(
|
|||
static void D3D12_BindVertexSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4226,7 +4228,7 @@ static void D3D12_BindVertexSamplers(
|
|||
static void D3D12_BindVertexStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4246,7 +4248,7 @@ static void D3D12_BindVertexStorageTextures(
|
|||
static void D3D12_BindVertexStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4267,7 +4269,7 @@ static void D3D12_BindVertexStorageBuffers(
|
|||
static void D3D12_BindFragmentSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4294,7 +4296,7 @@ static void D3D12_BindFragmentSamplers(
|
|||
static void D3D12_BindFragmentStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4314,7 +4316,7 @@ static void D3D12_BindFragmentStorageTextures(
|
|||
static void D3D12_BindFragmentStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4772,9 +4774,9 @@ static void D3D12_EndRenderPass(
|
|||
|
||||
static void D3D12_BeginComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4906,7 +4908,7 @@ static void D3D12_BindComputePipeline(
|
|||
static void D3D12_BindComputeStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -4938,7 +4940,7 @@ static void D3D12_BindComputeStorageTextures(
|
|||
static void D3D12_BindComputeStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -5197,8 +5199,8 @@ static void D3D12_BeginCopyPass(
|
|||
|
||||
static void D3D12_UploadToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -5373,8 +5375,8 @@ static void D3D12_UploadToTexture(
|
|||
|
||||
static void D3D12_UploadToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
|
@ -5408,8 +5410,8 @@ static void D3D12_UploadToBuffer(
|
|||
|
||||
static void D3D12_CopyTextureToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -5477,8 +5479,8 @@ static void D3D12_CopyTextureToTexture(
|
|||
|
||||
static void D3D12_CopyBufferToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
bool cycle)
|
||||
{
|
||||
|
@ -5522,8 +5524,8 @@ static void D3D12_CopyBufferToBuffer(
|
|||
|
||||
static void D3D12_DownloadFromTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination)
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
D3D12_TEXTURE_COPY_LOCATION sourceLocation;
|
||||
|
@ -5661,8 +5663,8 @@ static void D3D12_DownloadFromTexture(
|
|||
|
||||
static void D3D12_DownloadFromBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination)
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination)
|
||||
{
|
||||
D3D12CommandBuffer *d3d12CommandBuffer = (D3D12CommandBuffer *)commandBuffer;
|
||||
D3D12BufferContainer *sourceContainer = (D3D12BufferContainer *)source->buffer;
|
||||
|
@ -5763,8 +5765,8 @@ static void D3D12_GenerateMipmaps(
|
|||
|
||||
static void D3D12_Blit(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle)
|
||||
|
@ -6399,7 +6401,7 @@ static void D3D12_ReleaseWindow(
|
|||
if (windowData->inFlightFences[i] != NULL) {
|
||||
D3D12_ReleaseFence(
|
||||
driverData,
|
||||
(SDL_GPUFence *)windowData->inFlightFences[i]);
|
||||
windowData->inFlightFences[i]);
|
||||
windowData->inFlightFences[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -6760,12 +6762,12 @@ static SDL_GPUTexture *D3D12_AcquireSwapchainTexture(
|
|||
D3D12_WaitForFences(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
true,
|
||||
(SDL_GPUFence **)&windowData->inFlightFences[windowData->frameCounter],
|
||||
&windowData->inFlightFences[windowData->frameCounter],
|
||||
1);
|
||||
} else {
|
||||
if (!D3D12_QueryFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)windowData->inFlightFences[windowData->frameCounter])) {
|
||||
windowData->inFlightFences[windowData->frameCounter])) {
|
||||
/*
|
||||
* In MAILBOX or IMMEDIATE mode, if the least recent fence is not signaled,
|
||||
* return NULL to indicate that rendering should be skipped
|
||||
|
@ -6776,7 +6778,7 @@ static SDL_GPUTexture *D3D12_AcquireSwapchainTexture(
|
|||
|
||||
D3D12_ReleaseFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)windowData->inFlightFences[windowData->frameCounter]);
|
||||
windowData->inFlightFences[windowData->frameCounter]);
|
||||
|
||||
windowData->inFlightFences[windowData->frameCounter] = NULL;
|
||||
}
|
||||
|
@ -7183,7 +7185,7 @@ static void D3D12_Submit(
|
|||
ID3D12Resource_Release(windowData->textureContainers[presentData->swapchainImageIndex].activeTexture->resource);
|
||||
#endif
|
||||
|
||||
windowData->inFlightFences[windowData->frameCounter] = d3d12CommandBuffer->inFlightFence;
|
||||
windowData->inFlightFences[windowData->frameCounter] = (SDL_GPUFence*)d3d12CommandBuffer->inFlightFence;
|
||||
(void)SDL_AtomicIncRef(&d3d12CommandBuffer->inFlightFence->referenceCount);
|
||||
windowData->frameCounter = (windowData->frameCounter + 1) % MAX_FRAMES_IN_FLIGHT;
|
||||
}
|
||||
|
@ -7263,7 +7265,7 @@ static void D3D12_Wait(
|
|||
static void D3D12_WaitForFences(
|
||||
SDL_GPURenderer *driverData,
|
||||
bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount)
|
||||
{
|
||||
D3D12Renderer *renderer = (D3D12Renderer *)driverData;
|
||||
|
|
|
@ -945,7 +945,7 @@ static void METAL_ReleaseGraphicsPipeline(
|
|||
|
||||
static SDL_GPUComputePipeline *METAL_CreateComputePipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalRenderer *renderer = (MetalRenderer *)driverData;
|
||||
|
@ -990,7 +990,7 @@ static SDL_GPUComputePipeline *METAL_CreateComputePipeline(
|
|||
|
||||
static SDL_GPUGraphicsPipeline *METAL_CreateGraphicsPipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalRenderer *renderer = (MetalRenderer *)driverData;
|
||||
|
@ -1244,7 +1244,7 @@ static void METAL_PopDebugGroup(
|
|||
|
||||
static SDL_GPUSampler *METAL_CreateSampler(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalRenderer *renderer = (MetalRenderer *)driverData;
|
||||
|
@ -1278,7 +1278,7 @@ static SDL_GPUSampler *METAL_CreateSampler(
|
|||
|
||||
static SDL_GPUShader *METAL_CreateShader(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalLibraryFunction libraryFunction;
|
||||
|
@ -1309,7 +1309,7 @@ static SDL_GPUShader *METAL_CreateShader(
|
|||
// This function assumes that it's called from within an autorelease pool
|
||||
static MetalTexture *METAL_INTERNAL_CreateTexture(
|
||||
MetalRenderer *renderer,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
MTLTextureDescriptor *textureDescriptor = [MTLTextureDescriptor new];
|
||||
id<MTLTexture> texture;
|
||||
|
@ -1389,7 +1389,7 @@ static bool METAL_SupportsSampleCount(
|
|||
|
||||
static SDL_GPUTexture *METAL_CreateTexture(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalRenderer *renderer = (MetalRenderer *)driverData;
|
||||
|
@ -1667,8 +1667,8 @@ static void METAL_BeginCopyPass(
|
|||
|
||||
static void METAL_UploadToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
@ -1697,8 +1697,8 @@ static void METAL_UploadToTexture(
|
|||
|
||||
static void METAL_UploadToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
@ -1726,8 +1726,8 @@ static void METAL_UploadToBuffer(
|
|||
|
||||
static void METAL_CopyTextureToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -1763,8 +1763,8 @@ static void METAL_CopyTextureToTexture(
|
|||
|
||||
static void METAL_CopyBufferToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
bool cycle)
|
||||
{
|
||||
|
@ -1794,8 +1794,8 @@ static void METAL_CopyBufferToBuffer(
|
|||
|
||||
static void METAL_DownloadFromTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination)
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -1848,8 +1848,8 @@ static void METAL_DownloadFromTexture(
|
|||
|
||||
static void METAL_DownloadFromBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination)
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination)
|
||||
{
|
||||
SDL_GPUBufferLocation sourceLocation;
|
||||
sourceLocation.buffer = source->buffer;
|
||||
|
@ -2089,9 +2089,9 @@ static void METAL_INTERNAL_ReturnUniformBufferToPool(
|
|||
|
||||
static void METAL_BeginRenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2276,7 +2276,7 @@ static void METAL_BindGraphicsPipeline(
|
|||
|
||||
static void METAL_SetViewport(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2295,7 +2295,7 @@ static void METAL_SetViewport(
|
|||
|
||||
static void METAL_SetScissor(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
@autoreleasepool {
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2313,7 +2313,7 @@ static void METAL_SetScissor(
|
|||
static void METAL_BindVertexBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
@ -2340,7 +2340,7 @@ static void METAL_BindVertexBuffers(
|
|||
|
||||
static void METAL_BindIndexBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2354,7 +2354,7 @@ static void METAL_BindIndexBuffer(
|
|||
static void METAL_BindVertexSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2380,7 +2380,7 @@ static void METAL_BindVertexSamplers(
|
|||
static void METAL_BindVertexStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2403,7 +2403,7 @@ static void METAL_BindVertexStorageTextures(
|
|||
static void METAL_BindVertexStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2426,7 +2426,7 @@ static void METAL_BindVertexStorageBuffers(
|
|||
static void METAL_BindFragmentSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2452,7 +2452,7 @@ static void METAL_BindFragmentSamplers(
|
|||
static void METAL_BindFragmentStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2475,7 +2475,7 @@ static void METAL_BindFragmentStorageTextures(
|
|||
static void METAL_BindFragmentStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -2883,8 +2883,8 @@ static void METAL_PushFragmentUniformData(
|
|||
|
||||
static void METAL_Blit(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle)
|
||||
|
@ -2915,9 +2915,9 @@ static void METAL_Blit(
|
|||
|
||||
static void METAL_BeginComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
@ -2993,7 +2993,7 @@ static void METAL_BindComputePipeline(
|
|||
static void METAL_BindComputeStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -3016,7 +3016,7 @@ static void METAL_BindComputeStorageTextures(
|
|||
static void METAL_BindComputeStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
|
||||
|
@ -3284,7 +3284,7 @@ static void METAL_INTERNAL_PerformPendingDestroys(
|
|||
static void METAL_WaitForFences(
|
||||
SDL_GPURenderer *driverData,
|
||||
bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount)
|
||||
{
|
||||
@autoreleasepool {
|
||||
|
|
|
@ -775,7 +775,7 @@ typedef struct VulkanSwapchainData
|
|||
// Synchronization primitives
|
||||
VkSemaphore imageAvailableSemaphore[MAX_FRAMES_IN_FLIGHT];
|
||||
VkSemaphore renderFinishedSemaphore[MAX_FRAMES_IN_FLIGHT];
|
||||
VulkanFenceHandle *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
|
||||
Uint32 frameCounter;
|
||||
} VulkanSwapchainData;
|
||||
|
@ -1206,7 +1206,7 @@ static Uint8 VULKAN_INTERNAL_DefragmentMemory(VulkanRenderer *renderer);
|
|||
static void VULKAN_INTERNAL_BeginCommandBuffer(VulkanRenderer *renderer, VulkanCommandBuffer *commandBuffer);
|
||||
static void VULKAN_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void VULKAN_Wait(SDL_GPURenderer *driverData);
|
||||
static void VULKAN_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence **pFences, Uint32 fenceCount);
|
||||
static void VULKAN_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence *const *pFences, Uint32 fenceCount);
|
||||
static void VULKAN_Submit(SDL_GPUCommandBuffer *commandBuffer);
|
||||
static VulkanTexture *VULKAN_INTERNAL_CreateTexture(
|
||||
VulkanRenderer *renderer,
|
||||
|
@ -3846,7 +3846,7 @@ static bool VULKAN_INTERNAL_InitializeGraphicsPipelineResourceLayout(
|
|||
|
||||
static bool VULKAN_INTERNAL_InitializeComputePipelineResourceLayout(
|
||||
VulkanRenderer *renderer,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo,
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo,
|
||||
VulkanComputePipelineResourceLayout *pipelineResourceLayout)
|
||||
{
|
||||
VkDescriptorSetLayoutBinding descriptorSetLayoutBindings[MAX_UNIFORM_BUFFERS_PER_STAGE];
|
||||
|
@ -6060,9 +6060,9 @@ static VulkanTextureSubresource *VULKAN_INTERNAL_PrepareTextureSubresourceForWri
|
|||
static VkRenderPass VULKAN_INTERNAL_CreateRenderPass(
|
||||
VulkanRenderer *renderer,
|
||||
VulkanCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
VkResult vulkanResult;
|
||||
VkAttachmentDescription attachmentDescriptions[2 * MAX_COLOR_TARGET_BINDINGS + 1];
|
||||
|
@ -6384,7 +6384,7 @@ static VkRenderPass VULKAN_INTERNAL_CreateTransientRenderPass(
|
|||
|
||||
static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
VkResult vulkanResult;
|
||||
Uint32 i;
|
||||
|
@ -6724,7 +6724,7 @@ static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
|
|||
|
||||
static SDL_GPUComputePipeline *VULKAN_CreateComputePipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
VkShaderModuleCreateInfo shaderModuleCreateInfo;
|
||||
VkComputePipelineCreateInfo computePipelineCreateInfo;
|
||||
|
@ -6825,7 +6825,7 @@ static SDL_GPUComputePipeline *VULKAN_CreateComputePipeline(
|
|||
|
||||
static SDL_GPUSampler *VULKAN_CreateSampler(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
{
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)driverData;
|
||||
VulkanSampler *vulkanSampler = SDL_malloc(sizeof(VulkanSampler));
|
||||
|
@ -6870,7 +6870,7 @@ static SDL_GPUSampler *VULKAN_CreateSampler(
|
|||
|
||||
static SDL_GPUShader *VULKAN_CreateShader(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
{
|
||||
VulkanShader *vulkanShader;
|
||||
VkResult vulkanResult;
|
||||
|
@ -6925,7 +6925,7 @@ static bool VULKAN_SupportsSampleCount(
|
|||
|
||||
static SDL_GPUTexture *VULKAN_CreateTexture(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)driverData;
|
||||
VkImageAspectFlags imageAspectFlags;
|
||||
|
@ -7241,9 +7241,9 @@ static void VULKAN_ReleaseGraphicsPipeline(
|
|||
static VkRenderPass VULKAN_INTERNAL_FetchRenderPass(
|
||||
VulkanRenderer *renderer,
|
||||
VulkanCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
VulkanRenderPassHashTableValue *renderPassWrapper = NULL;
|
||||
VkRenderPass renderPassHandle;
|
||||
|
@ -7323,9 +7323,9 @@ static VkRenderPass VULKAN_INTERNAL_FetchRenderPass(
|
|||
static VulkanFramebuffer *VULKAN_INTERNAL_FetchFramebuffer(
|
||||
VulkanRenderer *renderer,
|
||||
VkRenderPass renderPass,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo,
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo,
|
||||
Uint32 width,
|
||||
Uint32 height)
|
||||
{
|
||||
|
@ -7465,7 +7465,7 @@ static VulkanFramebuffer *VULKAN_INTERNAL_FetchFramebuffer(
|
|||
|
||||
static void VULKAN_INTERNAL_SetCurrentViewport(
|
||||
VulkanCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
||||
|
@ -7482,7 +7482,7 @@ static void VULKAN_INTERNAL_SetCurrentViewport(
|
|||
|
||||
static void VULKAN_SetViewport(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)vulkanCommandBuffer->renderer;
|
||||
|
@ -7500,7 +7500,7 @@ static void VULKAN_SetViewport(
|
|||
|
||||
static void VULKAN_INTERNAL_SetCurrentScissor(
|
||||
VulkanCommandBuffer *vulkanCommandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
vulkanCommandBuffer->currentScissor.offset.x = scissor->x;
|
||||
vulkanCommandBuffer->currentScissor.offset.y = scissor->y;
|
||||
|
@ -7510,7 +7510,7 @@ static void VULKAN_INTERNAL_SetCurrentScissor(
|
|||
|
||||
static void VULKAN_SetScissor(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)vulkanCommandBuffer->renderer;
|
||||
|
@ -7529,7 +7529,7 @@ static void VULKAN_SetScissor(
|
|||
static void VULKAN_BindVertexSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -7554,7 +7554,7 @@ static void VULKAN_BindVertexSamplers(
|
|||
static void VULKAN_BindVertexStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -7575,7 +7575,7 @@ static void VULKAN_BindVertexStorageTextures(
|
|||
static void VULKAN_BindVertexStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -7598,7 +7598,7 @@ static void VULKAN_BindVertexStorageBuffers(
|
|||
static void VULKAN_BindFragmentSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -7623,7 +7623,7 @@ static void VULKAN_BindFragmentSamplers(
|
|||
static void VULKAN_BindFragmentStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -7645,7 +7645,7 @@ static void VULKAN_BindFragmentStorageTextures(
|
|||
static void VULKAN_BindFragmentStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -7794,9 +7794,9 @@ static void VULKAN_INTERNAL_PushUniformData(
|
|||
|
||||
static void VULKAN_BeginRenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)vulkanCommandBuffer->renderer;
|
||||
|
@ -8061,7 +8061,7 @@ static void VULKAN_BindGraphicsPipeline(
|
|||
static void VULKAN_BindVertexBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8091,7 +8091,7 @@ static void VULKAN_BindVertexBuffers(
|
|||
|
||||
static void VULKAN_BindIndexBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8191,9 +8191,9 @@ static void VULKAN_EndRenderPass(
|
|||
|
||||
static void VULKAN_BeginComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8278,7 +8278,7 @@ static void VULKAN_BindComputePipeline(
|
|||
static void VULKAN_BindComputeStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8315,7 +8315,7 @@ static void VULKAN_BindComputeStorageTextures(
|
|||
static void VULKAN_BindComputeStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8749,8 +8749,8 @@ static void VULKAN_BeginCopyPass(
|
|||
|
||||
static void VULKAN_UploadToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8805,8 +8805,8 @@ static void VULKAN_UploadToTexture(
|
|||
|
||||
static void VULKAN_UploadToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
@ -8849,8 +8849,8 @@ static void VULKAN_UploadToBuffer(
|
|||
|
||||
static void VULKAN_DownloadFromTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination)
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
|
||||
|
@ -8905,8 +8905,8 @@ static void VULKAN_DownloadFromTexture(
|
|||
|
||||
static void VULKAN_DownloadFromBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination)
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
|
||||
|
@ -8945,8 +8945,8 @@ static void VULKAN_DownloadFromBuffer(
|
|||
|
||||
static void VULKAN_CopyTextureToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
|
@ -9023,8 +9023,8 @@ static void VULKAN_CopyTextureToTexture(
|
|||
|
||||
static void VULKAN_CopyBufferToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
bool cycle)
|
||||
{
|
||||
|
@ -9177,8 +9177,8 @@ static void VULKAN_EndCopyPass(
|
|||
|
||||
static void VULKAN_Blit(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle)
|
||||
|
@ -9803,7 +9803,7 @@ static void VULKAN_ReleaseWindow(
|
|||
if (windowData->swapchainData->inFlightFences[i] != NULL) {
|
||||
VULKAN_ReleaseFence(
|
||||
driverData,
|
||||
(SDL_GPUFence *)windowData->swapchainData->inFlightFences[i]);
|
||||
windowData->swapchainData->inFlightFences[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9839,7 +9839,7 @@ static bool VULKAN_INTERNAL_RecreateSwapchain(
|
|||
if (windowData->swapchainData->inFlightFences[i] != NULL) {
|
||||
VULKAN_ReleaseFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)windowData->swapchainData->inFlightFences[i]);
|
||||
windowData->swapchainData->inFlightFences[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9893,12 +9893,12 @@ static SDL_GPUTexture *VULKAN_AcquireSwapchainTexture(
|
|||
VULKAN_WaitForFences(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
true,
|
||||
(SDL_GPUFence **)&swapchainData->inFlightFences[swapchainData->frameCounter],
|
||||
&swapchainData->inFlightFences[swapchainData->frameCounter],
|
||||
1);
|
||||
} else {
|
||||
if (!VULKAN_QueryFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)swapchainData->inFlightFences[swapchainData->frameCounter])) {
|
||||
swapchainData->inFlightFences[swapchainData->frameCounter])) {
|
||||
/*
|
||||
* In MAILBOX or IMMEDIATE mode, if the least recent fence is not signaled,
|
||||
* return NULL to indicate that rendering should be skipped
|
||||
|
@ -9909,7 +9909,7 @@ static SDL_GPUTexture *VULKAN_AcquireSwapchainTexture(
|
|||
|
||||
VULKAN_ReleaseFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)swapchainData->inFlightFences[swapchainData->frameCounter]);
|
||||
swapchainData->inFlightFences[swapchainData->frameCounter]);
|
||||
|
||||
swapchainData->inFlightFences[swapchainData->frameCounter] = NULL;
|
||||
}
|
||||
|
@ -10346,7 +10346,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
|||
static void VULKAN_WaitForFences(
|
||||
SDL_GPURenderer *driverData,
|
||||
bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount)
|
||||
{
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)driverData;
|
||||
|
@ -10537,7 +10537,7 @@ static void VULKAN_Submit(
|
|||
presentData->windowData);
|
||||
} else {
|
||||
// If presenting, the swapchain is using the in-flight fence
|
||||
presentData->windowData->swapchainData->inFlightFences[presentData->windowData->swapchainData->frameCounter] = vulkanCommandBuffer->inFlightFence;
|
||||
presentData->windowData->swapchainData->inFlightFences[presentData->windowData->swapchainData->frameCounter] = (SDL_GPUFence*)vulkanCommandBuffer->inFlightFence;
|
||||
|
||||
(void)SDL_AtomicIncRef(&vulkanCommandBuffer->inFlightFence->referenceCount);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue