mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-25 22:19:10 +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
|
@ -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, );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue