Renamed Gpu to GPU
This commit is contained in:
1 parent
717f4f6fb4
commit
d70578b9aa
24 files changed
+2469
-2469
No files matched your search
@@ -64,13 +64,13 @@ SDL_bool SDL_GetGDKDefaultUser(void *outUserHandle)
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGpu(SDL_GpuDevice *device);
|
||||
void SDL_GDKSuspendGpu(SDL_GpuDevice *device)
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKSuspendGPU(SDL_GPUDevice *device);
|
||||
void SDL_GDKSuspendGPU(SDL_GPUDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKResumeGpu(SDL_GpuDevice *device);
|
||||
void SDL_GDKResumeGpu(SDL_GpuDevice *device)
|
||||
SDL_DECLSPEC void SDLCALL SDL_GDKResumeGPU(SDL_GPUDevice *device);
|
||||
void SDL_GDKResumeGPU(SDL_GPUDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+81
-81
@@ -1060,87 +1060,87 @@ SDL3_0.0.0 {
|
||||
SDL_wcsnstr;
|
||||
SDL_wcsstr;
|
||||
SDL_wcstol;
|
||||
SDL_CreateGpuDevice;
|
||||
SDL_CreateGpuDeviceWithProperties;
|
||||
SDL_DestroyGpuDevice;
|
||||
SDL_GetGpuDriver;
|
||||
SDL_CreateGpuComputePipeline;
|
||||
SDL_CreateGpuGraphicsPipeline;
|
||||
SDL_CreateGpuSampler;
|
||||
SDL_CreateGpuShader;
|
||||
SDL_CreateGpuTexture;
|
||||
SDL_CreateGpuBuffer;
|
||||
SDL_CreateGpuTransferBuffer;
|
||||
SDL_SetGpuBufferName;
|
||||
SDL_SetGpuTextureName;
|
||||
SDL_InsertGpuDebugLabel;
|
||||
SDL_PushGpuDebugGroup;
|
||||
SDL_PopGpuDebugGroup;
|
||||
SDL_ReleaseGpuTexture;
|
||||
SDL_ReleaseGpuSampler;
|
||||
SDL_ReleaseGpuBuffer;
|
||||
SDL_ReleaseGpuTransferBuffer;
|
||||
SDL_ReleaseGpuComputePipeline;
|
||||
SDL_ReleaseGpuShader;
|
||||
SDL_ReleaseGpuGraphicsPipeline;
|
||||
SDL_BeginGpuRenderPass;
|
||||
SDL_BindGpuGraphicsPipeline;
|
||||
SDL_SetGpuViewport;
|
||||
SDL_SetGpuScissor;
|
||||
SDL_BindGpuVertexBuffers;
|
||||
SDL_BindGpuIndexBuffer;
|
||||
SDL_BindGpuVertexSamplers;
|
||||
SDL_BindGpuVertexStorageTextures;
|
||||
SDL_BindGpuVertexStorageBuffers;
|
||||
SDL_BindGpuFragmentSamplers;
|
||||
SDL_BindGpuFragmentStorageTextures;
|
||||
SDL_BindGpuFragmentStorageBuffers;
|
||||
SDL_PushGpuVertexUniformData;
|
||||
SDL_PushGpuFragmentUniformData;
|
||||
SDL_DrawGpuIndexedPrimitives;
|
||||
SDL_DrawGpuPrimitives;
|
||||
SDL_DrawGpuPrimitivesIndirect;
|
||||
SDL_DrawGpuIndexedPrimitivesIndirect;
|
||||
SDL_EndGpuRenderPass;
|
||||
SDL_BeginGpuComputePass;
|
||||
SDL_BindGpuComputePipeline;
|
||||
SDL_BindGpuComputeStorageTextures;
|
||||
SDL_BindGpuComputeStorageBuffers;
|
||||
SDL_PushGpuComputeUniformData;
|
||||
SDL_DispatchGpuCompute;
|
||||
SDL_DispatchGpuComputeIndirect;
|
||||
SDL_EndGpuComputePass;
|
||||
SDL_MapGpuTransferBuffer;
|
||||
SDL_UnmapGpuTransferBuffer;
|
||||
SDL_BeginGpuCopyPass;
|
||||
SDL_UploadToGpuTexture;
|
||||
SDL_UploadToGpuBuffer;
|
||||
SDL_CopyGpuTextureToTexture;
|
||||
SDL_CopyGpuBufferToBuffer;
|
||||
SDL_GenerateGpuMipmaps;
|
||||
SDL_DownloadFromGpuTexture;
|
||||
SDL_DownloadFromGpuBuffer;
|
||||
SDL_EndGpuCopyPass;
|
||||
SDL_BlitGpu;
|
||||
SDL_SupportsGpuSwapchainComposition;
|
||||
SDL_SupportsGpuPresentMode;
|
||||
SDL_ClaimGpuWindow;
|
||||
SDL_UnclaimGpuWindow;
|
||||
SDL_SetGpuSwapchainParameters;
|
||||
SDL_GetGpuSwapchainTextureFormat;
|
||||
SDL_AcquireGpuCommandBuffer;
|
||||
SDL_AcquireGpuSwapchainTexture;
|
||||
SDL_SubmitGpu;
|
||||
SDL_SubmitGpuAndAcquireFence;
|
||||
SDL_WaitGpu;
|
||||
SDL_WaitGpuForFences;
|
||||
SDL_QueryGpuFence;
|
||||
SDL_ReleaseGpuFence;
|
||||
SDL_GpuTextureFormatTexelBlockSize;
|
||||
SDL_SupportsGpuTextureFormat;
|
||||
SDL_SupportsGpuSampleCount;
|
||||
SDL_GDKSuspendGpu;
|
||||
SDL_GDKResumeGpu;
|
||||
SDL_CreateGPUDevice;
|
||||
SDL_CreateGPUDeviceWithProperties;
|
||||
SDL_DestroyGPUDevice;
|
||||
SDL_GetGPUDriver;
|
||||
SDL_CreateGPUComputePipeline;
|
||||
SDL_CreateGPUGraphicsPipeline;
|
||||
SDL_CreateGPUSampler;
|
||||
SDL_CreateGPUShader;
|
||||
SDL_CreateGPUTexture;
|
||||
SDL_CreateGPUBuffer;
|
||||
SDL_CreateGPUTransferBuffer;
|
||||
SDL_SetGPUBufferName;
|
||||
SDL_SetGPUTextureName;
|
||||
SDL_InsertGPUDebugLabel;
|
||||
SDL_PushGPUDebugGroup;
|
||||
SDL_PopGPUDebugGroup;
|
||||
SDL_ReleaseGPUTexture;
|
||||
SDL_ReleaseGPUSampler;
|
||||
SDL_ReleaseGPUBuffer;
|
||||
SDL_ReleaseGPUTransferBuffer;
|
||||
SDL_ReleaseGPUComputePipeline;
|
||||
SDL_ReleaseGPUShader;
|
||||
SDL_ReleaseGPUGraphicsPipeline;
|
||||
SDL_BeginGPURenderPass;
|
||||
SDL_BindGPUGraphicsPipeline;
|
||||
SDL_SetGPUViewport;
|
||||
SDL_SetGPUScissor;
|
||||
SDL_BindGPUVertexBuffers;
|
||||
SDL_BindGPUIndexBuffer;
|
||||
SDL_BindGPUVertexSamplers;
|
||||
SDL_BindGPUVertexStorageTextures;
|
||||
SDL_BindGPUVertexStorageBuffers;
|
||||
SDL_BindGPUFragmentSamplers;
|
||||
SDL_BindGPUFragmentStorageTextures;
|
||||
SDL_BindGPUFragmentStorageBuffers;
|
||||
SDL_PushGPUVertexUniformData;
|
||||
SDL_PushGPUFragmentUniformData;
|
||||
SDL_DrawGPUIndexedPrimitives;
|
||||
SDL_DrawGPUPrimitives;
|
||||
SDL_DrawGPUPrimitivesIndirect;
|
||||
SDL_DrawGPUIndexedPrimitivesIndirect;
|
||||
SDL_EndGPURenderPass;
|
||||
SDL_BeginGPUComputePass;
|
||||
SDL_BindGPUComputePipeline;
|
||||
SDL_BindGPUComputeStorageTextures;
|
||||
SDL_BindGPUComputeStorageBuffers;
|
||||
SDL_PushGPUComputeUniformData;
|
||||
SDL_DispatchGPUCompute;
|
||||
SDL_DispatchGPUComputeIndirect;
|
||||
SDL_EndGPUComputePass;
|
||||
SDL_MapGPUTransferBuffer;
|
||||
SDL_UnmapGPUTransferBuffer;
|
||||
SDL_BeginGPUCopyPass;
|
||||
SDL_UploadToGPUTexture;
|
||||
SDL_UploadToGPUBuffer;
|
||||
SDL_CopyGPUTextureToTexture;
|
||||
SDL_CopyGPUBufferToBuffer;
|
||||
SDL_GenerateGPUMipmaps;
|
||||
SDL_DownloadFromGPUTexture;
|
||||
SDL_DownloadFromGPUBuffer;
|
||||
SDL_EndGPUCopyPass;
|
||||
SDL_BlitGPU;
|
||||
SDL_SupportsGPUSwapchainComposition;
|
||||
SDL_SupportsGPUPresentMode;
|
||||
SDL_ClaimGPUWindow;
|
||||
SDL_UnclaimGPUWindow;
|
||||
SDL_SetGPUSwapchainParameters;
|
||||
SDL_GetGPUSwapchainTextureFormat;
|
||||
SDL_AcquireGPUCommandBuffer;
|
||||
SDL_AcquireGPUSwapchainTexture;
|
||||
SDL_SubmitGPU;
|
||||
SDL_SubmitGPUAndAcquireFence;
|
||||
SDL_WaitGPU;
|
||||
SDL_WaitGPUForFences;
|
||||
SDL_QueryGPUFence;
|
||||
SDL_ReleaseGPUFence;
|
||||
SDL_GPUTextureFormatTexelBlockSize;
|
||||
SDL_SupportsGPUTextureFormat;
|
||||
SDL_SupportsGPUSampleCount;
|
||||
SDL_GDKSuspendGPU;
|
||||
SDL_GDKResumeGPU;
|
||||
# extra symbols go here (don't modify this line)
|
||||
local: *;
|
||||
};
|
||||
@@ -1085,84 +1085,84 @@
|
||||
#define SDL_wcsnstr SDL_wcsnstr_REAL
|
||||
#define SDL_wcsstr SDL_wcsstr_REAL
|
||||
#define SDL_wcstol SDL_wcstol_REAL
|
||||
#define SDL_CreateGpuDevice SDL_CreateGpuDevice_REAL
|
||||
#define SDL_CreateGpuDeviceWithProperties SDL_CreateGpuDeviceWithProperties_REAL
|
||||
#define SDL_DestroyGpuDevice SDL_DestroyGpuDevice_REAL
|
||||
#define SDL_GetGpuDriver SDL_GetGpuDriver_REAL
|
||||
#define SDL_CreateGpuComputePipeline SDL_CreateGpuComputePipeline_REAL
|
||||
#define SDL_CreateGpuGraphicsPipeline SDL_CreateGpuGraphicsPipeline_REAL
|
||||
#define SDL_CreateGpuSampler SDL_CreateGpuSampler_REAL
|
||||
#define SDL_CreateGpuShader SDL_CreateGpuShader_REAL
|
||||
#define SDL_CreateGpuTexture SDL_CreateGpuTexture_REAL
|
||||
#define SDL_CreateGpuBuffer SDL_CreateGpuBuffer_REAL
|
||||
#define SDL_CreateGpuTransferBuffer SDL_CreateGpuTransferBuffer_REAL
|
||||
#define SDL_SetGpuBufferName SDL_SetGpuBufferName_REAL
|
||||
#define SDL_SetGpuTextureName SDL_SetGpuTextureName_REAL
|
||||
#define SDL_InsertGpuDebugLabel SDL_InsertGpuDebugLabel_REAL
|
||||
#define SDL_PushGpuDebugGroup SDL_PushGpuDebugGroup_REAL
|
||||
#define SDL_PopGpuDebugGroup SDL_PopGpuDebugGroup_REAL
|
||||
#define SDL_ReleaseGpuTexture SDL_ReleaseGpuTexture_REAL
|
||||
#define SDL_ReleaseGpuSampler SDL_ReleaseGpuSampler_REAL
|
||||
#define SDL_ReleaseGpuBuffer SDL_ReleaseGpuBuffer_REAL
|
||||
#define SDL_ReleaseGpuTransferBuffer SDL_ReleaseGpuTransferBuffer_REAL
|
||||
#define SDL_ReleaseGpuComputePipeline SDL_ReleaseGpuComputePipeline_REAL
|
||||
#define SDL_ReleaseGpuShader SDL_ReleaseGpuShader_REAL
|
||||
#define SDL_ReleaseGpuGraphicsPipeline SDL_ReleaseGpuGraphicsPipeline_REAL
|
||||
#define SDL_BeginGpuRenderPass SDL_BeginGpuRenderPass_REAL
|
||||
#define SDL_BindGpuGraphicsPipeline SDL_BindGpuGraphicsPipeline_REAL
|
||||
#define SDL_SetGpuViewport SDL_SetGpuViewport_REAL
|
||||
#define SDL_SetGpuScissor SDL_SetGpuScissor_REAL
|
||||
#define SDL_BindGpuVertexBuffers SDL_BindGpuVertexBuffers_REAL
|
||||
#define SDL_BindGpuIndexBuffer SDL_BindGpuIndexBuffer_REAL
|
||||
#define SDL_BindGpuVertexSamplers SDL_BindGpuVertexSamplers_REAL
|
||||
#define SDL_BindGpuVertexStorageTextures SDL_BindGpuVertexStorageTextures_REAL
|
||||
#define SDL_BindGpuVertexStorageBuffers SDL_BindGpuVertexStorageBuffers_REAL
|
||||
#define SDL_BindGpuFragmentSamplers SDL_BindGpuFragmentSamplers_REAL
|
||||
#define SDL_BindGpuFragmentStorageTextures SDL_BindGpuFragmentStorageTextures_REAL
|
||||
#define SDL_BindGpuFragmentStorageBuffers SDL_BindGpuFragmentStorageBuffers_REAL
|
||||
#define SDL_PushGpuVertexUniformData SDL_PushGpuVertexUniformData_REAL
|
||||
#define SDL_PushGpuFragmentUniformData SDL_PushGpuFragmentUniformData_REAL
|
||||
#define SDL_DrawGpuIndexedPrimitives SDL_DrawGpuIndexedPrimitives_REAL
|
||||
#define SDL_DrawGpuPrimitives SDL_DrawGpuPrimitives_REAL
|
||||
#define SDL_DrawGpuPrimitivesIndirect SDL_DrawGpuPrimitivesIndirect_REAL
|
||||
#define SDL_DrawGpuIndexedPrimitivesIndirect SDL_DrawGpuIndexedPrimitivesIndirect_REAL
|
||||
#define SDL_EndGpuRenderPass SDL_EndGpuRenderPass_REAL
|
||||
#define SDL_BeginGpuComputePass SDL_BeginGpuComputePass_REAL
|
||||
#define SDL_BindGpuComputePipeline SDL_BindGpuComputePipeline_REAL
|
||||
#define SDL_BindGpuComputeStorageTextures SDL_BindGpuComputeStorageTextures_REAL
|
||||
#define SDL_BindGpuComputeStorageBuffers SDL_BindGpuComputeStorageBuffers_REAL
|
||||
#define SDL_PushGpuComputeUniformData SDL_PushGpuComputeUniformData_REAL
|
||||
#define SDL_DispatchGpuCompute SDL_DispatchGpuCompute_REAL
|
||||
#define SDL_DispatchGpuComputeIndirect SDL_DispatchGpuComputeIndirect_REAL
|
||||
#define SDL_EndGpuComputePass SDL_EndGpuComputePass_REAL
|
||||
#define SDL_MapGpuTransferBuffer SDL_MapGpuTransferBuffer_REAL
|
||||
#define SDL_UnmapGpuTransferBuffer SDL_UnmapGpuTransferBuffer_REAL
|
||||
#define SDL_BeginGpuCopyPass SDL_BeginGpuCopyPass_REAL
|
||||
#define SDL_UploadToGpuTexture SDL_UploadToGpuTexture_REAL
|
||||
#define SDL_UploadToGpuBuffer SDL_UploadToGpuBuffer_REAL
|
||||
#define SDL_CopyGpuTextureToTexture SDL_CopyGpuTextureToTexture_REAL
|
||||
#define SDL_CopyGpuBufferToBuffer SDL_CopyGpuBufferToBuffer_REAL
|
||||
#define SDL_GenerateGpuMipmaps SDL_GenerateGpuMipmaps_REAL
|
||||
#define SDL_DownloadFromGpuTexture SDL_DownloadFromGpuTexture_REAL
|
||||
#define SDL_DownloadFromGpuBuffer SDL_DownloadFromGpuBuffer_REAL
|
||||
#define SDL_EndGpuCopyPass SDL_EndGpuCopyPass_REAL
|
||||
#define SDL_BlitGpu SDL_BlitGpu_REAL
|
||||
#define SDL_SupportsGpuSwapchainComposition SDL_SupportsGpuSwapchainComposition_REAL
|
||||
#define SDL_SupportsGpuPresentMode SDL_SupportsGpuPresentMode_REAL
|
||||
#define SDL_ClaimGpuWindow SDL_ClaimGpuWindow_REAL
|
||||
#define SDL_UnclaimGpuWindow SDL_UnclaimGpuWindow_REAL
|
||||
#define SDL_SetGpuSwapchainParameters SDL_SetGpuSwapchainParameters_REAL
|
||||
#define SDL_GetGpuSwapchainTextureFormat SDL_GetGpuSwapchainTextureFormat_REAL
|
||||
#define SDL_AcquireGpuCommandBuffer SDL_AcquireGpuCommandBuffer_REAL
|
||||
#define SDL_AcquireGpuSwapchainTexture SDL_AcquireGpuSwapchainTexture_REAL
|
||||
#define SDL_SubmitGpu SDL_SubmitGpu_REAL
|
||||
#define SDL_SubmitGpuAndAcquireFence SDL_SubmitGpuAndAcquireFence_REAL
|
||||
#define SDL_WaitGpu SDL_WaitGpu_REAL
|
||||
#define SDL_WaitGpuForFences SDL_WaitGpuForFences_REAL
|
||||
#define SDL_QueryGpuFence SDL_QueryGpuFence_REAL
|
||||
#define SDL_ReleaseGpuFence SDL_ReleaseGpuFence_REAL
|
||||
#define SDL_GpuTextureFormatTexelBlockSize SDL_GpuTextureFormatTexelBlockSize_REAL
|
||||
#define SDL_SupportsGpuTextureFormat SDL_SupportsGpuTextureFormat_REAL
|
||||
#define SDL_SupportsGpuSampleCount SDL_SupportsGpuSampleCount_REAL
|
||||
#define SDL_GDKSuspendGpu SDL_GDKSuspendGpu_REAL
|
||||
#define SDL_GDKResumeGpu SDL_GDKResumeGpu_REAL
|
||||
#define SDL_CreateGPUDevice SDL_CreateGPUDevice_REAL
|
||||
#define SDL_CreateGPUDeviceWithProperties SDL_CreateGPUDeviceWithProperties_REAL
|
||||
#define SDL_DestroyGPUDevice SDL_DestroyGPUDevice_REAL
|
||||
#define SDL_GetGPUDriver SDL_GetGPUDriver_REAL
|
||||
#define SDL_CreateGPUComputePipeline SDL_CreateGPUComputePipeline_REAL
|
||||
#define SDL_CreateGPUGraphicsPipeline SDL_CreateGPUGraphicsPipeline_REAL
|
||||
#define SDL_CreateGPUSampler SDL_CreateGPUSampler_REAL
|
||||
#define SDL_CreateGPUShader SDL_CreateGPUShader_REAL
|
||||
#define SDL_CreateGPUTexture SDL_CreateGPUTexture_REAL
|
||||
#define SDL_CreateGPUBuffer SDL_CreateGPUBuffer_REAL
|
||||
#define SDL_CreateGPUTransferBuffer SDL_CreateGPUTransferBuffer_REAL
|
||||
#define SDL_SetGPUBufferName SDL_SetGPUBufferName_REAL
|
||||
#define SDL_SetGPUTextureName SDL_SetGPUTextureName_REAL
|
||||
#define SDL_InsertGPUDebugLabel SDL_InsertGPUDebugLabel_REAL
|
||||
#define SDL_PushGPUDebugGroup SDL_PushGPUDebugGroup_REAL
|
||||
#define SDL_PopGPUDebugGroup SDL_PopGPUDebugGroup_REAL
|
||||
#define SDL_ReleaseGPUTexture SDL_ReleaseGPUTexture_REAL
|
||||
#define SDL_ReleaseGPUSampler SDL_ReleaseGPUSampler_REAL
|
||||
#define SDL_ReleaseGPUBuffer SDL_ReleaseGPUBuffer_REAL
|
||||
#define SDL_ReleaseGPUTransferBuffer SDL_ReleaseGPUTransferBuffer_REAL
|
||||
#define SDL_ReleaseGPUComputePipeline SDL_ReleaseGPUComputePipeline_REAL
|
||||
#define SDL_ReleaseGPUShader SDL_ReleaseGPUShader_REAL
|
||||
#define SDL_ReleaseGPUGraphicsPipeline SDL_ReleaseGPUGraphicsPipeline_REAL
|
||||
#define SDL_BeginGPURenderPass SDL_BeginGPURenderPass_REAL
|
||||
#define SDL_BindGPUGraphicsPipeline SDL_BindGPUGraphicsPipeline_REAL
|
||||
#define SDL_SetGPUViewport SDL_SetGPUViewport_REAL
|
||||
#define SDL_SetGPUScissor SDL_SetGPUScissor_REAL
|
||||
#define SDL_BindGPUVertexBuffers SDL_BindGPUVertexBuffers_REAL
|
||||
#define SDL_BindGPUIndexBuffer SDL_BindGPUIndexBuffer_REAL
|
||||
#define SDL_BindGPUVertexSamplers SDL_BindGPUVertexSamplers_REAL
|
||||
#define SDL_BindGPUVertexStorageTextures SDL_BindGPUVertexStorageTextures_REAL
|
||||
#define SDL_BindGPUVertexStorageBuffers SDL_BindGPUVertexStorageBuffers_REAL
|
||||
#define SDL_BindGPUFragmentSamplers SDL_BindGPUFragmentSamplers_REAL
|
||||
#define SDL_BindGPUFragmentStorageTextures SDL_BindGPUFragmentStorageTextures_REAL
|
||||
#define SDL_BindGPUFragmentStorageBuffers SDL_BindGPUFragmentStorageBuffers_REAL
|
||||
#define SDL_PushGPUVertexUniformData SDL_PushGPUVertexUniformData_REAL
|
||||
#define SDL_PushGPUFragmentUniformData SDL_PushGPUFragmentUniformData_REAL
|
||||
#define SDL_DrawGPUIndexedPrimitives SDL_DrawGPUIndexedPrimitives_REAL
|
||||
#define SDL_DrawGPUPrimitives SDL_DrawGPUPrimitives_REAL
|
||||
#define SDL_DrawGPUPrimitivesIndirect SDL_DrawGPUPrimitivesIndirect_REAL
|
||||
#define SDL_DrawGPUIndexedPrimitivesIndirect SDL_DrawGPUIndexedPrimitivesIndirect_REAL
|
||||
#define SDL_EndGPURenderPass SDL_EndGPURenderPass_REAL
|
||||
#define SDL_BeginGPUComputePass SDL_BeginGPUComputePass_REAL
|
||||
#define SDL_BindGPUComputePipeline SDL_BindGPUComputePipeline_REAL
|
||||
#define SDL_BindGPUComputeStorageTextures SDL_BindGPUComputeStorageTextures_REAL
|
||||
#define SDL_BindGPUComputeStorageBuffers SDL_BindGPUComputeStorageBuffers_REAL
|
||||
#define SDL_PushGPUComputeUniformData SDL_PushGPUComputeUniformData_REAL
|
||||
#define SDL_DispatchGPUCompute SDL_DispatchGPUCompute_REAL
|
||||
#define SDL_DispatchGPUComputeIndirect SDL_DispatchGPUComputeIndirect_REAL
|
||||
#define SDL_EndGPUComputePass SDL_EndGPUComputePass_REAL
|
||||
#define SDL_MapGPUTransferBuffer SDL_MapGPUTransferBuffer_REAL
|
||||
#define SDL_UnmapGPUTransferBuffer SDL_UnmapGPUTransferBuffer_REAL
|
||||
#define SDL_BeginGPUCopyPass SDL_BeginGPUCopyPass_REAL
|
||||
#define SDL_UploadToGPUTexture SDL_UploadToGPUTexture_REAL
|
||||
#define SDL_UploadToGPUBuffer SDL_UploadToGPUBuffer_REAL
|
||||
#define SDL_CopyGPUTextureToTexture SDL_CopyGPUTextureToTexture_REAL
|
||||
#define SDL_CopyGPUBufferToBuffer SDL_CopyGPUBufferToBuffer_REAL
|
||||
#define SDL_GenerateGPUMipmaps SDL_GenerateGPUMipmaps_REAL
|
||||
#define SDL_DownloadFromGPUTexture SDL_DownloadFromGPUTexture_REAL
|
||||
#define SDL_DownloadFromGPUBuffer SDL_DownloadFromGPUBuffer_REAL
|
||||
#define SDL_EndGPUCopyPass SDL_EndGPUCopyPass_REAL
|
||||
#define SDL_BlitGPU SDL_BlitGPU_REAL
|
||||
#define SDL_SupportsGPUSwapchainComposition SDL_SupportsGPUSwapchainComposition_REAL
|
||||
#define SDL_SupportsGPUPresentMode SDL_SupportsGPUPresentMode_REAL
|
||||
#define SDL_ClaimGPUWindow SDL_ClaimGPUWindow_REAL
|
||||
#define SDL_UnclaimGPUWindow SDL_UnclaimGPUWindow_REAL
|
||||
#define SDL_SetGPUSwapchainParameters SDL_SetGPUSwapchainParameters_REAL
|
||||
#define SDL_GetGPUSwapchainTextureFormat SDL_GetGPUSwapchainTextureFormat_REAL
|
||||
#define SDL_AcquireGPUCommandBuffer SDL_AcquireGPUCommandBuffer_REAL
|
||||
#define SDL_AcquireGPUSwapchainTexture SDL_AcquireGPUSwapchainTexture_REAL
|
||||
#define SDL_SubmitGPU SDL_SubmitGPU_REAL
|
||||
#define SDL_SubmitGPUAndAcquireFence SDL_SubmitGPUAndAcquireFence_REAL
|
||||
#define SDL_WaitGPU SDL_WaitGPU_REAL
|
||||
#define SDL_WaitGPUForFences SDL_WaitGPUForFences_REAL
|
||||
#define SDL_QueryGPUFence SDL_QueryGPUFence_REAL
|
||||
#define SDL_ReleaseGPUFence SDL_ReleaseGPUFence_REAL
|
||||
#define SDL_GPUTextureFormatTexelBlockSize SDL_GPUTextureFormatTexelBlockSize_REAL
|
||||
#define SDL_SupportsGPUTextureFormat SDL_SupportsGPUTextureFormat_REAL
|
||||
#define SDL_SupportsGPUSampleCount SDL_SupportsGPUSampleCount_REAL
|
||||
#define SDL_GDKSuspendGPU SDL_GDKSuspendGPU_REAL
|
||||
#define SDL_GDKResumeGPU SDL_GDKResumeGPU_REAL
|
||||
@@ -1091,84 +1091,84 @@ SDL_DYNAPI_PROC(size_t,SDL_wcsnlen,(const wchar_t *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsnstr,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsstr,(const wchar_t *a, const wchar_t *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(long,SDL_wcstol,(const wchar_t *a, wchar_t **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_GpuDevice*,SDL_CreateGpuDevice,(SDL_GpuShaderFormat a, SDL_bool b, SDL_bool c, const char *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_GpuDevice*,SDL_CreateGpuDeviceWithProperties,(SDL_PropertiesID a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyGpuDevice,(SDL_GpuDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_GpuDriver,SDL_GetGpuDriver,(SDL_GpuDevice *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GpuComputePipeline*,SDL_CreateGpuComputePipeline,(SDL_GpuDevice *a, SDL_GpuComputePipelineCreateInfo *b),(a,b),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_GpuBuffer*,SDL_CreateGpuBuffer,(SDL_GpuDevice *a, SDL_GpuBufferCreateInfo* b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GpuTransferBuffer*,SDL_CreateGpuTransferBuffer,(SDL_GpuDevice *a, SDL_GpuTransferBufferCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGpuBufferName,(SDL_GpuDevice *a, SDL_GpuBuffer *b, const char *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGpuTextureName,(SDL_GpuDevice *a, SDL_GpuTexture *b, const char *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_InsertGpuDebugLabel,(SDL_GpuCommandBuffer *a, const char *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGpuDebugGroup,(SDL_GpuCommandBuffer *a, const char *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PopGpuDebugGroup,(SDL_GpuCommandBuffer *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuTexture,(SDL_GpuDevice *a, SDL_GpuTexture *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuSampler,(SDL_GpuDevice *a, SDL_GpuSampler *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuBuffer,(SDL_GpuDevice *a, SDL_GpuBuffer *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuTransferBuffer,(SDL_GpuDevice *a, SDL_GpuTransferBuffer *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuComputePipeline,(SDL_GpuDevice *a, SDL_GpuComputePipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuShader,(SDL_GpuDevice *a, SDL_GpuShader *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuGraphicsPipeline,(SDL_GpuDevice *a, SDL_GpuGraphicsPipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_GpuCommandBuffer*,SDL_AcquireGpuCommandBuffer,(SDL_GpuDevice *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGpuVertexUniformData,(SDL_GpuCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGpuFragmentUniformData,(SDL_GpuCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGpuComputeUniformData,(SDL_GpuCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
|
||||
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(void,SDL_BindGpuGraphicsPipeline,(SDL_GpuRenderPass *a, SDL_GpuGraphicsPipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGpuViewport,(SDL_GpuRenderPass *a, SDL_GpuViewport *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGpuScissor,(SDL_GpuRenderPass *a, SDL_Rect *b),(a,b),)
|
||||
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_BindGpuIndexBuffer,(SDL_GpuRenderPass *a, SDL_GpuBufferBinding *b, SDL_GpuIndexElementSize c),(a,b,c),)
|
||||
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_BindGpuVertexStorageTextures,(SDL_GpuRenderPass *a, Uint32 b, SDL_GpuTexture **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_BindGpuFragmentSamplers,(SDL_GpuRenderPass *a, Uint32 b, SDL_GpuTextureSamplerBinding *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_BindGpuFragmentStorageBuffers,(SDL_GpuRenderPass *a, Uint32 b, SDL_GpuBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
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_DrawGpuPrimitives,(SDL_GpuRenderPass *a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DrawGpuPrimitivesIndirect,(SDL_GpuRenderPass *a, SDL_GpuBuffer *b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),)
|
||||
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_EndGpuRenderPass,(SDL_GpuRenderPass *a),(a),)
|
||||
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(void,SDL_BindGpuComputePipeline,(SDL_GpuComputePass *a, SDL_GpuComputePipeline *b),(a,b),)
|
||||
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_BindGpuComputeStorageBuffers,(SDL_GpuComputePass *a, Uint32 b, SDL_GpuBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
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_EndGpuComputePass,(SDL_GpuComputePass *a),(a),)
|
||||
SDL_DYNAPI_PROC(void*,SDL_MapGpuTransferBuffer,(SDL_GpuDevice *a, SDL_GpuTransferBuffer *b, SDL_bool c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnmapGpuTransferBuffer,(SDL_GpuDevice *a, SDL_GpuTransferBuffer *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_GpuCopyPass*,SDL_BeginGpuCopyPass,(SDL_GpuCommandBuffer *a),(a),return)
|
||||
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, SDL_GpuTransferBufferLocation *b, SDL_GpuBufferRegion *c, SDL_bool d),(a,b,c,d),)
|
||||
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, SDL_GpuBufferLocation *b, SDL_GpuBufferLocation *c, Uint32 d, SDL_bool e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GenerateGpuMipmaps,(SDL_GpuCommandBuffer *a, SDL_GpuTexture *b),(a,b),)
|
||||
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, SDL_GpuBufferRegion *b, SDL_GpuTransferBufferLocation *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_EndGpuCopyPass,(SDL_GpuCopyPass *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BlitGpu,(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(SDL_bool,SDL_SupportsGpuSwapchainComposition,(SDL_GpuDevice *a, SDL_Window *b, SDL_GpuSwapchainComposition c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SupportsGpuPresentMode,(SDL_GpuDevice *a, SDL_Window *b, SDL_GpuPresentMode c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_ClaimGpuWindow,(SDL_GpuDevice *a, SDL_Window *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnclaimGpuWindow,(SDL_GpuDevice *a, SDL_Window *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(SDL_GpuTextureFormat,SDL_GetGpuSwapchainTextureFormat,(SDL_GpuDevice *a, SDL_Window *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GpuTexture*,SDL_AcquireGpuSwapchainTexture,(SDL_GpuCommandBuffer *a, SDL_Window *b, Uint32 *c, Uint32 *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SubmitGpu,(SDL_GpuCommandBuffer *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_GpuFence*,SDL_SubmitGpuAndAcquireFence,(SDL_GpuCommandBuffer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitGpu,(SDL_GpuDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitGpuForFences,(SDL_GpuDevice *a, SDL_bool b, SDL_GpuFence **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_QueryGpuFence,(SDL_GpuDevice *a, SDL_GpuFence *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGpuFence,(SDL_GpuDevice *a, SDL_GpuFence *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GpuTextureFormatTexelBlockSize,(SDL_GpuTextureFormat a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SupportsGpuTextureFormat,(SDL_GpuDevice *a, SDL_GpuTextureFormat b, SDL_GpuTextureType c, SDL_GpuTextureUsageFlags d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SupportsGpuSampleCount,(SDL_GpuDevice *a, SDL_GpuTextureFormat b, SDL_GpuSampleCount c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GDKSuspendGpu,(SDL_GpuDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GDKResumeGpu,(SDL_GpuDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDevice,(SDL_GPUShaderFormat a, SDL_bool b, SDL_bool c, const char *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_CreateGPUDeviceWithProperties,(SDL_PropertiesID a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_DestroyGPUDevice,(SDL_GPUDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_GPUDriver,SDL_GetGPUDriver,(SDL_GPUDevice *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUComputePipeline*,SDL_CreateGPUComputePipeline,(SDL_GPUDevice *a, SDL_GPUComputePipelineCreateInfo *b),(a,b),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_GPUBuffer*,SDL_CreateGPUBuffer,(SDL_GPUDevice *a, SDL_GPUBufferCreateInfo* b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUTransferBuffer*,SDL_CreateGPUTransferBuffer,(SDL_GPUDevice *a, SDL_GPUTransferBufferCreateInfo *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUBufferName,(SDL_GPUDevice *a, SDL_GPUBuffer *b, const char *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUTextureName,(SDL_GPUDevice *a, SDL_GPUTexture *b, const char *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_InsertGPUDebugLabel,(SDL_GPUCommandBuffer *a, const char *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGPUDebugGroup,(SDL_GPUCommandBuffer *a, const char *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PopGPUDebugGroup,(SDL_GPUCommandBuffer *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUTexture,(SDL_GPUDevice *a, SDL_GPUTexture *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUSampler,(SDL_GPUDevice *a, SDL_GPUSampler *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUBuffer,(SDL_GPUDevice *a, SDL_GPUBuffer *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUTransferBuffer,(SDL_GPUDevice *a, SDL_GPUTransferBuffer *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUComputePipeline,(SDL_GPUDevice *a, SDL_GPUComputePipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUShader,(SDL_GPUDevice *a, SDL_GPUShader *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUGraphicsPipeline,(SDL_GPUDevice *a, SDL_GPUGraphicsPipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_GPUCommandBuffer*,SDL_AcquireGPUCommandBuffer,(SDL_GPUDevice *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGPUVertexUniformData,(SDL_GPUCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGPUFragmentUniformData,(SDL_GPUCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(void,SDL_PushGPUComputeUniformData,(SDL_GPUCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
|
||||
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(void,SDL_BindGPUGraphicsPipeline,(SDL_GPURenderPass *a, SDL_GPUGraphicsPipeline *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUViewport,(SDL_GPURenderPass *a, SDL_GPUViewport *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetGPUScissor,(SDL_GPURenderPass *a, SDL_Rect *b),(a,b),)
|
||||
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_BindGPUIndexBuffer,(SDL_GPURenderPass *a, SDL_GPUBufferBinding *b, SDL_GPUIndexElementSize c),(a,b,c),)
|
||||
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_BindGPUVertexStorageTextures,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTexture **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_BindGPUFragmentSamplers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUTextureSamplerBinding *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_BindGPUFragmentStorageBuffers,(SDL_GPURenderPass *a, Uint32 b, SDL_GPUBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
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_DrawGPUPrimitives,(SDL_GPURenderPass *a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_DrawGPUPrimitivesIndirect,(SDL_GPURenderPass *a, SDL_GPUBuffer *b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),)
|
||||
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_EndGPURenderPass,(SDL_GPURenderPass *a),(a),)
|
||||
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(void,SDL_BindGPUComputePipeline,(SDL_GPUComputePass *a, SDL_GPUComputePipeline *b),(a,b),)
|
||||
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_BindGPUComputeStorageBuffers,(SDL_GPUComputePass *a, Uint32 b, SDL_GPUBuffer **c, Uint32 d),(a,b,c,d),)
|
||||
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_EndGPUComputePass,(SDL_GPUComputePass *a),(a),)
|
||||
SDL_DYNAPI_PROC(void*,SDL_MapGPUTransferBuffer,(SDL_GPUDevice *a, SDL_GPUTransferBuffer *b, SDL_bool c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnmapGPUTransferBuffer,(SDL_GPUDevice *a, SDL_GPUTransferBuffer *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(SDL_GPUCopyPass*,SDL_BeginGPUCopyPass,(SDL_GPUCommandBuffer *a),(a),return)
|
||||
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, SDL_GPUTransferBufferLocation *b, SDL_GPUBufferRegion *c, SDL_bool d),(a,b,c,d),)
|
||||
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, SDL_GPUBufferLocation *b, SDL_GPUBufferLocation *c, Uint32 d, SDL_bool e),(a,b,c,d,e),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GenerateGPUMipmaps,(SDL_GPUCommandBuffer *a, SDL_GPUTexture *b),(a,b),)
|
||||
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, SDL_GPUBufferRegion *b, SDL_GPUTransferBufferLocation *c),(a,b,c),)
|
||||
SDL_DYNAPI_PROC(void,SDL_EndGPUCopyPass,(SDL_GPUCopyPass *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_BlitGPU,(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(SDL_bool,SDL_SupportsGPUSwapchainComposition,(SDL_GPUDevice *a, SDL_Window *b, SDL_GPUSwapchainComposition c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SupportsGPUPresentMode,(SDL_GPUDevice *a, SDL_Window *b, SDL_GPUPresentMode c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_ClaimGPUWindow,(SDL_GPUDevice *a, SDL_Window *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_UnclaimGPUWindow,(SDL_GPUDevice *a, SDL_Window *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(SDL_GPUTextureFormat,SDL_GetGPUSwapchainTextureFormat,(SDL_GPUDevice *a, SDL_Window *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_GPUTexture*,SDL_AcquireGPUSwapchainTexture,(SDL_GPUCommandBuffer *a, SDL_Window *b, Uint32 *c, Uint32 *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SubmitGPU,(SDL_GPUCommandBuffer *a),(a),)
|
||||
SDL_DYNAPI_PROC(SDL_GPUFence*,SDL_SubmitGPUAndAcquireFence,(SDL_GPUCommandBuffer *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitGPU,(SDL_GPUDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_WaitGPUForFences,(SDL_GPUDevice *a, SDL_bool b, SDL_GPUFence **c, Uint32 d),(a,b,c,d),)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_QueryGPUFence,(SDL_GPUDevice *a, SDL_GPUFence *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_ReleaseGPUFence,(SDL_GPUDevice *a, SDL_GPUFence *b),(a,b),)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GPUTextureFormatTexelBlockSize,(SDL_GPUTextureFormat a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SupportsGPUTextureFormat,(SDL_GPUDevice *a, SDL_GPUTextureFormat b, SDL_GPUTextureType c, SDL_GPUTextureUsageFlags d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_SupportsGPUSampleCount,(SDL_GPUDevice *a, SDL_GPUTextureFormat b, SDL_GPUSampleCount c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_GDKSuspendGPU,(SDL_GPUDevice *a),(a),)
|
||||
SDL_DYNAPI_PROC(void,SDL_GDKResumeGPU,(SDL_GPUDevice *a),(a),)
|
||||
+277
-277
File diff suppressed because it is too large.
Load diff
+206
-206
@@ -28,13 +28,13 @@
|
||||
|
||||
typedef struct Pass
|
||||
{
|
||||
SDL_GpuCommandBuffer *commandBuffer;
|
||||
SDL_GPUCommandBuffer *commandBuffer;
|
||||
SDL_bool inProgress;
|
||||
} Pass;
|
||||
|
||||
typedef struct CommandBufferCommonHeader
|
||||
{
|
||||
SDL_GpuDevice *device;
|
||||
SDL_GPUDevice *device;
|
||||
Pass renderPass;
|
||||
SDL_bool graphicsPipelineBound;
|
||||
Pass computePass;
|
||||
@@ -45,7 +45,7 @@ typedef struct CommandBufferCommonHeader
|
||||
|
||||
typedef struct TextureCommonHeader
|
||||
{
|
||||
SDL_GpuTextureCreateInfo info;
|
||||
SDL_GPUTextureCreateInfo info;
|
||||
} TextureCommonHeader;
|
||||
|
||||
typedef struct BlitFragmentUniforms
|
||||
@@ -62,9 +62,9 @@ typedef struct BlitFragmentUniforms
|
||||
|
||||
typedef struct BlitPipelineCacheEntry
|
||||
{
|
||||
SDL_GpuTextureType type;
|
||||
SDL_GpuTextureFormat format;
|
||||
SDL_GpuGraphicsPipeline *pipeline;
|
||||
SDL_GPUTextureType type;
|
||||
SDL_GPUTextureFormat format;
|
||||
SDL_GPUGraphicsPipeline *pipeline;
|
||||
} BlitPipelineCacheEntry;
|
||||
|
||||
// Internal Helper Utilities
|
||||
@@ -74,7 +74,7 @@ typedef struct BlitPipelineCacheEntry
|
||||
#define SDL_GPU_PRESENTMODE_MAX (SDL_GPU_PRESENTMODE_MAILBOX + 1)
|
||||
|
||||
static inline Sint32 Texture_GetBlockSize(
|
||||
SDL_GpuTextureFormat format)
|
||||
SDL_GPUTextureFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case SDL_GPU_TEXTUREFORMAT_BC1_UNORM:
|
||||
@@ -118,7 +118,7 @@ static inline Sint32 Texture_GetBlockSize(
|
||||
}
|
||||
|
||||
static inline SDL_bool IsDepthFormat(
|
||||
SDL_GpuTextureFormat format)
|
||||
SDL_GPUTextureFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case SDL_GPU_TEXTUREFORMAT_D16_UNORM:
|
||||
@@ -134,7 +134,7 @@ static inline SDL_bool IsDepthFormat(
|
||||
}
|
||||
|
||||
static inline SDL_bool IsStencilFormat(
|
||||
SDL_GpuTextureFormat format)
|
||||
SDL_GPUTextureFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT:
|
||||
@@ -147,7 +147,7 @@ static inline SDL_bool IsStencilFormat(
|
||||
}
|
||||
|
||||
static inline SDL_bool IsIntegerFormat(
|
||||
SDL_GpuTextureFormat format)
|
||||
SDL_GPUTextureFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case SDL_GPU_TEXTUREFORMAT_R8_UINT:
|
||||
@@ -163,14 +163,14 @@ static inline SDL_bool IsIntegerFormat(
|
||||
}
|
||||
}
|
||||
|
||||
static inline Uint32 IndexSize(SDL_GpuIndexElementSize size)
|
||||
static inline Uint32 IndexSize(SDL_GPUIndexElementSize size)
|
||||
{
|
||||
return (size == SDL_GPU_INDEXELEMENTSIZE_16BIT) ? 2 : 4;
|
||||
}
|
||||
|
||||
static inline Uint32 BytesPerRow(
|
||||
Sint32 width,
|
||||
SDL_GpuTextureFormat format)
|
||||
SDL_GPUTextureFormat format)
|
||||
{
|
||||
Uint32 blocksPerRow = width;
|
||||
|
||||
@@ -181,13 +181,13 @@ static inline Uint32 BytesPerRow(
|
||||
blocksPerRow = (width + 3) / 4;
|
||||
}
|
||||
|
||||
return blocksPerRow * SDL_GpuTextureFormatTexelBlockSize(format);
|
||||
return blocksPerRow * SDL_GPUTextureFormatTexelBlockSize(format);
|
||||
}
|
||||
|
||||
static inline Sint32 BytesPerImage(
|
||||
Uint32 width,
|
||||
Uint32 height,
|
||||
SDL_GpuTextureFormat format)
|
||||
SDL_GPUTextureFormat format)
|
||||
{
|
||||
Uint32 blocksPerRow = width;
|
||||
Uint32 blocksPerColumn = height;
|
||||
@@ -200,7 +200,7 @@ static inline Sint32 BytesPerImage(
|
||||
blocksPerColumn = (height + 3) / 4;
|
||||
}
|
||||
|
||||
return blocksPerRow * blocksPerColumn * SDL_GpuTextureFormatTexelBlockSize(format);
|
||||
return blocksPerRow * blocksPerColumn * SDL_GPUTextureFormatTexelBlockSize(format);
|
||||
}
|
||||
|
||||
// GraphicsDevice Limits
|
||||
@@ -233,33 +233,33 @@ static inline Sint32 BytesPerImage(
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
SDL_GpuGraphicsPipeline *SDL_Gpu_FetchBlitPipeline(
|
||||
SDL_GpuDevice *device,
|
||||
SDL_GpuTextureType sourceTextureType,
|
||||
SDL_GpuTextureFormat destinationFormat,
|
||||
SDL_GpuShader *blitVertexShader,
|
||||
SDL_GpuShader *blitFrom2DShader,
|
||||
SDL_GpuShader *blitFrom2DArrayShader,
|
||||
SDL_GpuShader *blitFrom3DShader,
|
||||
SDL_GpuShader *blitFromCubeShader,
|
||||
SDL_GPUGraphicsPipeline *SDL_GPU_FetchBlitPipeline(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTextureType sourceTextureType,
|
||||
SDL_GPUTextureFormat destinationFormat,
|
||||
SDL_GPUShader *blitVertexShader,
|
||||
SDL_GPUShader *blitFrom2DShader,
|
||||
SDL_GPUShader *blitFrom2DArrayShader,
|
||||
SDL_GPUShader *blitFrom3DShader,
|
||||
SDL_GPUShader *blitFromCubeShader,
|
||||
BlitPipelineCacheEntry **blitPipelines,
|
||||
Uint32 *blitPipelineCount,
|
||||
Uint32 *blitPipelineCapacity);
|
||||
|
||||
void SDL_Gpu_BlitCommon(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBlitRegion *source,
|
||||
SDL_GpuBlitRegion *destination,
|
||||
void SDL_GPU_BlitCommon(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GpuFilter filterMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
SDL_bool cycle,
|
||||
SDL_GpuSampler *blitLinearSampler,
|
||||
SDL_GpuSampler *blitNearestSampler,
|
||||
SDL_GpuShader *blitVertexShader,
|
||||
SDL_GpuShader *blitFrom2DShader,
|
||||
SDL_GpuShader *blitFrom2DArrayShader,
|
||||
SDL_GpuShader *blitFrom3DShader,
|
||||
SDL_GpuShader *blitFromCubeShader,
|
||||
SDL_GPUSampler *blitLinearSampler,
|
||||
SDL_GPUSampler *blitNearestSampler,
|
||||
SDL_GPUShader *blitVertexShader,
|
||||
SDL_GPUShader *blitFrom2DShader,
|
||||
SDL_GPUShader *blitFrom2DArrayShader,
|
||||
SDL_GPUShader *blitFrom3DShader,
|
||||
SDL_GPUShader *blitFromCubeShader,
|
||||
BlitPipelineCacheEntry **blitPipelines,
|
||||
Uint32 *blitPipelineCount,
|
||||
Uint32 *blitPipelineCapacity);
|
||||
@@ -268,182 +268,182 @@ void SDL_Gpu_BlitCommon(
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
// SDL_GpuDevice Definition
|
||||
// SDL_GPUDevice Definition
|
||||
|
||||
typedef struct SDL_GpuRenderer SDL_GpuRenderer;
|
||||
typedef struct SDL_GPURenderer SDL_GPURenderer;
|
||||
|
||||
struct SDL_GpuDevice
|
||||
struct SDL_GPUDevice
|
||||
{
|
||||
// Quit
|
||||
|
||||
void (*DestroyDevice)(SDL_GpuDevice *device);
|
||||
void (*DestroyDevice)(SDL_GPUDevice *device);
|
||||
|
||||
// State Creation
|
||||
|
||||
SDL_GpuComputePipeline *(*CreateComputePipeline)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuComputePipelineCreateInfo *pipelineCreateInfo);
|
||||
SDL_GPUComputePipeline *(*CreateComputePipeline)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo);
|
||||
|
||||
SDL_GpuGraphicsPipeline *(*CreateGraphicsPipeline)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuGraphicsPipelineCreateInfo *pipelineCreateInfo);
|
||||
SDL_GPUGraphicsPipeline *(*CreateGraphicsPipeline)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo);
|
||||
|
||||
SDL_GpuSampler *(*CreateSampler)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuSamplerCreateInfo *samplerCreateInfo);
|
||||
SDL_GPUSampler *(*CreateSampler)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo);
|
||||
|
||||
SDL_GpuShader *(*CreateShader)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuShaderCreateInfo *shaderCreateInfo);
|
||||
SDL_GPUShader *(*CreateShader)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo);
|
||||
|
||||
SDL_GpuTexture *(*CreateTexture)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTextureCreateInfo *textureCreateInfo);
|
||||
SDL_GPUTexture *(*CreateTexture)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo);
|
||||
|
||||
SDL_GpuBuffer *(*CreateBuffer)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuBufferUsageFlags usageFlags,
|
||||
SDL_GPUBuffer *(*CreateBuffer)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUBufferUsageFlags usageFlags,
|
||||
Uint32 sizeInBytes);
|
||||
|
||||
SDL_GpuTransferBuffer *(*CreateTransferBuffer)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTransferBufferUsage usage,
|
||||
SDL_GPUTransferBuffer *(*CreateTransferBuffer)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTransferBufferUsage usage,
|
||||
Uint32 sizeInBytes);
|
||||
|
||||
// Debug Naming
|
||||
|
||||
void (*SetBufferName)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuBuffer *buffer,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUBuffer *buffer,
|
||||
const char *text);
|
||||
|
||||
void (*SetTextureName)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTexture *texture,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTexture *texture,
|
||||
const char *text);
|
||||
|
||||
void (*InsertDebugLabel)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
const char *text);
|
||||
|
||||
void (*PushDebugGroup)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
const char *name);
|
||||
|
||||
void (*PopDebugGroup)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
// Disposal
|
||||
|
||||
void (*ReleaseTexture)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTexture *texture);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTexture *texture);
|
||||
|
||||
void (*ReleaseSampler)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuSampler *sampler);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSampler *sampler);
|
||||
|
||||
void (*ReleaseBuffer)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuBuffer *buffer);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUBuffer *buffer);
|
||||
|
||||
void (*ReleaseTransferBuffer)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTransferBuffer *transferBuffer);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTransferBuffer *transferBuffer);
|
||||
|
||||
void (*ReleaseShader)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuShader *shader);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShader *shader);
|
||||
|
||||
void (*ReleaseComputePipeline)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuComputePipeline *computePipeline);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipeline *computePipeline);
|
||||
|
||||
void (*ReleaseGraphicsPipeline)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuGraphicsPipeline *graphicsPipeline);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipeline *graphicsPipeline);
|
||||
|
||||
// Render Pass
|
||||
|
||||
void (*BeginRenderPass)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuColorAttachmentInfo *colorAttachmentInfos,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GpuDepthStencilAttachmentInfo *depthStencilAttachmentInfo);
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo);
|
||||
|
||||
void (*BindGraphicsPipeline)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuGraphicsPipeline *graphicsPipeline);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUGraphicsPipeline *graphicsPipeline);
|
||||
|
||||
void (*SetViewport)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuViewport *viewport);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport);
|
||||
|
||||
void (*SetScissor)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor);
|
||||
|
||||
void (*BindVertexBuffers)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GpuBufferBinding *pBindings,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindIndexBuffer)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBufferBinding *pBinding,
|
||||
SDL_GpuIndexElementSize indexElementSize);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize);
|
||||
|
||||
void (*BindVertexSamplers)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuTextureSamplerBinding *textureSamplerBindings,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindVertexStorageTextures)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuTexture **storageTextures,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindVertexStorageBuffers)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuBuffer **storageBuffers,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindFragmentSamplers)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuTextureSamplerBinding *textureSamplerBindings,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindFragmentStorageTextures)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuTexture **storageTextures,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindFragmentStorageBuffers)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuBuffer **storageBuffers,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*PushVertexUniformData)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 slotIndex,
|
||||
const void *data,
|
||||
Uint32 dataLengthInBytes);
|
||||
|
||||
void (*PushFragmentUniformData)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 slotIndex,
|
||||
const void *data,
|
||||
Uint32 dataLengthInBytes);
|
||||
|
||||
void (*DrawIndexedPrimitives)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 indexCount,
|
||||
Uint32 instanceCount,
|
||||
Uint32 firstIndex,
|
||||
@@ -451,227 +451,227 @@ struct SDL_GpuDevice
|
||||
Uint32 firstInstance);
|
||||
|
||||
void (*DrawPrimitives)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 vertexCount,
|
||||
Uint32 instanceCount,
|
||||
Uint32 firstVertex,
|
||||
Uint32 firstInstance);
|
||||
|
||||
void (*DrawPrimitivesIndirect)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBuffer *buffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBuffer *buffer,
|
||||
Uint32 offsetInBytes,
|
||||
Uint32 drawCount,
|
||||
Uint32 stride);
|
||||
|
||||
void (*DrawIndexedPrimitivesIndirect)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBuffer *buffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBuffer *buffer,
|
||||
Uint32 offsetInBytes,
|
||||
Uint32 drawCount,
|
||||
Uint32 stride);
|
||||
|
||||
void (*EndRenderPass)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
// Compute Pass
|
||||
|
||||
void (*BeginComputePass)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GpuStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount);
|
||||
|
||||
void (*BindComputePipeline)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuComputePipeline *computePipeline);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUComputePipeline *computePipeline);
|
||||
|
||||
void (*BindComputeStorageTextures)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuTexture **storageTextures,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*BindComputeStorageBuffers)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GpuBuffer **storageBuffers,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
Uint32 bindingCount);
|
||||
|
||||
void (*PushComputeUniformData)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 slotIndex,
|
||||
const void *data,
|
||||
Uint32 dataLengthInBytes);
|
||||
|
||||
void (*DispatchCompute)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 groupCountX,
|
||||
Uint32 groupCountY,
|
||||
Uint32 groupCountZ);
|
||||
|
||||
void (*DispatchComputeIndirect)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBuffer *buffer,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBuffer *buffer,
|
||||
Uint32 offsetInBytes);
|
||||
|
||||
void (*EndComputePass)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
// TransferBuffer Data
|
||||
|
||||
void *(*MapTransferBuffer)(
|
||||
SDL_GpuRenderer *device,
|
||||
SDL_GpuTransferBuffer *transferBuffer,
|
||||
SDL_GPURenderer *device,
|
||||
SDL_GPUTransferBuffer *transferBuffer,
|
||||
SDL_bool cycle);
|
||||
|
||||
void (*UnmapTransferBuffer)(
|
||||
SDL_GpuRenderer *device,
|
||||
SDL_GpuTransferBuffer *transferBuffer);
|
||||
SDL_GPURenderer *device,
|
||||
SDL_GPUTransferBuffer *transferBuffer);
|
||||
|
||||
// Copy Pass
|
||||
|
||||
void (*BeginCopyPass)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
void (*UploadToTexture)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuTextureTransferInfo *source,
|
||||
SDL_GpuTextureRegion *destination,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
SDL_bool cycle);
|
||||
|
||||
void (*UploadToBuffer)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuTransferBufferLocation *source,
|
||||
SDL_GpuBufferRegion *destination,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
SDL_bool cycle);
|
||||
|
||||
void (*CopyTextureToTexture)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuTextureLocation *source,
|
||||
SDL_GpuTextureLocation *destination,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
SDL_bool cycle);
|
||||
|
||||
void (*CopyBufferToBuffer)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBufferLocation *source,
|
||||
SDL_GpuBufferLocation *destination,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
SDL_bool cycle);
|
||||
|
||||
void (*GenerateMipmaps)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuTexture *texture);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTexture *texture);
|
||||
|
||||
void (*DownloadFromTexture)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuTextureRegion *source,
|
||||
SDL_GpuTextureTransferInfo *destination);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination);
|
||||
|
||||
void (*DownloadFromBuffer)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBufferRegion *source,
|
||||
SDL_GpuTransferBufferLocation *destination);
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination);
|
||||
|
||||
void (*EndCopyPass)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
void (*Blit)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GpuBlitRegion *source,
|
||||
SDL_GpuBlitRegion *destination,
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GpuFilter filterMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
SDL_bool cycle);
|
||||
|
||||
// Submission/Presentation
|
||||
|
||||
SDL_bool (*SupportsSwapchainComposition)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window,
|
||||
SDL_GpuSwapchainComposition swapchainComposition);
|
||||
SDL_GPUSwapchainComposition swapchainComposition);
|
||||
|
||||
SDL_bool (*SupportsPresentMode)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window,
|
||||
SDL_GpuPresentMode presentMode);
|
||||
SDL_GPUPresentMode presentMode);
|
||||
|
||||
SDL_bool (*ClaimWindow)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
|
||||
void (*UnclaimWindow)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
|
||||
SDL_bool (*SetSwapchainParameters)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window,
|
||||
SDL_GpuSwapchainComposition swapchainComposition,
|
||||
SDL_GpuPresentMode presentMode);
|
||||
SDL_GPUSwapchainComposition swapchainComposition,
|
||||
SDL_GPUPresentMode presentMode);
|
||||
|
||||
SDL_GpuTextureFormat (*GetSwapchainTextureFormat)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPUTextureFormat (*GetSwapchainTextureFormat)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
|
||||
SDL_GpuCommandBuffer *(*AcquireCommandBuffer)(
|
||||
SDL_GpuRenderer *driverData);
|
||||
SDL_GPUCommandBuffer *(*AcquireCommandBuffer)(
|
||||
SDL_GPURenderer *driverData);
|
||||
|
||||
SDL_GpuTexture *(*AcquireSwapchainTexture)(
|
||||
SDL_GpuCommandBuffer *commandBuffer,
|
||||
SDL_GPUTexture *(*AcquireSwapchainTexture)(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Window *window,
|
||||
Uint32 *pWidth,
|
||||
Uint32 *pHeight);
|
||||
|
||||
void (*Submit)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
SDL_GpuFence *(*SubmitAndAcquireFence)(
|
||||
SDL_GpuCommandBuffer *commandBuffer);
|
||||
SDL_GPUFence *(*SubmitAndAcquireFence)(
|
||||
SDL_GPUCommandBuffer *commandBuffer);
|
||||
|
||||
void (*Wait)(
|
||||
SDL_GpuRenderer *driverData);
|
||||
SDL_GPURenderer *driverData);
|
||||
|
||||
void (*WaitForFences)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_bool waitAll,
|
||||
SDL_GpuFence **pFences,
|
||||
SDL_GPUFence **pFences,
|
||||
Uint32 fenceCount);
|
||||
|
||||
SDL_bool (*QueryFence)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuFence *fence);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUFence *fence);
|
||||
|
||||
void (*ReleaseFence)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuFence *fence);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUFence *fence);
|
||||
|
||||
// Feature Queries
|
||||
|
||||
SDL_bool (*SupportsTextureFormat)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTextureFormat format,
|
||||
SDL_GpuTextureType type,
|
||||
SDL_GpuTextureUsageFlags usage);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureFormat format,
|
||||
SDL_GPUTextureType type,
|
||||
SDL_GPUTextureUsageFlags usage);
|
||||
|
||||
SDL_bool (*SupportsSampleCount)(
|
||||
SDL_GpuRenderer *driverData,
|
||||
SDL_GpuTextureFormat format,
|
||||
SDL_GpuSampleCount desiredSampleCount);
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureFormat format,
|
||||
SDL_GPUSampleCount desiredSampleCount);
|
||||
|
||||
// Opaque pointer for the Driver
|
||||
SDL_GpuRenderer *driverData;
|
||||
SDL_GPURenderer *driverData;
|
||||
|
||||
// Store this for SDL_GetGpuDriver()
|
||||
SDL_GpuDriver backend;
|
||||
// Store this for SDL_GetGPUDriver()
|
||||
SDL_GPUDriver backend;
|
||||
|
||||
// Store this for SDL_gpu.c's debug layer
|
||||
SDL_bool debugMode;
|
||||
SDL_GpuShaderFormat shaderFormats;
|
||||
SDL_GPUShaderFormat shaderFormats;
|
||||
};
|
||||
|
||||
#define ASSIGN_DRIVER_FUNC(func, name) \
|
||||
@@ -753,24 +753,24 @@ struct SDL_GpuDevice
|
||||
ASSIGN_DRIVER_FUNC(SupportsTextureFormat, name) \
|
||||
ASSIGN_DRIVER_FUNC(SupportsSampleCount, name)
|
||||
|
||||
typedef struct SDL_GpuBootstrap
|
||||
typedef struct SDL_GPUBootstrap
|
||||
{
|
||||
const char *Name;
|
||||
const SDL_GpuDriver backendflag;
|
||||
const SDL_GpuShaderFormat shaderFormats;
|
||||
const SDL_GPUDriver backendflag;
|
||||
const SDL_GPUShaderFormat shaderFormats;
|
||||
SDL_bool (*PrepareDriver)(SDL_VideoDevice *_this);
|
||||
SDL_GpuDevice *(*CreateDevice)(SDL_bool debugMode, SDL_bool preferLowPower, SDL_PropertiesID props);
|
||||
} SDL_GpuBootstrap;
|
||||
SDL_GPUDevice *(*CreateDevice)(SDL_bool debugMode, SDL_bool preferLowPower, SDL_PropertiesID props);
|
||||
} SDL_GPUBootstrap;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern SDL_GpuBootstrap VulkanDriver;
|
||||
extern SDL_GpuBootstrap D3D11Driver;
|
||||
extern SDL_GpuBootstrap D3D12Driver;
|
||||
extern SDL_GpuBootstrap MetalDriver;
|
||||
extern SDL_GpuBootstrap PS5Driver;
|
||||
extern SDL_GPUBootstrap VulkanDriver;
|
||||
extern SDL_GPUBootstrap D3D11Driver;
|
||||
extern SDL_GPUBootstrap D3D12Driver;
|
||||
extern SDL_GPUBootstrap MetalDriver;
|
||||
extern SDL_GPUBootstrap PS5Driver;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+232
-232
File diff suppressed because it is too large.
Load diff
+259
-259
File diff suppressed because it is too large.
Load diff
+219
-219
File diff suppressed because it is too large.
Load diff
+227
-227
File diff suppressed because it is too large.
Load diff
@@ -891,7 +891,7 @@ static HRESULT D3D12_CreateDeviceResources(SDL_Renderer *renderer)
|
||||
D3D_GUID(SDL_IID_IDXGIAdapter4),
|
||||
(void **)&data->dxgiAdapter);
|
||||
if (FAILED(result)) {
|
||||
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory6::EnumAdapterByGpuPreference"), result);
|
||||
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("IDXGIFactory6::EnumAdapterByGPUPreference"), result);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
#ifndef SDL_gpu_util_h_
|
||||
#define SDL_gpu_util_h_
|
||||
|
||||
#define SDL_GPU_BLENDOP_INVALID ((SDL_GpuBlendOp)0x7fffffff)
|
||||
#define SDL_GPU_BLENDFACTOR_INVALID ((SDL_GpuBlendFactor)0x7fffffff)
|
||||
#define SDL_GPU_BLENDOP_INVALID ((SDL_GPUBlendOp)0x7fffffff)
|
||||
#define SDL_GPU_BLENDFACTOR_INVALID ((SDL_GPUBlendFactor)0x7fffffff)
|
||||
|
||||
static SDL_INLINE SDL_GpuBlendFactor GPU_ConvertBlendFactor(SDL_BlendFactor factor)
|
||||
static SDL_INLINE SDL_GPUBlendFactor GPU_ConvertBlendFactor(SDL_BlendFactor factor)
|
||||
{
|
||||
switch (factor) {
|
||||
case SDL_BLENDFACTOR_ZERO:
|
||||
@@ -53,7 +53,7 @@ static SDL_INLINE SDL_GpuBlendFactor GPU_ConvertBlendFactor(SDL_BlendFactor fact
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_INLINE SDL_GpuBlendOp GPU_ConvertBlendOperation(SDL_BlendOperation operation)
|
||||
static SDL_INLINE SDL_GPUBlendOp GPU_ConvertBlendOperation(SDL_BlendOperation operation)
|
||||
{
|
||||
switch (operation) {
|
||||
case SDL_BLENDOPERATION_ADD:
|
||||
|
||||
@@ -47,7 +47,7 @@ SDL_COMPILE_TIME_ASSERT(GPU_PipelineCacheKey_Size, sizeof(GPU_PipelineCacheKey)
|
||||
typedef struct GPU_PipelineCacheEntry
|
||||
{
|
||||
GPU_PipelineCacheKey key;
|
||||
SDL_GpuGraphicsPipeline *pipeline;
|
||||
SDL_GPUGraphicsPipeline *pipeline;
|
||||
} GPU_PipelineCacheEntry;
|
||||
|
||||
static Uint32 HashPipelineCacheKey(const GPU_PipelineCacheKey *key)
|
||||
@@ -74,13 +74,13 @@ static bool MatchPipelineCacheKey(const void *a, const void *b, void *data)
|
||||
static void NukePipelineCacheEntry(const void *key, const void *value, void *data)
|
||||
{
|
||||
GPU_PipelineCacheEntry *entry = (GPU_PipelineCacheEntry *)value;
|
||||
SDL_GpuDevice *device = data;
|
||||
SDL_GPUDevice *device = data;
|
||||
|
||||
SDL_ReleaseGpuGraphicsPipeline(device, entry->pipeline);
|
||||
SDL_ReleaseGPUGraphicsPipeline(device, entry->pipeline);
|
||||
SDL_free(entry);
|
||||
}
|
||||
|
||||
bool GPU_InitPipelineCache(GPU_PipelineCache *cache, SDL_GpuDevice *device)
|
||||
bool GPU_InitPipelineCache(GPU_PipelineCache *cache, SDL_GPUDevice *device)
|
||||
{
|
||||
// FIXME how many buckets do we need?
|
||||
cache->table = SDL_CreateHashTable(device, 32, HashPassthrough, MatchPipelineCacheKey, NukePipelineCacheEntry, true);
|
||||
@@ -93,9 +93,9 @@ void GPU_DestroyPipelineCache(GPU_PipelineCache *cache)
|
||||
SDL_DestroyHashTable(cache->table);
|
||||
}
|
||||
|
||||
static SDL_GpuGraphicsPipeline *MakePipeline(SDL_GpuDevice *device, GPU_Shaders *shaders, const GPU_PipelineParameters *params)
|
||||
static SDL_GPUGraphicsPipeline *MakePipeline(SDL_GPUDevice *device, GPU_Shaders *shaders, const GPU_PipelineParameters *params)
|
||||
{
|
||||
SDL_GpuColorAttachmentDescription ad;
|
||||
SDL_GPUColorAttachmentDescription ad;
|
||||
SDL_zero(ad);
|
||||
ad.format = params->attachment_format;
|
||||
|
||||
@@ -109,7 +109,7 @@ static SDL_GpuGraphicsPipeline *MakePipeline(SDL_GpuDevice *device, GPU_Shaders
|
||||
ad.blendState.dstColorBlendFactor = GPU_ConvertBlendFactor(SDL_GetBlendModeDstColorFactor(blend));
|
||||
ad.blendState.srcColorBlendFactor = GPU_ConvertBlendFactor(SDL_GetBlendModeSrcColorFactor(blend));
|
||||
|
||||
SDL_GpuGraphicsPipelineCreateInfo pci;
|
||||
SDL_GPUGraphicsPipelineCreateInfo pci;
|
||||
SDL_zero(pci);
|
||||
pci.attachmentInfo.hasDepthStencilAttachment = false;
|
||||
pci.attachmentInfo.colorAttachmentCount = 1;
|
||||
@@ -124,11 +124,11 @@ static SDL_GpuGraphicsPipeline *MakePipeline(SDL_GpuDevice *device, GPU_Shaders
|
||||
pci.rasterizerState.fillMode = SDL_GPU_FILLMODE_FILL;
|
||||
pci.rasterizerState.frontFace = SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE;
|
||||
|
||||
SDL_GpuVertexBinding bind;
|
||||
SDL_GPUVertexBinding bind;
|
||||
SDL_zero(bind);
|
||||
|
||||
Uint32 num_attribs = 0;
|
||||
SDL_GpuVertexAttribute attribs[4];
|
||||
SDL_GPUVertexAttribute attribs[4];
|
||||
SDL_zero(attribs);
|
||||
|
||||
bool have_attr_color = false;
|
||||
@@ -175,7 +175,7 @@ static SDL_GpuGraphicsPipeline *MakePipeline(SDL_GpuDevice *device, GPU_Shaders
|
||||
pci.vertexInputState.vertexBindingCount = 1;
|
||||
pci.vertexInputState.vertexBindings = &bind;
|
||||
|
||||
return SDL_CreateGpuGraphicsPipeline(device, &pci);
|
||||
return SDL_CreateGPUGraphicsPipeline(device, &pci);
|
||||
}
|
||||
|
||||
static GPU_PipelineCacheKey MakePipelineCacheKey(const GPU_PipelineParameters *params)
|
||||
@@ -190,11 +190,11 @@ static GPU_PipelineCacheKey MakePipelineCacheKey(const GPU_PipelineParameters *p
|
||||
return key;
|
||||
}
|
||||
|
||||
SDL_GpuGraphicsPipeline *GPU_GetPipeline(GPU_PipelineCache *cache, GPU_Shaders *shaders, SDL_GpuDevice *device, const GPU_PipelineParameters *params)
|
||||
SDL_GPUGraphicsPipeline *GPU_GetPipeline(GPU_PipelineCache *cache, GPU_Shaders *shaders, SDL_GPUDevice *device, const GPU_PipelineParameters *params)
|
||||
{
|
||||
GPU_PipelineCacheKey key = MakePipelineCacheKey(params);
|
||||
void *keyval = (void *)(uintptr_t)HashPipelineCacheKey(&key);
|
||||
SDL_GpuGraphicsPipeline *pipeline = NULL;
|
||||
SDL_GPUGraphicsPipeline *pipeline = NULL;
|
||||
|
||||
void *iter = NULL;
|
||||
GPU_PipelineCacheEntry *entry = NULL;
|
||||
|
||||
@@ -33,8 +33,8 @@ typedef struct GPU_PipelineParameters
|
||||
SDL_BlendMode blend_mode;
|
||||
GPU_FragmentShaderID frag_shader;
|
||||
GPU_VertexShaderID vert_shader;
|
||||
SDL_GpuTextureFormat attachment_format;
|
||||
SDL_GpuPrimitiveType primitive_type;
|
||||
SDL_GPUTextureFormat attachment_format;
|
||||
SDL_GPUPrimitiveType primitive_type;
|
||||
} GPU_PipelineParameters;
|
||||
|
||||
typedef struct GPU_PipelineCache
|
||||
@@ -42,8 +42,8 @@ typedef struct GPU_PipelineCache
|
||||
SDL_HashTable *table;
|
||||
} GPU_PipelineCache;
|
||||
|
||||
extern bool GPU_InitPipelineCache(GPU_PipelineCache *cache, SDL_GpuDevice *device);
|
||||
extern bool GPU_InitPipelineCache(GPU_PipelineCache *cache, SDL_GPUDevice *device);
|
||||
extern void GPU_DestroyPipelineCache(GPU_PipelineCache *cache);
|
||||
extern SDL_GpuGraphicsPipeline *GPU_GetPipeline(GPU_PipelineCache *cache, GPU_Shaders *shaders, SDL_GpuDevice *device, const GPU_PipelineParameters *params);
|
||||
extern SDL_GPUGraphicsPipeline *GPU_GetPipeline(GPU_PipelineCache *cache, GPU_Shaders *shaders, SDL_GPUDevice *device, const GPU_PipelineParameters *params);
|
||||
|
||||
#endif // SDL_pipeline_gpu_h_
|
||||
+125
-125
@@ -37,39 +37,39 @@ typedef struct GPU_ShaderUniformData
|
||||
|
||||
typedef struct GPU_RenderData
|
||||
{
|
||||
SDL_GpuDevice *device;
|
||||
SDL_GPUDevice *device;
|
||||
GPU_Shaders shaders;
|
||||
GPU_PipelineCache pipeline_cache;
|
||||
SDL_GpuFence *present_fence;
|
||||
SDL_GPUFence *present_fence;
|
||||
|
||||
struct
|
||||
{
|
||||
SDL_GpuTexture *texture;
|
||||
SDL_GpuTextureFormat format;
|
||||
SDL_GPUTexture *texture;
|
||||
SDL_GPUTextureFormat format;
|
||||
Uint32 width;
|
||||
Uint32 height;
|
||||
} backbuffer;
|
||||
|
||||
struct
|
||||
{
|
||||
SDL_GpuSwapchainComposition composition;
|
||||
SDL_GpuPresentMode present_mode;
|
||||
SDL_GPUSwapchainComposition composition;
|
||||
SDL_GPUPresentMode present_mode;
|
||||
} swapchain;
|
||||
|
||||
struct
|
||||
{
|
||||
SDL_GpuTransferBuffer *transfer_buf;
|
||||
SDL_GpuBuffer *buffer;
|
||||
SDL_GPUTransferBuffer *transfer_buf;
|
||||
SDL_GPUBuffer *buffer;
|
||||
Uint32 buffer_size;
|
||||
} vertices;
|
||||
|
||||
struct
|
||||
{
|
||||
SDL_GpuRenderPass *render_pass;
|
||||
SDL_GPURenderPass *render_pass;
|
||||
SDL_Texture *render_target;
|
||||
SDL_GpuCommandBuffer *command_buffer;
|
||||
SDL_GpuColorAttachmentInfo color_attachment;
|
||||
SDL_GpuViewport viewport;
|
||||
SDL_GPUCommandBuffer *command_buffer;
|
||||
SDL_GPUColorAttachmentInfo color_attachment;
|
||||
SDL_GPUViewport viewport;
|
||||
SDL_Rect scissor;
|
||||
SDL_FColor draw_color;
|
||||
bool scissor_enabled;
|
||||
@@ -77,13 +77,13 @@ typedef struct GPU_RenderData
|
||||
GPU_ShaderUniformData shader_data;
|
||||
} state;
|
||||
|
||||
SDL_GpuSampler *samplers[3][2];
|
||||
SDL_GPUSampler *samplers[3][2];
|
||||
} GPU_RenderData;
|
||||
|
||||
typedef struct GPU_TextureData
|
||||
{
|
||||
SDL_GpuTexture *texture;
|
||||
SDL_GpuTextureFormat format;
|
||||
SDL_GPUTexture *texture;
|
||||
SDL_GPUTextureFormat format;
|
||||
GPU_FragmentShaderID shader;
|
||||
void *pixels;
|
||||
int pitch;
|
||||
@@ -111,7 +111,7 @@ static bool GPU_SupportsBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMod
|
||||
return true;
|
||||
}
|
||||
|
||||
static SDL_GpuTextureFormat PixFormatToTexFormat(SDL_PixelFormat pixel_format)
|
||||
static SDL_GPUTextureFormat PixFormatToTexFormat(SDL_PixelFormat pixel_format)
|
||||
{
|
||||
switch (pixel_format) {
|
||||
case SDL_PIXELFORMAT_BGRA32:
|
||||
@@ -132,7 +132,7 @@ static SDL_GpuTextureFormat PixFormatToTexFormat(SDL_PixelFormat pixel_format)
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_PixelFormat TexFormatToPixFormat(SDL_GpuTextureFormat tex_format)
|
||||
static SDL_PixelFormat TexFormatToPixFormat(SDL_GPUTextureFormat tex_format)
|
||||
{
|
||||
switch (tex_format) {
|
||||
case SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM:
|
||||
@@ -172,13 +172,13 @@ static bool GPU_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_
|
||||
{
|
||||
GPU_RenderData *renderdata = (GPU_RenderData *)renderer->internal;
|
||||
GPU_TextureData *data;
|
||||
SDL_GpuTextureFormat format;
|
||||
SDL_GpuTextureUsageFlags usage = SDL_GPU_TEXTUREUSAGE_SAMPLER_BIT;
|
||||
SDL_GPUTextureFormat format;
|
||||
SDL_GPUTextureUsageFlags usage = SDL_GPU_TEXTUREUSAGE_SAMPLER_BIT;
|
||||
|
||||
format = PixFormatToTexFormat(texture->format);
|
||||
|
||||
if (format == SDL_GPU_TEXTUREFORMAT_INVALID) {
|
||||
return SDL_SetError("Texture format %s not supported by SDL_Gpu",
|
||||
return SDL_SetError("Texture format %s not supported by SDL_GPU",
|
||||
SDL_GetPixelFormatName(texture->format));
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ static bool GPU_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_
|
||||
}
|
||||
|
||||
texture->internal = data;
|
||||
SDL_GpuTextureCreateInfo tci;
|
||||
SDL_GPUTextureCreateInfo tci;
|
||||
SDL_zero(tci);
|
||||
tci.format = format;
|
||||
tci.layerCountOrDepth = 1;
|
||||
@@ -226,7 +226,7 @@ static bool GPU_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_
|
||||
tci.sampleCount = SDL_GPU_SAMPLECOUNT_1;
|
||||
|
||||
data->format = format;
|
||||
data->texture = SDL_CreateGpuTexture(renderdata->device, &tci);
|
||||
data->texture = SDL_CreateGPUTexture(renderdata->device, &tci);
|
||||
|
||||
if (!data->texture) {
|
||||
return false;
|
||||
@@ -251,24 +251,24 @@ static bool GPU_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||
Uint32 row_size = texturebpp * rect->w;
|
||||
Uint32 data_size = row_size * rect->h;
|
||||
|
||||
SDL_GpuTransferBufferCreateInfo tbci;
|
||||
SDL_GPUTransferBufferCreateInfo tbci;
|
||||
SDL_zero(tbci);
|
||||
tbci.sizeInBytes = data_size;
|
||||
tbci.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
|
||||
|
||||
SDL_GpuTransferBuffer *tbuf = SDL_CreateGpuTransferBuffer(renderdata->device, &tbci);
|
||||
SDL_GPUTransferBuffer *tbuf = SDL_CreateGPUTransferBuffer(renderdata->device, &tbci);
|
||||
|
||||
if (tbuf == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Uint8 *output = SDL_MapGpuTransferBuffer(renderdata->device, tbuf, false);
|
||||
Uint8 *output = SDL_MapGPUTransferBuffer(renderdata->device, tbuf, false);
|
||||
|
||||
if (pitch == row_size) {
|
||||
memcpy(output, pixels, data_size);
|
||||
} else {
|
||||
// FIXME is negative pitch supposed to work?
|
||||
// If not, maybe use SDL_GpuTextureTransferInfo::imagePitch instead of this
|
||||
// If not, maybe use SDL_GPUTextureTransferInfo::imagePitch instead of this
|
||||
const Uint8 *input = pixels;
|
||||
|
||||
for (int i = 0; i < rect->h; ++i) {
|
||||
@@ -278,18 +278,18 @@ static bool GPU_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||
}
|
||||
}
|
||||
|
||||
SDL_UnmapGpuTransferBuffer(renderdata->device, tbuf);
|
||||
SDL_UnmapGPUTransferBuffer(renderdata->device, tbuf);
|
||||
|
||||
SDL_GpuCommandBuffer *cbuf = renderdata->state.command_buffer;
|
||||
SDL_GpuCopyPass *cpass = SDL_BeginGpuCopyPass(cbuf);
|
||||
SDL_GPUCommandBuffer *cbuf = renderdata->state.command_buffer;
|
||||
SDL_GPUCopyPass *cpass = SDL_BeginGPUCopyPass(cbuf);
|
||||
|
||||
SDL_GpuTextureTransferInfo tex_src;
|
||||
SDL_GPUTextureTransferInfo tex_src;
|
||||
SDL_zero(tex_src);
|
||||
tex_src.transferBuffer = tbuf;
|
||||
tex_src.imageHeight = rect->h;
|
||||
tex_src.imagePitch = rect->w;
|
||||
|
||||
SDL_GpuTextureRegion tex_dst;
|
||||
SDL_GPUTextureRegion tex_dst;
|
||||
SDL_zero(tex_dst);
|
||||
tex_dst.texture = data->texture;
|
||||
tex_dst.x = rect->x;
|
||||
@@ -298,9 +298,9 @@ static bool GPU_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||
tex_dst.h = rect->h;
|
||||
tex_dst.d = 1;
|
||||
|
||||
SDL_UploadToGpuTexture(cpass, &tex_src, &tex_dst, true);
|
||||
SDL_EndGpuCopyPass(cpass);
|
||||
SDL_ReleaseGpuTransferBuffer(renderdata->device, tbuf);
|
||||
SDL_UploadToGPUTexture(cpass, &tex_src, &tex_dst, true);
|
||||
SDL_EndGPUCopyPass(cpass);
|
||||
SDL_ReleaseGPUTransferBuffer(renderdata->device, tbuf);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -449,13 +449,13 @@ static void GPU_InvalidateCachedState(SDL_Renderer *renderer)
|
||||
data->state.scissor_enabled = false;
|
||||
}
|
||||
|
||||
static SDL_GpuRenderPass *RestartRenderPass(GPU_RenderData *data)
|
||||
static SDL_GPURenderPass *RestartRenderPass(GPU_RenderData *data)
|
||||
{
|
||||
if (data->state.render_pass) {
|
||||
SDL_EndGpuRenderPass(data->state.render_pass);
|
||||
SDL_EndGPURenderPass(data->state.render_pass);
|
||||
}
|
||||
|
||||
data->state.render_pass = SDL_BeginGpuRenderPass(
|
||||
data->state.render_pass = SDL_BeginGPURenderPass(
|
||||
data->state.command_buffer, &data->state.color_attachment, 1, NULL);
|
||||
|
||||
// *** FIXME ***
|
||||
@@ -486,10 +486,10 @@ static void PushUniforms(GPU_RenderData *data, SDL_RenderCommand *cmd)
|
||||
uniforms.texture_size[1] = cmd->data.draw.texture->h;
|
||||
}
|
||||
|
||||
SDL_PushGpuVertexUniformData(data->state.command_buffer, 0, &uniforms, sizeof(uniforms));
|
||||
SDL_PushGPUVertexUniformData(data->state.command_buffer, 0, &uniforms, sizeof(uniforms));
|
||||
}
|
||||
|
||||
static SDL_GpuSampler **SamplerPointer(
|
||||
static SDL_GPUSampler **SamplerPointer(
|
||||
GPU_RenderData *data, SDL_TextureAddressMode address_mode, SDL_ScaleMode scale_mode)
|
||||
{
|
||||
return &data->samplers[scale_mode][address_mode - 1];
|
||||
@@ -497,10 +497,10 @@ static SDL_GpuSampler **SamplerPointer(
|
||||
|
||||
static void SetViewportAndScissor(GPU_RenderData *data)
|
||||
{
|
||||
SDL_SetGpuViewport(data->state.render_pass, &data->state.viewport);
|
||||
SDL_SetGPUViewport(data->state.render_pass, &data->state.viewport);
|
||||
|
||||
if (data->state.scissor_enabled) {
|
||||
SDL_SetGpuScissor(data->state.render_pass, &data->state.scissor);
|
||||
SDL_SetGPUScissor(data->state.render_pass, &data->state.scissor);
|
||||
data->state.scissor_was_enabled = true;
|
||||
} else if (data->state.scissor_was_enabled) {
|
||||
SDL_Rect r;
|
||||
@@ -508,7 +508,7 @@ static void SetViewportAndScissor(GPU_RenderData *data)
|
||||
r.y = (int)data->state.viewport.y;
|
||||
r.w = (int)data->state.viewport.w;
|
||||
r.h = (int)data->state.viewport.h;
|
||||
SDL_SetGpuScissor(data->state.render_pass, &r);
|
||||
SDL_SetGPUScissor(data->state.render_pass, &r);
|
||||
data->state.scissor_was_enabled = false;
|
||||
}
|
||||
}
|
||||
@@ -517,7 +517,7 @@ static void Draw(
|
||||
GPU_RenderData *data, SDL_RenderCommand *cmd,
|
||||
Uint32 num_verts,
|
||||
Uint32 offset,
|
||||
SDL_GpuPrimitiveType prim)
|
||||
SDL_GPUPrimitiveType prim)
|
||||
{
|
||||
if (!data->state.render_pass || data->state.color_attachment.loadOp == SDL_GPU_LOADOP_CLEAR) {
|
||||
RestartRenderPass(data);
|
||||
@@ -525,7 +525,7 @@ static void Draw(
|
||||
|
||||
GPU_VertexShaderID v_shader;
|
||||
GPU_FragmentShaderID f_shader;
|
||||
SDL_GpuRenderPass *pass = data->state.render_pass;
|
||||
SDL_GPURenderPass *pass = data->state.render_pass;
|
||||
GPU_TextureData *tdata = NULL;
|
||||
|
||||
if (cmd->data.draw.texture) {
|
||||
@@ -558,41 +558,41 @@ static void Draw(
|
||||
pipe_params.attachment_format = data->backbuffer.format;
|
||||
}
|
||||
|
||||
SDL_GpuGraphicsPipeline *pipe = GPU_GetPipeline(&data->pipeline_cache, &data->shaders, data->device, &pipe_params);
|
||||
SDL_GPUGraphicsPipeline *pipe = GPU_GetPipeline(&data->pipeline_cache, &data->shaders, data->device, &pipe_params);
|
||||
|
||||
if (!pipe) {
|
||||
return;
|
||||
}
|
||||
|
||||
SetViewportAndScissor(data);
|
||||
SDL_BindGpuGraphicsPipeline(data->state.render_pass, pipe);
|
||||
SDL_BindGPUGraphicsPipeline(data->state.render_pass, pipe);
|
||||
|
||||
if (tdata) {
|
||||
SDL_GpuTextureSamplerBinding sampler_bind;
|
||||
SDL_GPUTextureSamplerBinding sampler_bind;
|
||||
SDL_zero(sampler_bind);
|
||||
sampler_bind.sampler = *SamplerPointer(data, cmd->data.draw.texture_address_mode, cmd->data.draw.texture->scaleMode);
|
||||
sampler_bind.texture = tdata->texture;
|
||||
SDL_BindGpuFragmentSamplers(pass, 0, &sampler_bind, 1);
|
||||
SDL_BindGPUFragmentSamplers(pass, 0, &sampler_bind, 1);
|
||||
}
|
||||
|
||||
SDL_GpuBufferBinding buffer_bind;
|
||||
SDL_GPUBufferBinding buffer_bind;
|
||||
SDL_zero(buffer_bind);
|
||||
buffer_bind.buffer = data->vertices.buffer;
|
||||
buffer_bind.offset = offset;
|
||||
|
||||
SDL_BindGpuVertexBuffers(pass, 0, &buffer_bind, 1);
|
||||
SDL_BindGPUVertexBuffers(pass, 0, &buffer_bind, 1);
|
||||
PushUniforms(data, cmd);
|
||||
SDL_DrawGpuPrimitives(data->state.render_pass, num_verts, 1, 0, 0);
|
||||
SDL_DrawGPUPrimitives(data->state.render_pass, num_verts, 1, 0, 0);
|
||||
}
|
||||
|
||||
static void ReleaseVertexBuffer(GPU_RenderData *data)
|
||||
{
|
||||
if (data->vertices.buffer) {
|
||||
SDL_ReleaseGpuBuffer(data->device, data->vertices.buffer);
|
||||
SDL_ReleaseGPUBuffer(data->device, data->vertices.buffer);
|
||||
}
|
||||
|
||||
if (data->vertices.transfer_buf) {
|
||||
SDL_ReleaseGpuTransferBuffer(data->device, data->vertices.transfer_buf);
|
||||
SDL_ReleaseGPUTransferBuffer(data->device, data->vertices.transfer_buf);
|
||||
}
|
||||
|
||||
data->vertices.buffer_size = 0;
|
||||
@@ -600,23 +600,23 @@ static void ReleaseVertexBuffer(GPU_RenderData *data)
|
||||
|
||||
static bool InitVertexBuffer(GPU_RenderData *data, Uint32 size)
|
||||
{
|
||||
SDL_GpuBufferCreateInfo bci;
|
||||
SDL_GPUBufferCreateInfo bci;
|
||||
SDL_zero(bci);
|
||||
bci.sizeInBytes = size;
|
||||
bci.usageFlags = SDL_GPU_BUFFERUSAGE_VERTEX_BIT;
|
||||
|
||||
data->vertices.buffer = SDL_CreateGpuBuffer(data->device, &bci);
|
||||
data->vertices.buffer = SDL_CreateGPUBuffer(data->device, &bci);
|
||||
|
||||
if (!data->vertices.buffer) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SDL_GpuTransferBufferCreateInfo tbci;
|
||||
SDL_GPUTransferBufferCreateInfo tbci;
|
||||
SDL_zero(tbci);
|
||||
tbci.sizeInBytes = size;
|
||||
tbci.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
|
||||
|
||||
data->vertices.transfer_buf = SDL_CreateGpuTransferBuffer(data->device, &tbci);
|
||||
data->vertices.transfer_buf = SDL_CreateGPUTransferBuffer(data->device, &tbci);
|
||||
return (bool)data->vertices.transfer_buf;
|
||||
}
|
||||
|
||||
@@ -633,27 +633,27 @@ static bool UploadVertices(GPU_RenderData *data, void *vertices, size_t vertsize
|
||||
}
|
||||
}
|
||||
|
||||
void *staging_buf = SDL_MapGpuTransferBuffer(data->device, data->vertices.transfer_buf, true);
|
||||
void *staging_buf = SDL_MapGPUTransferBuffer(data->device, data->vertices.transfer_buf, true);
|
||||
memcpy(staging_buf, vertices, vertsize);
|
||||
SDL_UnmapGpuTransferBuffer(data->device, data->vertices.transfer_buf);
|
||||
SDL_UnmapGPUTransferBuffer(data->device, data->vertices.transfer_buf);
|
||||
|
||||
SDL_GpuCopyPass *pass = SDL_BeginGpuCopyPass(data->state.command_buffer);
|
||||
SDL_GPUCopyPass *pass = SDL_BeginGPUCopyPass(data->state.command_buffer);
|
||||
|
||||
if (!pass) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SDL_GpuTransferBufferLocation src;
|
||||
SDL_GPUTransferBufferLocation src;
|
||||
SDL_zero(src);
|
||||
src.transferBuffer = data->vertices.transfer_buf;
|
||||
|
||||
SDL_GpuBufferRegion dst;
|
||||
SDL_GPUBufferRegion dst;
|
||||
SDL_zero(dst);
|
||||
dst.buffer = data->vertices.buffer;
|
||||
dst.size = (Uint32)vertsize;
|
||||
|
||||
SDL_UploadToGpuBuffer(pass, &src, &dst, true);
|
||||
SDL_EndGpuCopyPass(pass);
|
||||
SDL_UploadToGPUBuffer(pass, &src, &dst, true);
|
||||
SDL_EndGPUCopyPass(pass);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -795,7 +795,7 @@ static bool GPU_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd,
|
||||
nextcmd = nextcmd->next;
|
||||
}
|
||||
|
||||
SDL_GpuPrimitiveType prim = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST; // SDL_RENDERCMD_GEOMETRY
|
||||
SDL_GPUPrimitiveType prim = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST; // SDL_RENDERCMD_GEOMETRY
|
||||
if (thiscmdtype == SDL_RENDERCMD_DRAW_POINTS) {
|
||||
prim = SDL_GPU_PRIMITIVETYPE_POINTLIST;
|
||||
}
|
||||
@@ -818,7 +818,7 @@ static bool GPU_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd,
|
||||
}
|
||||
|
||||
if (data->state.render_pass) {
|
||||
SDL_EndGpuRenderPass(data->state.render_pass);
|
||||
SDL_EndGPURenderPass(data->state.render_pass);
|
||||
data->state.render_pass = NULL;
|
||||
}
|
||||
|
||||
@@ -828,7 +828,7 @@ static bool GPU_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd,
|
||||
static SDL_Surface *GPU_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect)
|
||||
{
|
||||
GPU_RenderData *data = (GPU_RenderData *)renderer->internal;
|
||||
SDL_GpuTexture *gpu_tex;
|
||||
SDL_GPUTexture *gpu_tex;
|
||||
SDL_PixelFormat pixfmt;
|
||||
|
||||
if (data->state.render_target) {
|
||||
@@ -856,20 +856,20 @@ static SDL_Surface *GPU_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_GpuTransferBufferCreateInfo tbci;
|
||||
SDL_GPUTransferBufferCreateInfo tbci;
|
||||
SDL_zero(tbci);
|
||||
tbci.sizeInBytes = image_size;
|
||||
tbci.usage = SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD;
|
||||
|
||||
SDL_GpuTransferBuffer *tbuf = SDL_CreateGpuTransferBuffer(data->device, &tbci);
|
||||
SDL_GPUTransferBuffer *tbuf = SDL_CreateGPUTransferBuffer(data->device, &tbci);
|
||||
|
||||
if (!tbuf) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_GpuCopyPass *pass = SDL_BeginGpuCopyPass(data->state.command_buffer);
|
||||
SDL_GPUCopyPass *pass = SDL_BeginGPUCopyPass(data->state.command_buffer);
|
||||
|
||||
SDL_GpuTextureRegion src;
|
||||
SDL_GPUTextureRegion src;
|
||||
SDL_zero(src);
|
||||
src.texture = gpu_tex;
|
||||
src.x = rect->x;
|
||||
@@ -878,21 +878,21 @@ static SDL_Surface *GPU_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect
|
||||
src.h = rect->h;
|
||||
src.d = 1;
|
||||
|
||||
SDL_GpuTextureTransferInfo dst;
|
||||
SDL_GPUTextureTransferInfo dst;
|
||||
SDL_zero(dst);
|
||||
dst.transferBuffer = tbuf;
|
||||
dst.imageHeight = rect->h;
|
||||
dst.imagePitch = rect->w;
|
||||
|
||||
SDL_DownloadFromGpuTexture(pass, &src, &dst);
|
||||
SDL_EndGpuCopyPass(pass);
|
||||
SDL_DownloadFromGPUTexture(pass, &src, &dst);
|
||||
SDL_EndGPUCopyPass(pass);
|
||||
|
||||
SDL_GpuFence *fence = SDL_SubmitGpuAndAcquireFence(data->state.command_buffer);
|
||||
SDL_WaitGpuForFences(data->device, true, &fence, 1);
|
||||
SDL_ReleaseGpuFence(data->device, fence);
|
||||
data->state.command_buffer = SDL_AcquireGpuCommandBuffer(data->device);
|
||||
SDL_GPUFence *fence = SDL_SubmitGPUAndAcquireFence(data->state.command_buffer);
|
||||
SDL_WaitGPUForFences(data->device, true, &fence, 1);
|
||||
SDL_ReleaseGPUFence(data->device, fence);
|
||||
data->state.command_buffer = SDL_AcquireGPUCommandBuffer(data->device);
|
||||
|
||||
void *mapped_tbuf = SDL_MapGpuTransferBuffer(data->device, tbuf, false);
|
||||
void *mapped_tbuf = SDL_MapGPUTransferBuffer(data->device, tbuf, false);
|
||||
|
||||
if (surface->pitch == row_size) {
|
||||
memcpy(surface->pixels, mapped_tbuf, image_size);
|
||||
@@ -907,15 +907,15 @@ static SDL_Surface *GPU_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect
|
||||
}
|
||||
}
|
||||
|
||||
SDL_UnmapGpuTransferBuffer(data->device, tbuf);
|
||||
SDL_ReleaseGpuTransferBuffer(data->device, tbuf);
|
||||
SDL_UnmapGPUTransferBuffer(data->device, tbuf);
|
||||
SDL_ReleaseGPUTransferBuffer(data->device, tbuf);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
static bool CreateBackbuffer(GPU_RenderData *data, Uint32 w, Uint32 h, SDL_GpuTextureFormat fmt)
|
||||
static bool CreateBackbuffer(GPU_RenderData *data, Uint32 w, Uint32 h, SDL_GPUTextureFormat fmt)
|
||||
{
|
||||
SDL_GpuTextureCreateInfo tci;
|
||||
SDL_GPUTextureCreateInfo tci;
|
||||
SDL_zero(tci);
|
||||
tci.width = w;
|
||||
tci.height = h;
|
||||
@@ -925,7 +925,7 @@ static bool CreateBackbuffer(GPU_RenderData *data, Uint32 w, Uint32 h, SDL_GpuTe
|
||||
tci.sampleCount = SDL_GPU_SAMPLECOUNT_1;
|
||||
tci.usageFlags = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET_BIT | SDL_GPU_TEXTUREUSAGE_SAMPLER_BIT;
|
||||
|
||||
data->backbuffer.texture = SDL_CreateGpuTexture(data->device, &tci);
|
||||
data->backbuffer.texture = SDL_CreateGPUTexture(data->device, &tci);
|
||||
data->backbuffer.width = w;
|
||||
data->backbuffer.height = h;
|
||||
data->backbuffer.format = fmt;
|
||||
@@ -939,42 +939,42 @@ static bool GPU_RenderPresent(SDL_Renderer *renderer)
|
||||
|
||||
Uint32 swapchain_w, swapchain_h;
|
||||
|
||||
SDL_GpuTexture *swapchain = SDL_AcquireGpuSwapchainTexture(data->state.command_buffer, renderer->window, &swapchain_w, &swapchain_h);
|
||||
SDL_GPUTexture *swapchain = SDL_AcquireGPUSwapchainTexture(data->state.command_buffer, renderer->window, &swapchain_w, &swapchain_h);
|
||||
|
||||
if (swapchain == NULL) {
|
||||
goto submit;
|
||||
}
|
||||
|
||||
SDL_GpuTextureFormat swapchain_fmt = SDL_GetGpuSwapchainTextureFormat(data->device, renderer->window);
|
||||
SDL_GPUTextureFormat swapchain_fmt = SDL_GetGPUSwapchainTextureFormat(data->device, renderer->window);
|
||||
|
||||
if (swapchain_w != data->backbuffer.width || swapchain_h != data->backbuffer.height || swapchain_fmt != data->backbuffer.format) {
|
||||
SDL_GpuBlitRegion src;
|
||||
SDL_GPUBlitRegion src;
|
||||
SDL_zero(src);
|
||||
src.texture = data->backbuffer.texture;
|
||||
src.w = data->backbuffer.width;
|
||||
src.h = data->backbuffer.height;
|
||||
|
||||
SDL_GpuBlitRegion dst;
|
||||
SDL_GPUBlitRegion dst;
|
||||
SDL_zero(dst);
|
||||
dst.texture = swapchain;
|
||||
dst.w = swapchain_w;
|
||||
dst.h = swapchain_h;
|
||||
|
||||
SDL_BlitGpu(data->state.command_buffer, &src, &dst, SDL_FLIP_NONE, SDL_GPU_FILTER_LINEAR, true);
|
||||
SDL_ReleaseGpuTexture(data->device, data->backbuffer.texture);
|
||||
SDL_BlitGPU(data->state.command_buffer, &src, &dst, SDL_FLIP_NONE, SDL_GPU_FILTER_LINEAR, true);
|
||||
SDL_ReleaseGPUTexture(data->device, data->backbuffer.texture);
|
||||
CreateBackbuffer(data, swapchain_w, swapchain_h, swapchain_fmt);
|
||||
} else {
|
||||
SDL_GpuTextureLocation src;
|
||||
SDL_GPUTextureLocation src;
|
||||
SDL_zero(src);
|
||||
src.texture = data->backbuffer.texture;
|
||||
|
||||
SDL_GpuTextureLocation dst;
|
||||
SDL_GPUTextureLocation dst;
|
||||
SDL_zero(dst);
|
||||
dst.texture = swapchain;
|
||||
|
||||
SDL_GpuCopyPass *pass = SDL_BeginGpuCopyPass(data->state.command_buffer);
|
||||
SDL_CopyGpuTextureToTexture(pass, &src, &dst, swapchain_w, swapchain_h, 1, true);
|
||||
SDL_EndGpuCopyPass(pass);
|
||||
SDL_GPUCopyPass *pass = SDL_BeginGPUCopyPass(data->state.command_buffer);
|
||||
SDL_CopyGPUTextureToTexture(pass, &src, &dst, swapchain_w, swapchain_h, 1, true);
|
||||
SDL_EndGPUCopyPass(pass);
|
||||
}
|
||||
|
||||
// *** FIXME ***
|
||||
@@ -986,16 +986,16 @@ static bool GPU_RenderPresent(SDL_Renderer *renderer)
|
||||
submit:
|
||||
#if 1
|
||||
if (data->present_fence) {
|
||||
SDL_WaitGpuForFences(data->device, true, &data->present_fence, 1);
|
||||
SDL_ReleaseGpuFence(data->device, data->present_fence);
|
||||
SDL_WaitGPUForFences(data->device, true, &data->present_fence, 1);
|
||||
SDL_ReleaseGPUFence(data->device, data->present_fence);
|
||||
}
|
||||
|
||||
data->present_fence = SDL_SubmitGpuAndAcquireFence(data->state.command_buffer);
|
||||
data->present_fence = SDL_SubmitGPUAndAcquireFence(data->state.command_buffer);
|
||||
#else
|
||||
SDL_SubmitGpu(data->state.command_buffer);
|
||||
SDL_SubmitGPU(data->state.command_buffer);
|
||||
#endif
|
||||
|
||||
data->state.command_buffer = SDL_AcquireGpuCommandBuffer(data->device);
|
||||
data->state.command_buffer = SDL_AcquireGPUCommandBuffer(data->device);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1013,7 +1013,7 @@ static void GPU_DestroyTexture(SDL_Renderer *renderer, SDL_Texture *texture)
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_ReleaseGpuTexture(renderdata->device, data->texture);
|
||||
SDL_ReleaseGPUTexture(renderdata->device, data->texture);
|
||||
SDL_free(data->pixels);
|
||||
SDL_free(data);
|
||||
texture->internal = NULL;
|
||||
@@ -1028,47 +1028,47 @@ static void GPU_DestroyRenderer(SDL_Renderer *renderer)
|
||||
}
|
||||
|
||||
if (data->present_fence) {
|
||||
SDL_WaitGpuForFences(data->device, true, &data->present_fence, 1);
|
||||
SDL_ReleaseGpuFence(data->device, data->present_fence);
|
||||
SDL_WaitGPUForFences(data->device, true, &data->present_fence, 1);
|
||||
SDL_ReleaseGPUFence(data->device, data->present_fence);
|
||||
}
|
||||
|
||||
if (data->state.command_buffer) {
|
||||
SDL_SubmitGpu(data->state.command_buffer);
|
||||
SDL_SubmitGPU(data->state.command_buffer);
|
||||
data->state.command_buffer = NULL;
|
||||
}
|
||||
|
||||
for (Uint32 i = 0; i < sizeof(data->samplers) / sizeof(SDL_GpuSampler *); ++i) {
|
||||
SDL_ReleaseGpuSampler(data->device, ((SDL_GpuSampler **)data->samplers)[i]);
|
||||
for (Uint32 i = 0; i < sizeof(data->samplers) / sizeof(SDL_GPUSampler *); ++i) {
|
||||
SDL_ReleaseGPUSampler(data->device, ((SDL_GPUSampler **)data->samplers)[i]);
|
||||
}
|
||||
|
||||
if (data->backbuffer.texture) {
|
||||
SDL_ReleaseGpuTexture(data->device, data->backbuffer.texture);
|
||||
SDL_ReleaseGPUTexture(data->device, data->backbuffer.texture);
|
||||
}
|
||||
|
||||
if (renderer->window) {
|
||||
SDL_UnclaimGpuWindow(data->device, renderer->window);
|
||||
SDL_UnclaimGPUWindow(data->device, renderer->window);
|
||||
}
|
||||
|
||||
ReleaseVertexBuffer(data);
|
||||
GPU_DestroyPipelineCache(&data->pipeline_cache);
|
||||
GPU_ReleaseShaders(&data->shaders, data->device);
|
||||
SDL_DestroyGpuDevice(data->device);
|
||||
SDL_DestroyGPUDevice(data->device);
|
||||
|
||||
SDL_free(data);
|
||||
}
|
||||
|
||||
static bool ChoosePresentMode(SDL_GpuDevice *device, SDL_Window *window, const int vsync, SDL_GpuPresentMode *out_mode)
|
||||
static bool ChoosePresentMode(SDL_GPUDevice *device, SDL_Window *window, const int vsync, SDL_GPUPresentMode *out_mode)
|
||||
{
|
||||
SDL_GpuPresentMode mode;
|
||||
SDL_GPUPresentMode mode;
|
||||
|
||||
switch (vsync) {
|
||||
case 0:
|
||||
mode = SDL_GPU_PRESENTMODE_MAILBOX;
|
||||
|
||||
if (!SDL_SupportsGpuPresentMode(device, window, mode)) {
|
||||
if (!SDL_SupportsGPUPresentMode(device, window, mode)) {
|
||||
mode = SDL_GPU_PRESENTMODE_IMMEDIATE;
|
||||
|
||||
if (!SDL_SupportsGpuPresentMode(device, window, mode)) {
|
||||
if (!SDL_SupportsGPUPresentMode(device, window, mode)) {
|
||||
mode = SDL_GPU_PRESENTMODE_VSYNC;
|
||||
}
|
||||
}
|
||||
@@ -1091,7 +1091,7 @@ static bool ChoosePresentMode(SDL_GpuDevice *device, SDL_Window *window, const i
|
||||
static bool GPU_SetVSync(SDL_Renderer *renderer, const int vsync)
|
||||
{
|
||||
GPU_RenderData *data = (GPU_RenderData *)renderer->internal;
|
||||
SDL_GpuPresentMode mode = SDL_GPU_PRESENTMODE_VSYNC;
|
||||
SDL_GPUPresentMode mode = SDL_GPU_PRESENTMODE_VSYNC;
|
||||
|
||||
if (!ChoosePresentMode(data->device, renderer->window, vsync, &mode)) {
|
||||
return false;
|
||||
@@ -1099,7 +1099,7 @@ static bool GPU_SetVSync(SDL_Renderer *renderer, const int vsync)
|
||||
|
||||
if (mode != data->swapchain.present_mode) {
|
||||
// XXX returns bool instead of SDL-style error code
|
||||
if (SDL_SetGpuSwapchainParameters(data->device, renderer->window, data->swapchain.composition, mode)) {
|
||||
if (SDL_SetGPUSwapchainParameters(data->device, renderer->window, data->swapchain.composition, mode)) {
|
||||
data->swapchain.present_mode = mode;
|
||||
return true;
|
||||
} else {
|
||||
@@ -1121,9 +1121,9 @@ static bool InitSamplers(GPU_RenderData *data)
|
||||
} sdl;
|
||||
struct
|
||||
{
|
||||
SDL_GpuSamplerAddressMode address_mode;
|
||||
SDL_GpuFilter filter;
|
||||
SDL_GpuSamplerMipmapMode mipmap_mode;
|
||||
SDL_GPUSamplerAddressMode address_mode;
|
||||
SDL_GPUFilter filter;
|
||||
SDL_GPUSamplerMipmapMode mipmap_mode;
|
||||
Uint32 anisotropy;
|
||||
} gpu;
|
||||
} configs[] = {
|
||||
@@ -1154,7 +1154,7 @@ static bool InitSamplers(GPU_RenderData *data)
|
||||
};
|
||||
|
||||
for (Uint32 i = 0; i < SDL_arraysize(configs); ++i) {
|
||||
SDL_GpuSamplerCreateInfo sci;
|
||||
SDL_GPUSamplerCreateInfo sci;
|
||||
SDL_zero(sci);
|
||||
sci.maxAnisotropy = configs[i].gpu.anisotropy;
|
||||
sci.anisotropyEnable = configs[i].gpu.anisotropy > 0;
|
||||
@@ -1162,7 +1162,7 @@ static bool InitSamplers(GPU_RenderData *data)
|
||||
sci.minFilter = sci.magFilter = configs[i].gpu.filter;
|
||||
sci.mipmapMode = configs[i].gpu.mipmap_mode;
|
||||
|
||||
SDL_GpuSampler *sampler = SDL_CreateGpuSampler(data->device, &sci);
|
||||
SDL_GPUSampler *sampler = SDL_CreateGPUSampler(data->device, &sci);
|
||||
|
||||
if (sampler == NULL) {
|
||||
return false;
|
||||
@@ -1204,7 +1204,7 @@ static bool GPU_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
||||
SDL_SetBooleanProperty(create_props, SDL_PROP_GPU_CREATEDEVICE_PREFERLOWPOWER_BOOL, lowpower);
|
||||
|
||||
GPU_FillSupportedShaderFormats(create_props);
|
||||
data->device = SDL_CreateGpuDeviceWithProperties(create_props);
|
||||
data->device = SDL_CreateGPUDeviceWithProperties(create_props);
|
||||
|
||||
if (!data->device) {
|
||||
goto error;
|
||||
@@ -1250,7 +1250,7 @@ static bool GPU_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
||||
renderer->window = window;
|
||||
renderer->name = GPU_RenderDriver.name;
|
||||
|
||||
if (!SDL_ClaimGpuWindow(data->device, window)) {
|
||||
if (!SDL_ClaimGPUWindow(data->device, window)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -1260,7 +1260,7 @@ static bool GPU_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
||||
int vsync = (int)SDL_GetNumberProperty(create_props, SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER, 0);
|
||||
ChoosePresentMode(data->device, window, vsync, &data->swapchain.present_mode);
|
||||
|
||||
SDL_SetGpuSwapchainParameters(data->device, window, data->swapchain.composition, data->swapchain.present_mode);
|
||||
SDL_SetGPUSwapchainParameters(data->device, window, data->swapchain.composition, data->swapchain.present_mode);
|
||||
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_RGBA32);
|
||||
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_BGRA32);
|
||||
@@ -1280,12 +1280,12 @@ static bool GPU_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
|
||||
data->state.draw_color.a = 1.0f;
|
||||
data->state.viewport.minDepth = 0;
|
||||
data->state.viewport.maxDepth = 1;
|
||||
data->state.command_buffer = SDL_AcquireGpuCommandBuffer(data->device);
|
||||
data->state.command_buffer = SDL_AcquireGPUCommandBuffer(data->device);
|
||||
|
||||
int w, h;
|
||||
SDL_GetWindowSizeInPixels(window, &w, &h);
|
||||
|
||||
if (!CreateBackbuffer(data, w, h, SDL_GetGpuSwapchainTextureFormat(data->device, window))) {
|
||||
if (!CreateBackbuffer(data, w, h, SDL_GetGPUSwapchainTextureFormat(data->device, window))) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
#include "SDL_shaders_gpu.h"
|
||||
|
||||
// SDL_Gpu shader implementation
|
||||
// SDL_GPU shader implementation
|
||||
|
||||
typedef struct GPU_ShaderModuleSource
|
||||
{
|
||||
const unsigned char *code;
|
||||
unsigned int code_len;
|
||||
SDL_GpuShaderFormat format;
|
||||
SDL_GPUShaderFormat format;
|
||||
} GPU_ShaderModuleSource;
|
||||
|
||||
#ifdef SDL_GPU_VULKAN
|
||||
@@ -147,10 +147,10 @@ static const GPU_ShaderSources frag_shader_sources[NUM_FRAG_SHADERS] = {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
static SDL_GpuShader *CompileShader(const GPU_ShaderSources *sources, SDL_GpuDevice *device, SDL_GpuShaderStage stage)
|
||||
static SDL_GPUShader *CompileShader(const GPU_ShaderSources *sources, SDL_GPUDevice *device, SDL_GPUShaderStage stage)
|
||||
{
|
||||
const GPU_ShaderModuleSource *sms = NULL;
|
||||
SDL_GpuDriver driver = SDL_GetGpuDriver(device);
|
||||
SDL_GPUDriver driver = SDL_GetGPUDriver(device);
|
||||
|
||||
switch (driver) {
|
||||
// clang-format off
|
||||
@@ -165,7 +165,7 @@ static SDL_GpuShader *CompileShader(const GPU_ShaderSources *sources, SDL_GpuDev
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_GpuShaderCreateInfo sci = { 0 };
|
||||
SDL_GPUShaderCreateInfo sci = { 0 };
|
||||
sci.code = sms->code;
|
||||
sci.codeSize = sms->code_len;
|
||||
sci.format = sms->format;
|
||||
@@ -175,10 +175,10 @@ static SDL_GpuShader *CompileShader(const GPU_ShaderSources *sources, SDL_GpuDev
|
||||
sci.uniformBufferCount = sources->num_uniform_buffers;
|
||||
sci.stage = stage;
|
||||
|
||||
return SDL_CreateGpuShader(device, &sci);
|
||||
return SDL_CreateGPUShader(device, &sci);
|
||||
}
|
||||
|
||||
bool GPU_InitShaders(GPU_Shaders *shaders, SDL_GpuDevice *device)
|
||||
bool GPU_InitShaders(GPU_Shaders *shaders, SDL_GPUDevice *device)
|
||||
{
|
||||
for (int i = 0; i < SDL_arraysize(vert_shader_sources); ++i) {
|
||||
shaders->vert_shaders[i] = CompileShader(
|
||||
@@ -201,31 +201,31 @@ bool GPU_InitShaders(GPU_Shaders *shaders, SDL_GpuDevice *device)
|
||||
return true;
|
||||
}
|
||||
|
||||
void GPU_ReleaseShaders(GPU_Shaders *shaders, SDL_GpuDevice *device)
|
||||
void GPU_ReleaseShaders(GPU_Shaders *shaders, SDL_GPUDevice *device)
|
||||
{
|
||||
for (int i = 0; i < SDL_arraysize(shaders->vert_shaders); ++i) {
|
||||
SDL_ReleaseGpuShader(device, shaders->vert_shaders[i]);
|
||||
SDL_ReleaseGPUShader(device, shaders->vert_shaders[i]);
|
||||
shaders->vert_shaders[i] = NULL;
|
||||
}
|
||||
|
||||
for (int i = 0; i < SDL_arraysize(shaders->frag_shaders); ++i) {
|
||||
SDL_ReleaseGpuShader(device, shaders->frag_shaders[i]);
|
||||
SDL_ReleaseGPUShader(device, shaders->frag_shaders[i]);
|
||||
shaders->frag_shaders[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_GpuShader *GPU_GetVertexShader(GPU_Shaders *shaders, GPU_VertexShaderID id)
|
||||
SDL_GPUShader *GPU_GetVertexShader(GPU_Shaders *shaders, GPU_VertexShaderID id)
|
||||
{
|
||||
SDL_assert((unsigned int)id < SDL_arraysize(shaders->vert_shaders));
|
||||
SDL_GpuShader *shader = shaders->vert_shaders[id];
|
||||
SDL_GPUShader *shader = shaders->vert_shaders[id];
|
||||
SDL_assert(shader != NULL);
|
||||
return shader;
|
||||
}
|
||||
|
||||
SDL_GpuShader *GPU_GetFragmentShader(GPU_Shaders *shaders, GPU_FragmentShaderID id)
|
||||
SDL_GPUShader *GPU_GetFragmentShader(GPU_Shaders *shaders, GPU_FragmentShaderID id)
|
||||
{
|
||||
SDL_assert((unsigned int)id < SDL_arraysize(shaders->frag_shaders));
|
||||
SDL_GpuShader *shader = shaders->frag_shaders[id];
|
||||
SDL_GPUShader *shader = shaders->frag_shaders[id];
|
||||
SDL_assert(shader != NULL);
|
||||
return shader;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "SDL_internal.h"
|
||||
|
||||
// SDL_Gpu shader implementation
|
||||
// SDL_GPU shader implementation
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -48,16 +48,16 @@ typedef enum
|
||||
|
||||
struct GPU_Shaders
|
||||
{
|
||||
SDL_GpuShader *vert_shaders[NUM_VERT_SHADERS];
|
||||
SDL_GpuShader *frag_shaders[NUM_FRAG_SHADERS];
|
||||
SDL_GPUShader *vert_shaders[NUM_VERT_SHADERS];
|
||||
SDL_GPUShader *frag_shaders[NUM_FRAG_SHADERS];
|
||||
};
|
||||
|
||||
typedef struct GPU_Shaders GPU_Shaders;
|
||||
|
||||
void GPU_FillSupportedShaderFormats(SDL_PropertiesID props);
|
||||
extern bool GPU_InitShaders(GPU_Shaders *shaders, SDL_GpuDevice *device);
|
||||
extern void GPU_ReleaseShaders(GPU_Shaders *shaders, SDL_GpuDevice *device);
|
||||
extern SDL_GpuShader *GPU_GetVertexShader(GPU_Shaders *shaders, GPU_VertexShaderID id);
|
||||
extern SDL_GpuShader *GPU_GetFragmentShader(GPU_Shaders *shaders, GPU_FragmentShaderID id);
|
||||
extern bool GPU_InitShaders(GPU_Shaders *shaders, SDL_GPUDevice *device);
|
||||
extern void GPU_ReleaseShaders(GPU_Shaders *shaders, SDL_GPUDevice *device);
|
||||
extern SDL_GPUShader *GPU_GetVertexShader(GPU_Shaders *shaders, GPU_VertexShaderID id);
|
||||
extern SDL_GPUShader *GPU_GetFragmentShader(GPU_Shaders *shaders, GPU_FragmentShaderID id);
|
||||
|
||||
#endif // SDL_shaders_gpu_h_
|
||||
@@ -691,8 +691,8 @@
|
||||
( (This)->Wait(pFence,Value) )
|
||||
#define ID3D12CommandQueue_GetTimestampFrequency(This,pFrequency) \
|
||||
( (This)->GetTimestampFrequency(pFrequency) )
|
||||
#define ID3D12CommandQueue_GetClockCalibration(This,pGpuTimestamp,pCpuTimestamp) \
|
||||
( (This)->GetClockCalibration(pGpuTimestamp,pCpuTimestamp) )
|
||||
#define ID3D12CommandQueue_GetClockCalibration(This,pGPUTimestamp,pCpuTimestamp) \
|
||||
( (This)->GetClockCalibration(pGPUTimestamp,pCpuTimestamp) )
|
||||
#define ID3D12Device_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->QueryInterface(riid,ppvObject) )
|
||||
#define ID3D12Device_AddRef(This) \
|
||||
|
||||
@@ -8670,7 +8670,7 @@ EXTERN_C const IID IID_ID3D12CommandQueue;
|
||||
_Out_ UINT64 *pFrequency) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetClockCalibration(
|
||||
_Out_ UINT64 *pGpuTimestamp,
|
||||
_Out_ UINT64 *pGPUTimestamp,
|
||||
_Out_ UINT64 *pCpuTimestamp) = 0;
|
||||
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
@@ -8802,7 +8802,7 @@ EXTERN_C const IID IID_ID3D12CommandQueue;
|
||||
DECLSPEC_XFGVIRT(ID3D12CommandQueue, GetClockCalibration)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetClockCalibration )(
|
||||
ID3D12CommandQueue * This,
|
||||
_Out_ UINT64 *pGpuTimestamp,
|
||||
_Out_ UINT64 *pGPUTimestamp,
|
||||
_Out_ UINT64 *pCpuTimestamp);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CommandQueue, GetDesc)
|
||||
@@ -8885,8 +8885,8 @@ EXTERN_C const IID IID_ID3D12CommandQueue;
|
||||
#define ID3D12CommandQueue_GetTimestampFrequency(This,pFrequency) \
|
||||
( (This)->lpVtbl -> GetTimestampFrequency(This,pFrequency) )
|
||||
|
||||
#define ID3D12CommandQueue_GetClockCalibration(This,pGpuTimestamp,pCpuTimestamp) \
|
||||
( (This)->lpVtbl -> GetClockCalibration(This,pGpuTimestamp,pCpuTimestamp) )
|
||||
#define ID3D12CommandQueue_GetClockCalibration(This,pGPUTimestamp,pCpuTimestamp) \
|
||||
( (This)->lpVtbl -> GetClockCalibration(This,pGPUTimestamp,pCpuTimestamp) )
|
||||
#if !defined(_WIN32)
|
||||
|
||||
#define ID3D12CommandQueue_GetDesc(This) \
|
||||
@@ -29176,7 +29176,7 @@ DEFINE_ENUM_FLAG_OPERATORS( D3D12_DEVICE_FLAGS )
|
||||
typedef struct D3D12_DEVICE_CONFIGURATION_DESC
|
||||
{
|
||||
D3D12_DEVICE_FLAGS Flags;
|
||||
UINT GpuBasedValidationFlags;
|
||||
UINT GPUBasedValidationFlags;
|
||||
UINT SDKVersion;
|
||||
UINT NumEnabledExperimentalFeatures;
|
||||
} D3D12_DEVICE_CONFIGURATION_DESC;
|
||||
|
||||
Reference in new issue
Block a user