1 /* 2 Copyright (c) 2019-2024 Timur Gafarov. 3 4 Boost Software License - Version 1.0 - August 17th, 2003 5 6 Permission is hereby granted, free of charge, to any person or organization 7 obtaining a copy of the software and accompanying documentation covered by 8 this license (the "Software") to use, reproduce, display, distribute, 9 execute, and transmit the Software, and to prepare derivative works of the 10 Software, and to permit third-parties to whom the Software is furnished to 11 do so, all subject to the following: 12 13 The copyright notices in the Software and this entire statement, including 14 the above license grant, this restriction and the following disclaimer, 15 must be included in all copies of the Software, in whole or in part, and 16 all derivative works of the Software, unless such copies or derivative 17 works are solely in the form of machine-executable object code generated by 18 a source language processor. 19 20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 23 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 24 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 25 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 DEALINGS IN THE SOFTWARE. 27 */ 28 module bindbc.wgpu.funcs; 29 30 import core.stdc.stdint; 31 import bindbc.wgpu.types; 32 import bindbc.wgpu.types2; 33 34 /* 35 * Function definitions from webgpu.h 36 */ 37 38 __gshared 39 { 40 WGPUProcCreateInstance wgpuCreateInstance; 41 WGPUProcGetProcAddress wgpuGetProcAddress; 42 43 // Methods of Adapter 44 WGPUProcAdapterEnumerateFeatures wgpuAdapterEnumerateFeatures; 45 WGPUProcAdapterGetLimits wgpuAdapterGetLimits; 46 WGPUProcAdapterGetInfo wgpuAdapterGetInfo; 47 WGPUProcAdapterHasFeature wgpuAdapterHasFeature; 48 WGPUProcAdapterRequestDevice wgpuAdapterRequestDevice; 49 WGPUProcAdapterReference wgpuAdapterReference; 50 WGPUProcAdapterRelease wgpuAdapterRelease; 51 52 // Procs of AdapterInfo 53 WGPUProcAdapterInfoFreeMembers wgpuAdapterInfoFreeMembers; 54 55 // Methods of BindGroup 56 WGPUProcBindGroupSetLabel wgpuBindGroupSetLabel; 57 WGPUProcBindGroupReference wgpuBindGroupReference; 58 WGPUProcBindGroupRelease wgpuBindGroupRelease; 59 60 // Methods of BindGroupLayout 61 WGPUProcBindGroupLayoutSetLabel wgpuBindGroupLayoutSetLabel; 62 WGPUProcBindGroupLayoutReference wgpuBindGroupLayoutReference; 63 WGPUProcBindGroupLayoutRelease wgpuBindGroupLayoutRelease; 64 65 // Methods of Buffer 66 WGPUProcBufferDestroy wgpuBufferDestroy; 67 WGPUProcBufferGetConstMappedRange wgpuBufferGetConstMappedRange; 68 WGPUProcBufferGetMapState wgpuBufferGetMapState; 69 WGPUProcBufferGetMappedRange wgpuBufferGetMappedRange; 70 WGPUProcBufferGetSize wgpuBufferGetSize; 71 WGPUProcBufferGetUsage wgpuBufferGetUsage; 72 WGPUProcBufferMapAsync wgpuBufferMapAsync; 73 WGPUProcBufferSetLabel wgpuBufferSetLabel; 74 WGPUProcBufferUnmap wgpuBufferUnmap; 75 WGPUProcBufferReference wgpuBufferReference; 76 WGPUProcBufferRelease wgpuBufferRelease; 77 78 // Methods of CommandBuffer 79 WGPUProcCommandBufferSetLabel wgpuCommandBufferSetLabel; 80 WGPUProcCommandBufferReference wgpuCommandBufferReference; 81 WGPUProcCommandBufferRelease wgpuCommandBufferRelease; 82 83 // Methods of CommandEncoder 84 WGPUProcCommandEncoderBeginComputePass wgpuCommandEncoderBeginComputePass; 85 WGPUProcCommandEncoderBeginRenderPass wgpuCommandEncoderBeginRenderPass; 86 WGPUProcCommandEncoderClearBuffer wgpuCommandEncoderClearBuffer; 87 WGPUProcCommandEncoderCopyBufferToBuffer wgpuCommandEncoderCopyBufferToBuffer; 88 WGPUProcCommandEncoderCopyBufferToTexture wgpuCommandEncoderCopyBufferToTexture; 89 WGPUProcCommandEncoderCopyTextureToBuffer wgpuCommandEncoderCopyTextureToBuffer; 90 WGPUProcCommandEncoderCopyTextureToTexture wgpuCommandEncoderCopyTextureToTexture; 91 WGPUProcCommandEncoderFinish wgpuCommandEncoderFinish; 92 WGPUProcCommandEncoderInsertDebugMarker wgpuCommandEncoderInsertDebugMarker; 93 WGPUProcCommandEncoderPopDebugGroup wgpuCommandEncoderPopDebugGroup; 94 WGPUProcCommandEncoderPushDebugGroup wgpuCommandEncoderPushDebugGroup; 95 WGPUProcCommandEncoderResolveQuerySet wgpuCommandEncoderResolveQuerySet; 96 WGPUProcCommandEncoderSetLabel wgpuCommandEncoderSetLabel; 97 WGPUProcCommandEncoderWriteTimestamp wgpuCommandEncoderWriteTimestamp; 98 WGPUProcCommandEncoderReference wgpuCommandEncoderReference; 99 WGPUProcCommandEncoderRelease wgpuCommandEncoderRelease; 100 101 // Methods of ComputePassEncoder 102 WGPUProcComputePassEncoderDispatchWorkgroups wgpuComputePassEncoderDispatchWorkgroups; 103 WGPUProcComputePassEncoderDispatchWorkgroupsIndirect wgpuComputePassEncoderDispatchWorkgroupsIndirect; 104 WGPUProcComputePassEncoderEnd wgpuComputePassEncoderEnd; 105 WGPUProcComputePassEncoderInsertDebugMarker wgpuComputePassEncoderInsertDebugMarker; 106 WGPUProcComputePassEncoderPopDebugGroup wgpuComputePassEncoderPopDebugGroup; 107 WGPUProcComputePassEncoderPushDebugGroup wgpuComputePassEncoderPushDebugGroup; 108 WGPUProcComputePassEncoderSetBindGroup wgpuComputePassEncoderSetBindGroup; 109 WGPUProcComputePassEncoderSetLabel wgpuComputePassEncoderSetLabel; 110 WGPUProcComputePassEncoderSetPipeline wgpuComputePassEncoderSetPipeline; 111 WGPUProcComputePassEncoderReference wgpuComputePassEncoderReference; 112 WGPUProcComputePassEncoderRelease wgpuComputePassEncoderRelease; 113 114 // Methods of ComputePipeline 115 WGPUProcComputePipelineGetBindGroupLayout wgpuComputePipelineGetBindGroupLayout; 116 WGPUProcComputePipelineSetLabel wgpuComputePipelineSetLabel; 117 WGPUProcComputePipelineReference wgpuComputePipelineReference; 118 WGPUProcComputePipelineRelease wgpuComputePipelineRelease; 119 120 // Methods of Device 121 WGPUProcDeviceCreateBindGroup wgpuDeviceCreateBindGroup; 122 WGPUProcDeviceCreateBindGroupLayout wgpuDeviceCreateBindGroupLayout; 123 WGPUProcDeviceCreateBuffer wgpuDeviceCreateBuffer; 124 WGPUProcDeviceCreateCommandEncoder wgpuDeviceCreateCommandEncoder; 125 WGPUProcDeviceCreateComputePipeline wgpuDeviceCreateComputePipeline; 126 WGPUProcDeviceCreateComputePipelineAsync wgpuDeviceCreateComputePipelineAsync; 127 WGPUProcDeviceCreatePipelineLayout wgpuDeviceCreatePipelineLayout; 128 WGPUProcDeviceCreateQuerySet wgpuDeviceCreateQuerySet; 129 WGPUProcDeviceCreateRenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder; 130 WGPUProcDeviceCreateRenderPipeline wgpuDeviceCreateRenderPipeline; 131 WGPUProcDeviceCreateRenderPipelineAsync wgpuDeviceCreateRenderPipelineAsync; 132 WGPUProcDeviceCreateSampler wgpuDeviceCreateSampler; 133 WGPUProcDeviceCreateShaderModule wgpuDeviceCreateShaderModule; 134 WGPUProcDeviceCreateTexture wgpuDeviceCreateTexture; 135 WGPUProcDeviceDestroy wgpuDeviceDestroy; 136 WGPUProcDeviceEnumerateFeatures wgpuDeviceEnumerateFeatures; 137 WGPUProcDeviceGetLimits wgpuDeviceGetLimits; 138 WGPUProcDeviceGetQueue wgpuDeviceGetQueue; 139 WGPUProcDeviceHasFeature wgpuDeviceHasFeature; 140 WGPUProcDevicePopErrorScope wgpuDevicePopErrorScope; 141 WGPUProcDevicePushErrorScope wgpuDevicePushErrorScope; 142 //WGPUProcDeviceSetDeviceLostCallback wgpuDeviceSetDeviceLostCallback; 143 WGPUProcDeviceSetLabel wgpuDeviceSetLabel; 144 WGPUProcDeviceReference wgpuDeviceReference; 145 WGPUProcDeviceRelease wgpuDeviceRelease; 146 147 // Methods of Instance 148 WGPUProcInstanceCreateSurface wgpuInstanceCreateSurface; 149 WGPUProcInstanceHasWGSLLanguageFeature wgpuInstanceHasWGSLLanguageFeature; 150 WGPUProcInstanceProcessEvents wgpuInstanceProcessEvents; 151 WGPUProcInstanceRequestAdapter wgpuInstanceRequestAdapter; 152 WGPUProcInstanceReference wgpuInstanceReference; 153 WGPUProcInstanceRelease wgpuInstanceRelease; 154 155 // Methods of PipelineLayout 156 WGPUProcPipelineLayoutSetLabel wgpuPipelineLayoutSetLabel; 157 WGPUProcPipelineLayoutReference wgpuPipelineLayoutReference; 158 WGPUProcPipelineLayoutRelease wgpuPipelineLayoutRelease; 159 160 // Methods of QuerySet 161 WGPUProcQuerySetDestroy wgpuQuerySetDestroy; 162 WGPUProcQuerySetGetCount wgpuQuerySetGetCount; 163 WGPUProcQuerySetGetType wgpuQuerySetGetType; 164 WGPUProcQuerySetSetLabel wgpuQuerySetSetLabel; 165 WGPUProcQuerySetReference wgpuQuerySetReference; 166 WGPUProcQuerySetRelease wgpuQuerySetRelease; 167 168 // Methods of Queue 169 WGPUProcQueueOnSubmittedWorkDone wgpuQueueOnSubmittedWorkDone; 170 WGPUProcQueueSetLabel wgpuQueueSetLabel; 171 WGPUProcQueueSubmit wgpuQueueSubmit; 172 WGPUProcQueueWriteBuffer wgpuQueueWriteBuffer; 173 WGPUProcQueueWriteTexture wgpuQueueWriteTexture; 174 WGPUProcQueueReference wgpuQueueReference; 175 WGPUProcQueueRelease wgpuQueueRelease; 176 177 // Methods of RenderBundleEncoder 178 WGPUProcRenderBundleSetLabel wgpuRenderBundleSetLabel; 179 WGPUProcRenderBundleReference wgpuRenderBundleReference; 180 WGPUProcRenderBundleRelease wgpuRenderBundleRelease; 181 182 // Methods of RenderBundleEncoder 183 WGPUProcRenderBundleEncoderDraw wgpuRenderBundleEncoderDraw; 184 WGPUProcRenderBundleEncoderDrawIndexed wgpuRenderBundleEncoderDrawIndexed; 185 WGPUProcRenderBundleEncoderDrawIndexedIndirect wgpuRenderBundleEncoderDrawIndexedIndirect; 186 WGPUProcRenderBundleEncoderDrawIndirect wgpuRenderBundleEncoderDrawIndirect; 187 WGPUProcRenderBundleEncoderFinish wgpuRenderBundleEncoderFinish; 188 WGPUProcRenderBundleEncoderInsertDebugMarker wgpuRenderBundleEncoderInsertDebugMarker; 189 WGPUProcRenderBundleEncoderPopDebugGroup wgpuRenderBundleEncoderPopDebugGroup; 190 WGPUProcRenderBundleEncoderPushDebugGroup wgpuRenderBundleEncoderPushDebugGroup; 191 WGPUProcRenderBundleEncoderSetBindGroup wgpuRenderBundleEncoderSetBindGroup; 192 WGPUProcRenderBundleEncoderSetIndexBuffer wgpuRenderBundleEncoderSetIndexBuffer; 193 WGPUProcRenderBundleEncoderSetLabel wgpuRenderBundleEncoderSetLabel; 194 WGPUProcRenderBundleEncoderSetPipeline wgpuRenderBundleEncoderSetPipeline; 195 WGPUProcRenderBundleEncoderSetVertexBuffer wgpuRenderBundleEncoderSetVertexBuffer; 196 WGPUProcRenderBundleEncoderReference wgpuRenderBundleEncoderReference; 197 WGPUProcRenderBundleEncoderRelease wgpuRenderBundleEncoderRelease; 198 199 // Methods of RenderPassEncoder 200 WGPUProcRenderPassEncoderBeginOcclusionQuery wgpuRenderPassEncoderBeginOcclusionQuery; 201 WGPUProcRenderPassEncoderDraw wgpuRenderPassEncoderDraw; 202 WGPUProcRenderPassEncoderDrawIndexed wgpuRenderPassEncoderDrawIndexed; 203 WGPUProcRenderPassEncoderDrawIndexedIndirect wgpuRenderPassEncoderDrawIndexedIndirect; 204 WGPUProcRenderPassEncoderDrawIndirect wgpuRenderPassEncoderDrawIndirect; 205 WGPUProcRenderPassEncoderEnd wgpuRenderPassEncoderEnd; 206 WGPUProcRenderPassEncoderEndOcclusionQuery wgpuRenderPassEncoderEndOcclusionQuery; 207 WGPUProcRenderPassEncoderExecuteBundles wgpuRenderPassEncoderExecuteBundles; 208 WGPUProcRenderPassEncoderInsertDebugMarker wgpuRenderPassEncoderInsertDebugMarker; 209 WGPUProcRenderPassEncoderPopDebugGroup wgpuRenderPassEncoderPopDebugGroup; 210 WGPUProcRenderPassEncoderPushDebugGroup wgpuRenderPassEncoderPushDebugGroup; 211 WGPUProcRenderPassEncoderSetBindGroup wgpuRenderPassEncoderSetBindGroup; 212 WGPUProcRenderPassEncoderSetBlendConstant wgpuRenderPassEncoderSetBlendConstant; 213 WGPUProcRenderPassEncoderSetIndexBuffer wgpuRenderPassEncoderSetIndexBuffer; 214 WGPUProcRenderPassEncoderSetLabel wgpuRenderPassEncoderSetLabel; 215 WGPUProcRenderPassEncoderSetPipeline wgpuRenderPassEncoderSetPipeline; 216 WGPUProcRenderPassEncoderSetScissorRect wgpuRenderPassEncoderSetScissorRect; 217 WGPUProcRenderPassEncoderSetStencilReference wgpuRenderPassEncoderSetStencilReference; 218 WGPUProcRenderPassEncoderSetVertexBuffer wgpuRenderPassEncoderSetVertexBuffer; 219 WGPUProcRenderPassEncoderSetViewport wgpuRenderPassEncoderSetViewport; 220 WGPUProcRenderPassEncoderReference wgpuRenderPassEncoderReference; 221 WGPUProcRenderPassEncoderRelease wgpuRenderPassEncoderRelease; 222 223 // Methods of RenderPipeline 224 WGPUProcRenderPipelineGetBindGroupLayout wgpuRenderPipelineGetBindGroupLayout; 225 WGPUProcRenderPipelineSetLabel wgpuRenderPipelineSetLabel; 226 WGPUProcRenderPipelineReference wgpuRenderPipelineReference; 227 WGPUProcRenderPipelineRelease wgpuRenderPipelineRelease; 228 229 // Methods of Sampler 230 WGPUProcSamplerSetLabel wgpuSamplerSetLabel; 231 WGPUProcSamplerReference wgpuSamplerReference; 232 WGPUProcSamplerRelease wgpuSamplerRelease; 233 234 // Methods of ShaderModule 235 WGPUProcShaderModuleGetCompilationInfo wgpuShaderModuleGetCompilationInfo; 236 WGPUProcShaderModuleSetLabel wgpuShaderModuleSetLabel; 237 WGPUProcShaderModuleReference wgpuShaderModuleReference; 238 WGPUProcShaderModuleRelease wgpuShaderModuleRelease; 239 240 // Methods of Surface 241 WGPUProcSurfaceConfigure wgpuSurfaceConfigure; 242 WGPUProcSurfaceGetCapabilities wgpuSurfaceGetCapabilities; 243 WGPUProcSurfaceGetCurrentTexture wgpuSurfaceGetCurrentTexture; 244 WGPUProcSurfacePresent wgpuSurfacePresent; 245 WGPUProcSurfaceSetLabel wgpuSurfaceSetLabel; 246 WGPUProcSurfaceUnconfigure wgpuSurfaceUnconfigure; 247 WGPUProcSurfaceReference wgpuSurfaceReference; 248 WGPUProcSurfaceRelease wgpuSurfaceRelease; 249 250 // Methods of SurfaceCapabilities 251 WGPUProcSurfaceCapabilitiesFreeMembers wgpuSurfaceCapabilitiesFreeMembers; 252 253 // Methods of Texture 254 WGPUProcTextureCreateView wgpuTextureCreateView; 255 WGPUProcTextureDestroy wgpuTextureDestroy; 256 WGPUProcTextureGetDepthOrArrayLayers wgpuTextureGetDepthOrArrayLayers; 257 WGPUProcTextureGetDimension wgpuTextureGetDimension; 258 WGPUProcTextureGetFormat wgpuTextureGetFormat; 259 WGPUProcTextureGetHeight wgpuTextureGetHeight; 260 WGPUProcTextureGetMipLevelCount wgpuTextureGetMipLevelCount; 261 WGPUProcTextureGetSampleCount wgpuTextureGetSampleCount; 262 WGPUProcTextureGetUsage wgpuTextureGetUsage; 263 WGPUProcTextureGetWidth wgpuTextureGetWidth; 264 WGPUProcTextureSetLabel wgpuTextureSetLabel; 265 WGPUProcTextureReference wgpuTextureReference; 266 WGPUProcTextureRelease wgpuTextureRelease; 267 268 // Methods of TextureView 269 WGPUProcTextureViewSetLabel wgpuTextureViewSetLabel; 270 WGPUProcTextureViewReference wgpuTextureViewReference; 271 WGPUProcTextureViewRelease wgpuTextureViewRelease; 272 273 // 274 WGPUProcGenerateReport wgpuGenerateReport; 275 WGPUProcInstanceEnumerateAdapters wgpuInstanceEnumerateAdapters; 276 WGPUProcQueueSubmitForIndex wgpuQueueSubmitForIndex; 277 WGPUProcDevicePoll wgpuDevicePoll; 278 WGPUProcSetLogCallback wgpuSetLogCallback; 279 WGPUProcSetLogLevel wgpuSetLogLevel; 280 WGPUProcGetVersion wgpuGetVersion; 281 WGPUProcRenderPassEncoderSetPushConstants wgpuRenderPassEncoderSetPushConstants; 282 WGPUProcRenderPassEncoderMultiDrawIndirect wgpuRenderPassEncoderMultiDrawIndirect; 283 WGPUProcRenderPassEncoderMultiDrawIndexedIndirect wgpuRenderPassEncoderMultiDrawIndexedIndirect; 284 WGPUProcRenderPassEncoderMultiDrawIndirectCount wgpuRenderPassEncoderMultiDrawIndirectCount; 285 WGPUProcRenderPassEncoderMultiDrawIndexedIndirectCount wgpuRenderPassEncoderMultiDrawIndexedIndirectCount; 286 WGPUProcComputePassEncoderBeginPipelineStatisticsQuery wgpuComputePassEncoderBeginPipelineStatisticsQuery; 287 WGPUProcComputePassEncoderEndPipelineStatisticsQuery wgpuComputePassEncoderEndPipelineStatisticsQuery; 288 WGPUProcRenderPassEncoderBeginPipelineStatisticsQuery wgpuRenderPassEncoderBeginPipelineStatisticsQuery; 289 WGPUProcRenderPassEncoderEndPipelineStatisticsQuery wgpuRenderPassEncoderEndPipelineStatisticsQuery; 290 }