@nativescript/canvas 2.0.0-beta.8 → 2.0.0-webgpu.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +23 -15
- package/Canvas/common.js +125 -56
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +5 -7
- package/Canvas/index.android.js +61 -133
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +4 -1
- package/Canvas/index.ios.d.ts +6 -6
- package/Canvas/index.ios.js +75 -85
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.js +8 -11
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.d.ts +14 -0
- package/Canvas2D/DOMMatrix/index.js +62 -0
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +4 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/ImageAsset/index.d.ts +1 -0
- package/ImageAsset/index.js +49 -0
- package/ImageAsset/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +1 -0
- package/WebGL/WebGLRenderingContext/index.js +104 -14
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -0
- package/WebGL2/WebGL2RenderingContext/index.js +2 -3
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/Constants.d.ts +36 -0
- package/WebGPU/Constants.js +42 -0
- package/WebGPU/Constants.js.map +1 -0
- package/WebGPU/Errors.d.ts +18 -0
- package/WebGPU/Errors.js +21 -0
- package/WebGPU/Errors.js.map +1 -0
- package/WebGPU/GPU.d.ts +13 -0
- package/WebGPU/GPU.js +35 -0
- package/WebGPU/GPU.js.map +1 -0
- package/WebGPU/GPUAdapter.d.ts +23 -0
- package/WebGPU/GPUAdapter.js +62 -0
- package/WebGPU/GPUAdapter.js.map +1 -0
- package/WebGPU/GPUAdapterInfo.d.ts +9 -0
- package/WebGPU/GPUAdapterInfo.js +24 -0
- package/WebGPU/GPUAdapterInfo.js.map +1 -0
- package/WebGPU/GPUBindGroup.d.ts +5 -0
- package/WebGPU/GPUBindGroup.js +12 -0
- package/WebGPU/GPUBindGroup.js.map +1 -0
- package/WebGPU/GPUBindGroupLayout.d.ts +5 -0
- package/WebGPU/GPUBindGroupLayout.js +12 -0
- package/WebGPU/GPUBindGroupLayout.js.map +1 -0
- package/WebGPU/GPUBuffer.d.ts +15 -0
- package/WebGPU/GPUBuffer.js +54 -0
- package/WebGPU/GPUBuffer.js.map +1 -0
- package/WebGPU/GPUCanvasContext.d.ts +33 -0
- package/WebGPU/GPUCanvasContext.js +67 -0
- package/WebGPU/GPUCanvasContext.js.map +1 -0
- package/WebGPU/GPUCommandBuffer.d.ts +5 -0
- package/WebGPU/GPUCommandBuffer.js +12 -0
- package/WebGPU/GPUCommandBuffer.js.map +1 -0
- package/WebGPU/GPUCommandEncoder.d.ts +41 -0
- package/WebGPU/GPUCommandEncoder.js +105 -0
- package/WebGPU/GPUCommandEncoder.js.map +1 -0
- package/WebGPU/GPUComputePassEncoder.d.ts +16 -0
- package/WebGPU/GPUComputePassEncoder.js +50 -0
- package/WebGPU/GPUComputePassEncoder.js.map +1 -0
- package/WebGPU/GPUComputePipeline.d.ts +7 -0
- package/WebGPU/GPUComputePipeline.js +16 -0
- package/WebGPU/GPUComputePipeline.js.map +1 -0
- package/WebGPU/GPUDevice.d.ts +173 -0
- package/WebGPU/GPUDevice.js +381 -0
- package/WebGPU/GPUDevice.js.map +1 -0
- package/WebGPU/GPUDeviceLostInfo.d.ts +1 -0
- package/WebGPU/GPUDeviceLostInfo.js +10 -0
- package/WebGPU/GPUDeviceLostInfo.js.map +1 -0
- package/WebGPU/GPUExternalTexture.d.ts +5 -0
- package/WebGPU/GPUExternalTexture.js +12 -0
- package/WebGPU/GPUExternalTexture.js.map +1 -0
- package/WebGPU/GPUPipelineLayout.d.ts +5 -0
- package/WebGPU/GPUPipelineLayout.js +12 -0
- package/WebGPU/GPUPipelineLayout.js.map +1 -0
- package/WebGPU/GPUQuerySet.d.ts +5 -0
- package/WebGPU/GPUQuerySet.js +12 -0
- package/WebGPU/GPUQuerySet.js.map +1 -0
- package/WebGPU/GPUQueue.d.ts +14 -0
- package/WebGPU/GPUQueue.js +77 -0
- package/WebGPU/GPUQueue.js.map +1 -0
- package/WebGPU/GPURenderBundle.d.ts +5 -0
- package/WebGPU/GPURenderBundle.js +12 -0
- package/WebGPU/GPURenderBundle.js.map +1 -0
- package/WebGPU/GPURenderBundleEncoder.d.ts +20 -0
- package/WebGPU/GPURenderBundleEncoder.js +61 -0
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -0
- package/WebGPU/GPURenderPassEncoder.d.ts +29 -0
- package/WebGPU/GPURenderPassEncoder.js +94 -0
- package/WebGPU/GPURenderPassEncoder.js.map +1 -0
- package/WebGPU/GPURenderPipeline.d.ts +7 -0
- package/WebGPU/GPURenderPipeline.js +16 -0
- package/WebGPU/GPURenderPipeline.js.map +1 -0
- package/WebGPU/GPUSampler.d.ts +5 -0
- package/WebGPU/GPUSampler.js +12 -0
- package/WebGPU/GPUSampler.js.map +1 -0
- package/WebGPU/GPUShaderModule.d.ts +6 -0
- package/WebGPU/GPUShaderModule.js +15 -0
- package/WebGPU/GPUShaderModule.js.map +1 -0
- package/WebGPU/GPUTexture.d.ts +16 -0
- package/WebGPU/GPUTexture.js +41 -0
- package/WebGPU/GPUTexture.js.map +1 -0
- package/WebGPU/GPUTextureView.d.ts +5 -0
- package/WebGPU/GPUTextureView.js +12 -0
- package/WebGPU/GPUTextureView.js.map +1 -0
- package/WebGPU/Interfaces.d.ts +155 -0
- package/WebGPU/Interfaces.js +2 -0
- package/WebGPU/Interfaces.js.map +1 -0
- package/WebGPU/Types.d.ts +39 -0
- package/WebGPU/Types.js +2 -0
- package/WebGPU/Types.js.map +1 -0
- package/WebGPU/Utils.d.ts +1 -0
- package/WebGPU/Utils.js +75 -0
- package/WebGPU/Utils.js.map +1 -0
- package/WebGPU/index.d.ts +28 -0
- package/WebGPU/index.js +29 -0
- package/WebGPU/index.js.map +1 -0
- package/index.d.ts +1 -1
- package/index.js +22 -1
- package/index.js.map +1 -1
- package/package.json +1 -4
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +23 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +47 -8
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2280 -103
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +1564 -3814
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +27 -34
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +27 -34
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +602 -664
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +46 -46
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +47 -8
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2280 -103
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +1564 -3814
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +27 -34
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +27 -34
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +1564 -3814
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +27 -34
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +27 -34
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +31 -31
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +604 -663
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +638 -642
- package/platforms/ios/build.xcconfig +3 -1
- package/platforms/ios/src/cpp/Caches.h +69 -1
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +320 -395
- package/platforms/ios/src/cpp/CanvasJSIModule.h +7 -1
- package/platforms/ios/src/cpp/Helpers.h +43 -8
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +35 -37
- package/platforms/ios/src/cpp/ImageAssetImpl.h +14 -10
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +2 -2
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +1 -1
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +0 -10
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +41 -4
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +409 -3
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +27 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +131 -149
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +1766 -1659
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +302 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.h +63 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.cpp +174 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.h +58 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.cpp +53 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.cpp +53 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +229 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.h +59 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +317 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.cpp +54 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +1087 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.h +69 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +260 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.h +62 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.cpp +84 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.h +49 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +2741 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +95 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +186 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.cpp +54 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.h +46 -0
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.cpp +137 -0
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +521 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.h +56 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +469 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.h +71 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.cpp +53 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +653 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +85 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.cpp +84 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.h +49 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.cpp +53 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.cpp +56 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.cpp +1304 -0
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.h +288 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.cpp +360 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.h +75 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.cpp +53 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.h +45 -0
- package/platforms/ios/src/cpp/webgpu/GPUUtils.h +178 -0
- package/SVG/Circle.d.ts +0 -11
- package/SVG/Circle.js +0 -21
- package/SVG/Circle.js.map +0 -1
- package/SVG/ClipPath.d.ts +0 -4
- package/SVG/ClipPath.js +0 -9
- package/SVG/ClipPath.js.map +0 -1
- package/SVG/Defs.d.ts +0 -4
- package/SVG/Defs.js +0 -9
- package/SVG/Defs.js.map +0 -1
- package/SVG/Ellipse.d.ts +0 -13
- package/SVG/Ellipse.js +0 -26
- package/SVG/Ellipse.js.map +0 -1
- package/SVG/G.d.ts +0 -7
- package/SVG/G.js +0 -9
- package/SVG/G.js.map +0 -1
- package/SVG/Image.d.ts +0 -11
- package/SVG/Image.js +0 -40
- package/SVG/Image.js.map +0 -1
- package/SVG/Line.d.ts +0 -13
- package/SVG/Line.js +0 -26
- package/SVG/Line.js.map +0 -1
- package/SVG/LinearGradient.d.ts +0 -10
- package/SVG/LinearGradient.js +0 -13
- package/SVG/LinearGradient.js.map +0 -1
- package/SVG/Path.d.ts +0 -7
- package/SVG/Path.js +0 -14
- package/SVG/Path.js.map +0 -1
- package/SVG/Pattern.d.ts +0 -4
- package/SVG/Pattern.js +0 -9
- package/SVG/Pattern.js.map +0 -1
- package/SVG/Polygon.d.ts +0 -7
- package/SVG/Polygon.js +0 -14
- package/SVG/Polygon.js.map +0 -1
- package/SVG/Polyline.d.ts +0 -7
- package/SVG/Polyline.js +0 -14
- package/SVG/Polyline.js.map +0 -1
- package/SVG/Rect.d.ts +0 -8
- package/SVG/Rect.js +0 -13
- package/SVG/Rect.js.map +0 -1
- package/SVG/SVG.d.ts +0 -32
- package/SVG/SVG.js +0 -204
- package/SVG/SVG.js.map +0 -1
- package/SVG/SVGItem.d.ts +0 -5
- package/SVG/SVGItem.js +0 -8
- package/SVG/SVGItem.js.map +0 -1
- package/SVG/Stop.d.ts +0 -5
- package/SVG/Stop.js +0 -9
- package/SVG/Stop.js.map +0 -1
- package/SVG/Symbol.d.ts +0 -4
- package/SVG/Symbol.js +0 -9
- package/SVG/Symbol.js.map +0 -1
- package/SVG/Text.d.ts +0 -14
- package/SVG/Text.js +0 -26
- package/SVG/Text.js.map +0 -1
- package/SVG/Use.d.ts +0 -4
- package/SVG/Use.js +0 -9
- package/SVG/Use.js.map +0 -1
- package/SVG/index.d.ts +0 -18
- package/SVG/index.js +0 -19
- package/SVG/index.js.map +0 -1
- package/platforms/ios/src/cpp/PerIsolateData.cpp +0 -49
- package/platforms/ios/src/cpp/PerIsolateData.h +0 -54
- package/platforms/ios/src/cpp/URLImpl.cpp +0 -464
- package/platforms/ios/src/cpp/URLImpl.h +0 -121
|
@@ -8,12 +8,550 @@
|
|
|
8
8
|
#include <stdint.h>
|
|
9
9
|
#include <stdlib.h>
|
|
10
10
|
|
|
11
|
+
#define CanvasGPUTextureUsageCopySrc (1 << 0)
|
|
12
|
+
|
|
13
|
+
#define CanvasGPUTextureUsageCopyDst (1 << 1)
|
|
14
|
+
|
|
15
|
+
#define CanvasGPUTextureUsageTextureBinding (1 << 2)
|
|
16
|
+
|
|
17
|
+
#define CanvasGPUTextureUsageStorageBinding (1 << 3)
|
|
18
|
+
|
|
19
|
+
#define CanvasGPUTextureUsageRenderAttachment (1 << 4)
|
|
20
|
+
|
|
21
|
+
typedef enum CanvasAddressMode {
|
|
22
|
+
/**
|
|
23
|
+
* Clamp the value to the edge of the texture
|
|
24
|
+
*
|
|
25
|
+
* -0.25 -> 0.0
|
|
26
|
+
* 1.25 -> 1.0
|
|
27
|
+
*/
|
|
28
|
+
CanvasAddressModeClampToEdge = 0,
|
|
29
|
+
/**
|
|
30
|
+
* Repeat the texture in a tiling fashion
|
|
31
|
+
*
|
|
32
|
+
* -0.25 -> 0.75
|
|
33
|
+
* 1.25 -> 0.25
|
|
34
|
+
*/
|
|
35
|
+
CanvasAddressModeRepeat = 1,
|
|
36
|
+
/**
|
|
37
|
+
* Repeat the texture, mirroring it every repeat
|
|
38
|
+
*
|
|
39
|
+
* -0.25 -> 0.25
|
|
40
|
+
* 1.25 -> 0.75
|
|
41
|
+
*/
|
|
42
|
+
CanvasAddressModeMirrorRepeat = 2,
|
|
43
|
+
/**
|
|
44
|
+
* Clamp the value to the border of the texture
|
|
45
|
+
* Requires feature [`Features::ADDRESS_MODE_CLAMP_TO_BORDER`]
|
|
46
|
+
*
|
|
47
|
+
* -0.25 -> border
|
|
48
|
+
* 1.25 -> border
|
|
49
|
+
*/
|
|
50
|
+
CanvasAddressModeClampToBorder = 3,
|
|
51
|
+
} CanvasAddressMode;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* ASTC block dimensions
|
|
55
|
+
*/
|
|
56
|
+
typedef enum CanvasAstcBlock {
|
|
57
|
+
/**
|
|
58
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px).
|
|
59
|
+
*/
|
|
60
|
+
CanvasAstcBlockB4x4,
|
|
61
|
+
/**
|
|
62
|
+
* 5x4 block compressed texture. 16 bytes per block (6.4 bit/px).
|
|
63
|
+
*/
|
|
64
|
+
CanvasAstcBlockB5x4,
|
|
65
|
+
/**
|
|
66
|
+
* 5x5 block compressed texture. 16 bytes per block (5.12 bit/px).
|
|
67
|
+
*/
|
|
68
|
+
CanvasAstcBlockB5x5,
|
|
69
|
+
/**
|
|
70
|
+
* 6x5 block compressed texture. 16 bytes per block (4.27 bit/px).
|
|
71
|
+
*/
|
|
72
|
+
CanvasAstcBlockB6x5,
|
|
73
|
+
/**
|
|
74
|
+
* 6x6 block compressed texture. 16 bytes per block (3.56 bit/px).
|
|
75
|
+
*/
|
|
76
|
+
CanvasAstcBlockB6x6,
|
|
77
|
+
/**
|
|
78
|
+
* 8x5 block compressed texture. 16 bytes per block (3.2 bit/px).
|
|
79
|
+
*/
|
|
80
|
+
CanvasAstcBlockB8x5,
|
|
81
|
+
/**
|
|
82
|
+
* 8x6 block compressed texture. 16 bytes per block (2.67 bit/px).
|
|
83
|
+
*/
|
|
84
|
+
CanvasAstcBlockB8x6,
|
|
85
|
+
/**
|
|
86
|
+
* 8x8 block compressed texture. 16 bytes per block (2 bit/px).
|
|
87
|
+
*/
|
|
88
|
+
CanvasAstcBlockB8x8,
|
|
89
|
+
/**
|
|
90
|
+
* 10x5 block compressed texture. 16 bytes per block (2.56 bit/px).
|
|
91
|
+
*/
|
|
92
|
+
CanvasAstcBlockB10x5,
|
|
93
|
+
/**
|
|
94
|
+
* 10x6 block compressed texture. 16 bytes per block (2.13 bit/px).
|
|
95
|
+
*/
|
|
96
|
+
CanvasAstcBlockB10x6,
|
|
97
|
+
/**
|
|
98
|
+
* 10x8 block compressed texture. 16 bytes per block (1.6 bit/px).
|
|
99
|
+
*/
|
|
100
|
+
CanvasAstcBlockB10x8,
|
|
101
|
+
/**
|
|
102
|
+
* 10x10 block compressed texture. 16 bytes per block (1.28 bit/px).
|
|
103
|
+
*/
|
|
104
|
+
CanvasAstcBlockB10x10,
|
|
105
|
+
/**
|
|
106
|
+
* 12x10 block compressed texture. 16 bytes per block (1.07 bit/px).
|
|
107
|
+
*/
|
|
108
|
+
CanvasAstcBlockB12x10,
|
|
109
|
+
/**
|
|
110
|
+
* 12x12 block compressed texture. 16 bytes per block (0.89 bit/px).
|
|
111
|
+
*/
|
|
112
|
+
CanvasAstcBlockB12x12,
|
|
113
|
+
} CanvasAstcBlock;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* ASTC RGBA channel
|
|
117
|
+
*/
|
|
118
|
+
typedef enum CanvasAstcChannel {
|
|
119
|
+
/**
|
|
120
|
+
* 8 bit integer RGBA, [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
121
|
+
*
|
|
122
|
+
* [`Features::TEXTURE_COMPRESSION_ASTC`] must be enabled to use this channel.
|
|
123
|
+
*/
|
|
124
|
+
CanvasAstcChannelUnorm,
|
|
125
|
+
/**
|
|
126
|
+
* 8 bit integer RGBA, Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
127
|
+
*
|
|
128
|
+
* [`Features::TEXTURE_COMPRESSION_ASTC`] must be enabled to use this channel.
|
|
129
|
+
*/
|
|
130
|
+
CanvasAstcChannelUnormSrgb,
|
|
131
|
+
/**
|
|
132
|
+
* floating-point RGBA, linear-color float can be outside of the [0, 1] range.
|
|
133
|
+
*
|
|
134
|
+
* [`Features::TEXTURE_COMPRESSION_ASTC_HDR`] must be enabled to use this channel.
|
|
135
|
+
*/
|
|
136
|
+
CanvasAstcChannelHdr,
|
|
137
|
+
} CanvasAstcChannel;
|
|
138
|
+
|
|
139
|
+
typedef enum CanvasBlendFactor {
|
|
140
|
+
/**
|
|
141
|
+
* 0.0
|
|
142
|
+
*/
|
|
143
|
+
CanvasBlendFactorZero = 0,
|
|
144
|
+
/**
|
|
145
|
+
* 1.0
|
|
146
|
+
*/
|
|
147
|
+
CanvasBlendFactorOne = 1,
|
|
148
|
+
/**
|
|
149
|
+
* S.component
|
|
150
|
+
*/
|
|
151
|
+
CanvasBlendFactorSrc = 2,
|
|
152
|
+
/**
|
|
153
|
+
* 1.0 - S.component
|
|
154
|
+
*/
|
|
155
|
+
CanvasBlendFactorOneMinusSrc = 3,
|
|
156
|
+
/**
|
|
157
|
+
* S.alpha
|
|
158
|
+
*/
|
|
159
|
+
CanvasBlendFactorSrcAlpha = 4,
|
|
160
|
+
/**
|
|
161
|
+
* 1.0 - S.alpha
|
|
162
|
+
*/
|
|
163
|
+
CanvasBlendFactorOneMinusSrcAlpha = 5,
|
|
164
|
+
/**
|
|
165
|
+
* D.component
|
|
166
|
+
*/
|
|
167
|
+
CanvasBlendFactorDst = 6,
|
|
168
|
+
/**
|
|
169
|
+
* 1.0 - D.component
|
|
170
|
+
*/
|
|
171
|
+
CanvasBlendFactorOneMinusDst = 7,
|
|
172
|
+
/**
|
|
173
|
+
* D.alpha
|
|
174
|
+
*/
|
|
175
|
+
CanvasBlendFactorDstAlpha = 8,
|
|
176
|
+
/**
|
|
177
|
+
* 1.0 - D.alpha
|
|
178
|
+
*/
|
|
179
|
+
CanvasBlendFactorOneMinusDstAlpha = 9,
|
|
180
|
+
/**
|
|
181
|
+
* min(S.alpha, 1.0 - D.alpha)
|
|
182
|
+
*/
|
|
183
|
+
CanvasBlendFactorSrcAlphaSaturated = 10,
|
|
184
|
+
/**
|
|
185
|
+
* Constant
|
|
186
|
+
*/
|
|
187
|
+
CanvasBlendFactorConstant = 11,
|
|
188
|
+
/**
|
|
189
|
+
* 1.0 - Constant
|
|
190
|
+
*/
|
|
191
|
+
CanvasBlendFactorOneMinusConstant = 12,
|
|
192
|
+
/**
|
|
193
|
+
* S1.component
|
|
194
|
+
*/
|
|
195
|
+
CanvasBlendFactorSrc1 = 13,
|
|
196
|
+
/**
|
|
197
|
+
* 1.0 - S1.component
|
|
198
|
+
*/
|
|
199
|
+
CanvasBlendFactorOneMinusSrc1 = 14,
|
|
200
|
+
/**
|
|
201
|
+
* S1.alpha
|
|
202
|
+
*/
|
|
203
|
+
CanvasBlendFactorSrc1Alpha = 15,
|
|
204
|
+
/**
|
|
205
|
+
* 1.0 - S1.alpha
|
|
206
|
+
*/
|
|
207
|
+
CanvasBlendFactorOneMinusSrc1Alpha = 16,
|
|
208
|
+
} CanvasBlendFactor;
|
|
209
|
+
|
|
210
|
+
typedef enum CanvasBlendOperation {
|
|
211
|
+
/**
|
|
212
|
+
* Src + Dst
|
|
213
|
+
*/
|
|
214
|
+
CanvasBlendOperationAdd = 0,
|
|
215
|
+
/**
|
|
216
|
+
* Src - Dst
|
|
217
|
+
*/
|
|
218
|
+
CanvasBlendOperationSubtract = 1,
|
|
219
|
+
/**
|
|
220
|
+
* Dst - Src
|
|
221
|
+
*/
|
|
222
|
+
CanvasBlendOperationReverseSubtract = 2,
|
|
223
|
+
/**
|
|
224
|
+
* min(Src, Dst)
|
|
225
|
+
*/
|
|
226
|
+
CanvasBlendOperationMin = 3,
|
|
227
|
+
/**
|
|
228
|
+
* max(Src, Dst)
|
|
229
|
+
*/
|
|
230
|
+
CanvasBlendOperationMax = 4,
|
|
231
|
+
} CanvasBlendOperation;
|
|
232
|
+
|
|
233
|
+
typedef enum CanvasBufferBindingType {
|
|
234
|
+
CanvasBufferBindingTypeUniform,
|
|
235
|
+
CanvasBufferBindingTypeStorage,
|
|
236
|
+
CanvasBufferBindingTypeReadOnlyStorage,
|
|
237
|
+
} CanvasBufferBindingType;
|
|
238
|
+
|
|
239
|
+
typedef enum CanvasCompareFunction {
|
|
240
|
+
CanvasCompareFunctionNever = 1,
|
|
241
|
+
CanvasCompareFunctionLess = 2,
|
|
242
|
+
CanvasCompareFunctionEqual = 3,
|
|
243
|
+
CanvasCompareFunctionLessEqual = 4,
|
|
244
|
+
CanvasCompareFunctionGreater = 5,
|
|
245
|
+
CanvasCompareFunctionNotEqual = 6,
|
|
246
|
+
CanvasCompareFunctionGreaterEqual = 7,
|
|
247
|
+
CanvasCompareFunctionAlways = 8,
|
|
248
|
+
} CanvasCompareFunction;
|
|
249
|
+
|
|
250
|
+
typedef enum CanvasCullMode {
|
|
251
|
+
CanvasCullModeNone,
|
|
252
|
+
CanvasCullModeFront,
|
|
253
|
+
CanvasCullModeBack,
|
|
254
|
+
} CanvasCullMode;
|
|
255
|
+
|
|
256
|
+
typedef enum CanvasFilterMode {
|
|
257
|
+
CanvasFilterModeNearest = 0,
|
|
258
|
+
/**
|
|
259
|
+
* Linear Interpolation
|
|
260
|
+
*
|
|
261
|
+
* This makes textures smooth but blurry when used as a mag filter.
|
|
262
|
+
*/
|
|
263
|
+
CanvasFilterModeLinear = 1,
|
|
264
|
+
} CanvasFilterMode;
|
|
265
|
+
|
|
266
|
+
typedef enum CanvasFrontFace {
|
|
267
|
+
CanvasFrontFaceCcw = 0,
|
|
268
|
+
CanvasFrontFaceCw = 1,
|
|
269
|
+
} CanvasFrontFace;
|
|
270
|
+
|
|
271
|
+
typedef enum CanvasGPUAutoLayoutMode {
|
|
272
|
+
CanvasGPUAutoLayoutModeAuto,
|
|
273
|
+
} CanvasGPUAutoLayoutMode;
|
|
274
|
+
|
|
275
|
+
typedef enum CanvasGPUErrorFilter {
|
|
276
|
+
/**
|
|
277
|
+
* Catch only out-of-memory errors.
|
|
278
|
+
*/
|
|
279
|
+
CanvasGPUErrorFilterOutOfMemory,
|
|
280
|
+
/**
|
|
281
|
+
* Catch only validation errors.
|
|
282
|
+
*/
|
|
283
|
+
CanvasGPUErrorFilterValidation,
|
|
284
|
+
/**
|
|
285
|
+
* Catch only internal errors.
|
|
286
|
+
*/
|
|
287
|
+
CanvasGPUErrorFilterInternal,
|
|
288
|
+
} CanvasGPUErrorFilter;
|
|
289
|
+
|
|
290
|
+
typedef enum CanvasGPUErrorType {
|
|
291
|
+
CanvasGPUErrorTypeNone,
|
|
292
|
+
CanvasGPUErrorTypeLost,
|
|
293
|
+
CanvasGPUErrorTypeOutOfMemory,
|
|
294
|
+
CanvasGPUErrorTypeValidation,
|
|
295
|
+
CanvasGPUErrorTypeInternal,
|
|
296
|
+
} CanvasGPUErrorType;
|
|
297
|
+
|
|
298
|
+
typedef enum CanvasGPUPowerPreference {
|
|
299
|
+
CanvasGPUPowerPreferenceNone,
|
|
300
|
+
CanvasGPUPowerPreferenceLowPower,
|
|
301
|
+
CanvasGPUPowerPreferenceHighPerformance,
|
|
302
|
+
} CanvasGPUPowerPreference;
|
|
303
|
+
|
|
304
|
+
typedef enum CanvasGPUPresentMode {
|
|
305
|
+
CanvasGPUPresentModeAutoVsync = 0,
|
|
306
|
+
CanvasGPUPresentModeAutoNoVsync = 1,
|
|
307
|
+
CanvasGPUPresentModeFifo = 2,
|
|
308
|
+
CanvasGPUPresentModeFifoRelaxed = 3,
|
|
309
|
+
CanvasGPUPresentModeImmediate = 4,
|
|
310
|
+
CanvasGPUPresentModeMailbox = 5,
|
|
311
|
+
} CanvasGPUPresentMode;
|
|
312
|
+
|
|
313
|
+
typedef enum CanvasGPUSurfaceAlphaMode {
|
|
314
|
+
CanvasGPUSurfaceAlphaModeAuto = 0,
|
|
315
|
+
CanvasGPUSurfaceAlphaModeOpaque = 1,
|
|
316
|
+
CanvasGPUSurfaceAlphaModePreMultiplied = 2,
|
|
317
|
+
CanvasGPUSurfaceAlphaModePostMultiplied = 3,
|
|
318
|
+
CanvasGPUSurfaceAlphaModeInherit = 4,
|
|
319
|
+
} CanvasGPUSurfaceAlphaMode;
|
|
320
|
+
|
|
321
|
+
typedef enum CanvasIndexFormat {
|
|
322
|
+
/**
|
|
323
|
+
* Indices are 16 bit unsigned integers.
|
|
324
|
+
*/
|
|
325
|
+
CanvasIndexFormatUint16 = 0,
|
|
326
|
+
/**
|
|
327
|
+
* Indices are 32 bit unsigned integers.
|
|
328
|
+
*/
|
|
329
|
+
CanvasIndexFormatUint32 = 1,
|
|
330
|
+
} CanvasIndexFormat;
|
|
331
|
+
|
|
332
|
+
typedef enum CanvasLoadOp {
|
|
333
|
+
CanvasLoadOpClear = 0,
|
|
334
|
+
CanvasLoadOpLoad = 1,
|
|
335
|
+
} CanvasLoadOp;
|
|
336
|
+
|
|
337
|
+
typedef enum CanvasOptionalTextureViewDimension {
|
|
338
|
+
CanvasOptionalTextureViewDimensionNone,
|
|
339
|
+
CanvasOptionalTextureViewDimensionD1,
|
|
340
|
+
CanvasOptionalTextureViewDimensionD2,
|
|
341
|
+
CanvasOptionalTextureViewDimensionD2Array,
|
|
342
|
+
CanvasOptionalTextureViewDimensionCube,
|
|
343
|
+
CanvasOptionalTextureViewDimensionCubeArray,
|
|
344
|
+
CanvasOptionalTextureViewDimensionD3,
|
|
345
|
+
} CanvasOptionalTextureViewDimension;
|
|
346
|
+
|
|
347
|
+
typedef enum CanvasPrimitiveTopology {
|
|
348
|
+
CanvasPrimitiveTopologyPointList = 0,
|
|
349
|
+
CanvasPrimitiveTopologyLineList = 1,
|
|
350
|
+
CanvasPrimitiveTopologyLineStrip = 2,
|
|
351
|
+
CanvasPrimitiveTopologyTriangleList = 3,
|
|
352
|
+
CanvasPrimitiveTopologyTriangleStrip = 4,
|
|
353
|
+
} CanvasPrimitiveTopology;
|
|
354
|
+
|
|
355
|
+
typedef enum CanvasQueryType {
|
|
356
|
+
CanvasQueryTypeOcclusion,
|
|
357
|
+
CanvasQueryTypeTimestamp,
|
|
358
|
+
} CanvasQueryType;
|
|
359
|
+
|
|
360
|
+
typedef enum CanvasSamplerBindingType {
|
|
361
|
+
/**
|
|
362
|
+
* The sampling result is produced based on more than a single color sample from a texture,
|
|
363
|
+
* e.g. when bilinear interpolation is enabled.
|
|
364
|
+
*/
|
|
365
|
+
CanvasSamplerBindingTypeFiltering,
|
|
366
|
+
/**
|
|
367
|
+
* The sampling result is produced based on a single color sample from a texture.
|
|
368
|
+
*/
|
|
369
|
+
CanvasSamplerBindingTypeNonFiltering,
|
|
370
|
+
/**
|
|
371
|
+
* Use as a comparison sampler instead of a normal sampler.
|
|
372
|
+
* For more info take a look at the analogous functionality in OpenGL: <https://www.khronos.org/opengl/wiki/Sampler_Object#Comparison_mode>.
|
|
373
|
+
*/
|
|
374
|
+
CanvasSamplerBindingTypeComparison,
|
|
375
|
+
} CanvasSamplerBindingType;
|
|
376
|
+
|
|
377
|
+
typedef enum CanvasStencilOperation {
|
|
378
|
+
CanvasStencilOperationKeep = 0,
|
|
379
|
+
CanvasStencilOperationZero = 1,
|
|
380
|
+
CanvasStencilOperationReplace = 2,
|
|
381
|
+
CanvasStencilOperationInvert = 3,
|
|
382
|
+
CanvasStencilOperationIncrementClamp = 4,
|
|
383
|
+
CanvasStencilOperationDecrementClamp = 5,
|
|
384
|
+
CanvasStencilOperationIncrementWrap = 6,
|
|
385
|
+
CanvasStencilOperationDecrementWrap = 7,
|
|
386
|
+
} CanvasStencilOperation;
|
|
387
|
+
|
|
388
|
+
typedef enum CanvasStorageTextureAccess {
|
|
389
|
+
/**
|
|
390
|
+
* The texture can only be written in the shader and it:
|
|
391
|
+
* - may or may not be annotated with `write` (WGSL).
|
|
392
|
+
* - must be annotated with `writeonly` (GLSL).
|
|
393
|
+
*
|
|
394
|
+
* Example WGSL syntax:
|
|
395
|
+
* ```rust,ignore
|
|
396
|
+
* @group(0) @binding(0)
|
|
397
|
+
* var my_storage_image: texture_storage_2d<f32, write>;
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* Example GLSL syntax:
|
|
401
|
+
* ```cpp,ignore
|
|
402
|
+
* layout(set=0, binding=0, r32f) writeonly uniform image2D myStorageImage;
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
CanvasStorageTextureAccessWriteOnly,
|
|
406
|
+
/**
|
|
407
|
+
* The texture can only be read in the shader and it must be annotated with `read` (WGSL) or
|
|
408
|
+
* `readonly` (GLSL).
|
|
409
|
+
*
|
|
410
|
+
* [`Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES`] must be enabled to use this access
|
|
411
|
+
* mode. This is a native-only extension.
|
|
412
|
+
*
|
|
413
|
+
* Example WGSL syntax:
|
|
414
|
+
* ```rust,ignore
|
|
415
|
+
* @group(0) @binding(0)
|
|
416
|
+
* var my_storage_image: texture_storage_2d<f32, read>;
|
|
417
|
+
* ```
|
|
418
|
+
*
|
|
419
|
+
* Example GLSL syntax:
|
|
420
|
+
* ```cpp,ignore
|
|
421
|
+
* layout(set=0, binding=0, r32f) readonly uniform image2D myStorageImage;
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
CanvasStorageTextureAccessReadOnly,
|
|
425
|
+
/**
|
|
426
|
+
* The texture can be both read and written in the shader and must be annotated with
|
|
427
|
+
* `read_write` in WGSL.
|
|
428
|
+
*
|
|
429
|
+
* [`Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES`] must be enabled to use this access
|
|
430
|
+
* mode. This is a nonstandard, native-only extension.
|
|
431
|
+
*
|
|
432
|
+
* Example WGSL syntax:
|
|
433
|
+
* ```rust,ignore
|
|
434
|
+
* @group(0) @binding(0)
|
|
435
|
+
* var my_storage_image: texture_storage_2d<f32, read_write>;
|
|
436
|
+
* ```
|
|
437
|
+
*
|
|
438
|
+
* Example GLSL syntax:
|
|
439
|
+
* ```cpp,ignore
|
|
440
|
+
* layout(set=0, binding=0, r32f) uniform image2D myStorageImage;
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
CanvasStorageTextureAccessReadWrite,
|
|
444
|
+
} CanvasStorageTextureAccess;
|
|
445
|
+
|
|
446
|
+
typedef enum CanvasStoreOp {
|
|
447
|
+
CanvasStoreOpDiscard = 0,
|
|
448
|
+
CanvasStoreOpStore = 1,
|
|
449
|
+
} CanvasStoreOp;
|
|
450
|
+
|
|
451
|
+
typedef enum CanvasTextureAspect {
|
|
452
|
+
/**
|
|
453
|
+
* Depth, Stencil, and Color.
|
|
454
|
+
*/
|
|
455
|
+
CanvasTextureAspectAll,
|
|
456
|
+
/**
|
|
457
|
+
* Stencil.
|
|
458
|
+
*/
|
|
459
|
+
CanvasTextureAspectStencilOnly,
|
|
460
|
+
/**
|
|
461
|
+
* Depth.
|
|
462
|
+
*/
|
|
463
|
+
CanvasTextureAspectDepthOnly,
|
|
464
|
+
/**
|
|
465
|
+
* Plane 0.
|
|
466
|
+
*/
|
|
467
|
+
CanvasTextureAspectPlane0,
|
|
468
|
+
/**
|
|
469
|
+
* Plane 1.
|
|
470
|
+
*/
|
|
471
|
+
CanvasTextureAspectPlane1,
|
|
472
|
+
/**
|
|
473
|
+
* Plane 2.
|
|
474
|
+
*/
|
|
475
|
+
CanvasTextureAspectPlane2,
|
|
476
|
+
} CanvasTextureAspect;
|
|
477
|
+
|
|
478
|
+
typedef enum CanvasTextureDimension {
|
|
479
|
+
CanvasTextureDimensionD1,
|
|
480
|
+
CanvasTextureDimensionD2,
|
|
481
|
+
CanvasTextureDimensionD3,
|
|
482
|
+
} CanvasTextureDimension;
|
|
483
|
+
|
|
484
|
+
typedef enum CanvasTextureSampleType {
|
|
485
|
+
CanvasTextureSampleTypeFloat,
|
|
486
|
+
CanvasTextureSampleTypeUnfilterableFloat,
|
|
487
|
+
CanvasTextureSampleTypeDepth,
|
|
488
|
+
CanvasTextureSampleTypeSint,
|
|
489
|
+
CanvasTextureSampleTypeUint,
|
|
490
|
+
} CanvasTextureSampleType;
|
|
491
|
+
|
|
492
|
+
typedef enum CanvasTextureViewDimension {
|
|
493
|
+
CanvasTextureViewDimensionD1,
|
|
494
|
+
CanvasTextureViewDimensionD2,
|
|
495
|
+
CanvasTextureViewDimensionD2Array,
|
|
496
|
+
CanvasTextureViewDimensionCube,
|
|
497
|
+
CanvasTextureViewDimensionCubeArray,
|
|
498
|
+
CanvasTextureViewDimensionD3,
|
|
499
|
+
} CanvasTextureViewDimension;
|
|
500
|
+
|
|
501
|
+
typedef enum CanvasVertexFormat {
|
|
502
|
+
CanvasVertexFormatUint8x2 = 0,
|
|
503
|
+
CanvasVertexFormatUint8x4 = 1,
|
|
504
|
+
CanvasVertexFormatSint8x2 = 2,
|
|
505
|
+
CanvasVertexFormatSint8x4 = 3,
|
|
506
|
+
CanvasVertexFormatUnorm8x2 = 4,
|
|
507
|
+
CanvasVertexFormatUnorm8x4 = 5,
|
|
508
|
+
CanvasVertexFormatSnorm8x2 = 6,
|
|
509
|
+
CanvasVertexFormatSnorm8x4 = 7,
|
|
510
|
+
CanvasVertexFormatUint16x2 = 8,
|
|
511
|
+
CanvasVertexFormatUint16x4 = 9,
|
|
512
|
+
CanvasVertexFormatSint16x2 = 10,
|
|
513
|
+
CanvasVertexFormatSint16x4 = 11,
|
|
514
|
+
CanvasVertexFormatUnorm16x2 = 12,
|
|
515
|
+
CanvasVertexFormatUnorm16x4 = 13,
|
|
516
|
+
CanvasVertexFormatSnorm16x2 = 14,
|
|
517
|
+
CanvasVertexFormatSnorm16x4 = 15,
|
|
518
|
+
CanvasVertexFormatFloat16x2 = 16,
|
|
519
|
+
CanvasVertexFormatFloat16x4 = 17,
|
|
520
|
+
CanvasVertexFormatFloat32 = 18,
|
|
521
|
+
CanvasVertexFormatFloat32x2 = 19,
|
|
522
|
+
CanvasVertexFormatFloat32x3 = 20,
|
|
523
|
+
CanvasVertexFormatFloat32x4 = 21,
|
|
524
|
+
CanvasVertexFormatUint32 = 22,
|
|
525
|
+
CanvasVertexFormatUint32x2 = 23,
|
|
526
|
+
CanvasVertexFormatUint32x3 = 24,
|
|
527
|
+
CanvasVertexFormatUint32x4 = 25,
|
|
528
|
+
CanvasVertexFormatSint32 = 26,
|
|
529
|
+
CanvasVertexFormatSint32x2 = 27,
|
|
530
|
+
CanvasVertexFormatSint32x3 = 28,
|
|
531
|
+
CanvasVertexFormatSint32x4 = 29,
|
|
532
|
+
CanvasVertexFormatFloat64 = 30,
|
|
533
|
+
CanvasVertexFormatFloat64x2 = 31,
|
|
534
|
+
CanvasVertexFormatFloat64x3 = 32,
|
|
535
|
+
CanvasVertexFormatFloat64x4 = 33,
|
|
536
|
+
CanvasVertexFormatUnorm10_10_10_2 = 34,
|
|
537
|
+
} CanvasVertexFormat;
|
|
538
|
+
|
|
539
|
+
typedef enum CanvasVertexStepMode {
|
|
540
|
+
CanvasVertexStepModeVertex = 0,
|
|
541
|
+
CanvasVertexStepModeInstance = 1,
|
|
542
|
+
} CanvasVertexStepMode;
|
|
543
|
+
|
|
11
544
|
typedef enum GLConstants {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
545
|
+
GLConstantsUnPackFlipYWebGL = 37440,
|
|
546
|
+
GLConstantsUnpackPremultiplyAlphaWebGL = 37441,
|
|
547
|
+
GLConstantsUnpackColorSpaceConversionWebGL = 37443,
|
|
15
548
|
} GLConstants;
|
|
16
549
|
|
|
550
|
+
typedef enum GPUMapMode {
|
|
551
|
+
GPUMapModeRead,
|
|
552
|
+
GPUMapModeWrite,
|
|
553
|
+
} GPUMapMode;
|
|
554
|
+
|
|
17
555
|
typedef enum ImageBitmapColorSpaceConversion {
|
|
18
556
|
ImageBitmapColorSpaceConversionDefault,
|
|
19
557
|
ImageBitmapColorSpaceConversionNone,
|
|
@@ -22,7 +560,7 @@ typedef enum ImageBitmapColorSpaceConversion {
|
|
|
22
560
|
typedef enum ImageBitmapPremultiplyAlpha {
|
|
23
561
|
ImageBitmapPremultiplyAlphaDefault,
|
|
24
562
|
ImageBitmapPremultiplyAlphaPremultiply,
|
|
25
|
-
|
|
563
|
+
ImageBitmapPremultiplyAlphaAlphaNone,
|
|
26
564
|
} ImageBitmapPremultiplyAlpha;
|
|
27
565
|
|
|
28
566
|
typedef enum ImageBitmapResizeQuality {
|
|
@@ -46,41 +584,41 @@ typedef enum PaintStyleType {
|
|
|
46
584
|
} PaintStyleType;
|
|
47
585
|
|
|
48
586
|
typedef enum TextBaseLine {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
587
|
+
TextBaseLineTOP = 0,
|
|
588
|
+
TextBaseLineHANGING = 1,
|
|
589
|
+
TextBaseLineMIDDLE = 2,
|
|
590
|
+
TextBaseLineALPHABETIC = 3,
|
|
591
|
+
TextBaseLineIDEOGRAPHIC = 4,
|
|
592
|
+
TextBaseLineBOTTOM = 5,
|
|
55
593
|
} TextBaseLine;
|
|
56
594
|
|
|
57
595
|
typedef enum WebGLExtensionType {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
596
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_blend_minmax,
|
|
597
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_color_buffer_half_float,
|
|
598
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_disjoint_timer_query,
|
|
599
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_sRGB,
|
|
600
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_shader_texture_lod,
|
|
601
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_texture_filter_anisotropic,
|
|
602
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_element_index_uint,
|
|
603
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_standard_derivatives,
|
|
604
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_float,
|
|
605
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_float_linear,
|
|
606
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_half_float,
|
|
607
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_half_float_linear,
|
|
608
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_vertex_array_object,
|
|
609
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_color_buffer_float,
|
|
610
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_atc,
|
|
611
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_etc1,
|
|
612
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_s3tc,
|
|
613
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_s3tc_srgb,
|
|
614
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_etc,
|
|
615
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_pvrtc,
|
|
616
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_lose_context,
|
|
617
|
+
WebGLExtensionTypeWebGLExtensionTypeANGLE_instanced_arrays,
|
|
618
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_depth_texture,
|
|
619
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_draw_buffers,
|
|
620
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_fbo_render_mipmap,
|
|
621
|
+
WebGLExtensionTypeWebGLExtensionTypeNone,
|
|
84
622
|
} WebGLExtensionType;
|
|
85
623
|
|
|
86
624
|
typedef enum WebGLResultType {
|
|
@@ -100,8 +638,60 @@ typedef struct ANGLE_instanced_arrays ANGLE_instanced_arrays;
|
|
|
100
638
|
|
|
101
639
|
typedef struct CCow CCow;
|
|
102
640
|
|
|
641
|
+
typedef struct CanvasConstants CanvasConstants;
|
|
642
|
+
|
|
643
|
+
typedef struct CanvasGPUAdapter CanvasGPUAdapter;
|
|
644
|
+
|
|
645
|
+
typedef struct CanvasGPUAdapterInfo CanvasGPUAdapterInfo;
|
|
646
|
+
|
|
647
|
+
typedef struct CanvasGPUBindGroup CanvasGPUBindGroup;
|
|
648
|
+
|
|
649
|
+
typedef struct CanvasGPUBindGroupLayout CanvasGPUBindGroupLayout;
|
|
650
|
+
|
|
651
|
+
typedef struct CanvasGPUBuffer CanvasGPUBuffer;
|
|
652
|
+
|
|
653
|
+
typedef struct CanvasGPUCanvasContext CanvasGPUCanvasContext;
|
|
654
|
+
|
|
655
|
+
typedef struct CanvasGPUCommandBuffer CanvasGPUCommandBuffer;
|
|
656
|
+
|
|
657
|
+
typedef struct CanvasGPUCommandEncoder CanvasGPUCommandEncoder;
|
|
658
|
+
|
|
659
|
+
typedef struct CanvasGPUComputePassEncoder CanvasGPUComputePassEncoder;
|
|
660
|
+
|
|
661
|
+
typedef struct CanvasGPUComputePipeline CanvasGPUComputePipeline;
|
|
662
|
+
|
|
663
|
+
typedef struct CanvasGPUDevice CanvasGPUDevice;
|
|
664
|
+
|
|
665
|
+
typedef struct CanvasGPUError CanvasGPUError;
|
|
666
|
+
|
|
667
|
+
typedef struct CanvasGPUPipelineLayout CanvasGPUPipelineLayout;
|
|
668
|
+
|
|
669
|
+
typedef struct CanvasGPUQuerySet CanvasGPUQuerySet;
|
|
670
|
+
|
|
671
|
+
typedef struct CanvasGPUQueue CanvasGPUQueue;
|
|
672
|
+
|
|
673
|
+
typedef struct CanvasGPURenderBundle CanvasGPURenderBundle;
|
|
674
|
+
|
|
675
|
+
typedef struct CanvasGPURenderBundleEncoder CanvasGPURenderBundleEncoder;
|
|
676
|
+
|
|
677
|
+
typedef struct CanvasGPURenderPassEncoder CanvasGPURenderPassEncoder;
|
|
678
|
+
|
|
679
|
+
typedef struct CanvasGPURenderPipeline CanvasGPURenderPipeline;
|
|
680
|
+
|
|
681
|
+
typedef struct CanvasGPUSampler CanvasGPUSampler;
|
|
682
|
+
|
|
683
|
+
typedef struct CanvasGPUShaderModule CanvasGPUShaderModule;
|
|
684
|
+
|
|
685
|
+
typedef struct CanvasGPUTexture CanvasGPUTexture;
|
|
686
|
+
|
|
687
|
+
typedef struct CanvasGPUTextureView CanvasGPUTextureView;
|
|
688
|
+
|
|
689
|
+
typedef struct CanvasRenderPassDepthStencilAttachment CanvasRenderPassDepthStencilAttachment;
|
|
690
|
+
|
|
103
691
|
typedef struct CanvasRenderingContext2D CanvasRenderingContext2D;
|
|
104
692
|
|
|
693
|
+
typedef struct CanvasWebGPUInstance CanvasWebGPUInstance;
|
|
694
|
+
|
|
105
695
|
typedef struct ContextAttributes ContextAttributes;
|
|
106
696
|
|
|
107
697
|
typedef struct EXT_blend_minmax EXT_blend_minmax;
|
|
@@ -172,8 +762,6 @@ typedef struct U32Buffer U32Buffer;
|
|
|
172
762
|
|
|
173
763
|
typedef struct U8Buffer U8Buffer;
|
|
174
764
|
|
|
175
|
-
typedef struct URL URL;
|
|
176
|
-
|
|
177
765
|
typedef struct WEBGL_color_buffer_float WEBGL_color_buffer_float;
|
|
178
766
|
|
|
179
767
|
typedef struct WEBGL_compressed_texture_atc WEBGL_compressed_texture_atc;
|
|
@@ -210,6 +798,966 @@ typedef struct WebGLState WebGLState;
|
|
|
210
798
|
|
|
211
799
|
typedef struct WebGLSync WebGLSync;
|
|
212
800
|
|
|
801
|
+
typedef struct CanvasGPURequestAdapterOptions {
|
|
802
|
+
enum CanvasGPUPowerPreference power_preference;
|
|
803
|
+
bool force_fallback_adapter;
|
|
804
|
+
} CanvasGPURequestAdapterOptions;
|
|
805
|
+
|
|
806
|
+
typedef struct CanvasGPUSupportedLimits {
|
|
807
|
+
uint32_t max_texture_dimension_1d;
|
|
808
|
+
uint32_t max_texture_dimension_2d;
|
|
809
|
+
uint32_t max_texture_dimension_3d;
|
|
810
|
+
uint32_t max_texture_array_layers;
|
|
811
|
+
uint32_t max_bind_groups;
|
|
812
|
+
uint32_t max_bindings_per_bind_group;
|
|
813
|
+
uint32_t max_dynamic_uniform_buffers_per_pipeline_layout;
|
|
814
|
+
uint32_t max_dynamic_storage_buffers_per_pipeline_layout;
|
|
815
|
+
uint32_t max_sampled_textures_per_shader_stage;
|
|
816
|
+
uint32_t max_samplers_per_shader_stage;
|
|
817
|
+
uint32_t max_storage_buffers_per_shader_stage;
|
|
818
|
+
uint32_t max_storage_textures_per_shader_stage;
|
|
819
|
+
uint32_t max_uniform_buffers_per_shader_stage;
|
|
820
|
+
uint32_t max_uniform_buffer_binding_size;
|
|
821
|
+
uint32_t max_storage_buffer_binding_size;
|
|
822
|
+
uint32_t max_vertex_buffers;
|
|
823
|
+
uint64_t max_buffer_size;
|
|
824
|
+
uint32_t max_vertex_attributes;
|
|
825
|
+
uint32_t max_vertex_buffer_array_stride;
|
|
826
|
+
uint32_t min_uniform_buffer_offset_alignment;
|
|
827
|
+
uint32_t min_storage_buffer_offset_alignment;
|
|
828
|
+
uint32_t max_inter_stage_shader_components;
|
|
829
|
+
uint32_t max_color_attachments;
|
|
830
|
+
uint32_t max_color_attachment_bytes_per_sample;
|
|
831
|
+
uint32_t max_compute_workgroup_storage_size;
|
|
832
|
+
uint32_t max_compute_invocations_per_workgroup;
|
|
833
|
+
uint32_t max_compute_workgroup_size_x;
|
|
834
|
+
uint32_t max_compute_workgroup_size_y;
|
|
835
|
+
uint32_t max_compute_workgroup_size_z;
|
|
836
|
+
uint32_t max_compute_workgroups_per_dimension;
|
|
837
|
+
uint32_t min_subgroup_size;
|
|
838
|
+
uint32_t max_subgroup_size;
|
|
839
|
+
uint32_t max_push_constant_size;
|
|
840
|
+
uint32_t max_non_sampler_bindings;
|
|
841
|
+
} CanvasGPUSupportedLimits;
|
|
842
|
+
|
|
843
|
+
typedef struct CanvasColor {
|
|
844
|
+
double r;
|
|
845
|
+
double g;
|
|
846
|
+
double b;
|
|
847
|
+
double a;
|
|
848
|
+
} CanvasColor;
|
|
849
|
+
#define CanvasColor_TRANSPARENT (CanvasColor){ .r = 0.0, .g = 0.0, .b = 0.0, .a = 0.0 }
|
|
850
|
+
#define CanvasColor_BLACK (CanvasColor){ .r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0 }
|
|
851
|
+
#define CanvasColor_WHITE (CanvasColor){ .r = 1.0, .g = 1.0, .b = 1.0, .a = 1.0 }
|
|
852
|
+
#define CanvasColor_RED (CanvasColor){ .r = 1.0, .g = 0.0, .b = 0.0, .a = 1.0 }
|
|
853
|
+
#define CanvasColor_GREEN (CanvasColor){ .r = 0.0, .g = 1.0, .b = 0.0, .a = 1.0 }
|
|
854
|
+
#define CanvasColor_BLUE (CanvasColor){ .r = 0.0, .g = 0.0, .b = 1.0, .a = 1.0 }
|
|
855
|
+
|
|
856
|
+
typedef struct CanvasPassChannelColor {
|
|
857
|
+
enum CanvasLoadOp load_op;
|
|
858
|
+
enum CanvasStoreOp store_op;
|
|
859
|
+
struct CanvasColor clear_value;
|
|
860
|
+
bool read_only;
|
|
861
|
+
} CanvasPassChannelColor;
|
|
862
|
+
|
|
863
|
+
typedef struct CanvasRenderPassColorAttachment {
|
|
864
|
+
const struct CanvasGPUTextureView *view;
|
|
865
|
+
const struct CanvasGPUTextureView *resolve_target;
|
|
866
|
+
struct CanvasPassChannelColor channel;
|
|
867
|
+
} CanvasRenderPassColorAttachment;
|
|
868
|
+
|
|
869
|
+
typedef struct CanvasImageCopyBuffer {
|
|
870
|
+
const struct CanvasGPUBuffer *buffer;
|
|
871
|
+
uint64_t offset;
|
|
872
|
+
int32_t bytes_per_row;
|
|
873
|
+
int32_t rows_per_image;
|
|
874
|
+
} CanvasImageCopyBuffer;
|
|
875
|
+
|
|
876
|
+
typedef struct CanvasOrigin3d {
|
|
877
|
+
/**
|
|
878
|
+
* X position of the origin
|
|
879
|
+
*/
|
|
880
|
+
uint32_t x;
|
|
881
|
+
/**
|
|
882
|
+
* Y position of the origin
|
|
883
|
+
*/
|
|
884
|
+
uint32_t y;
|
|
885
|
+
/**
|
|
886
|
+
* Z position of the origin
|
|
887
|
+
*/
|
|
888
|
+
uint32_t z;
|
|
889
|
+
} CanvasOrigin3d;
|
|
890
|
+
|
|
891
|
+
typedef struct CanvasImageCopyTexture {
|
|
892
|
+
const struct CanvasGPUTexture *texture;
|
|
893
|
+
uint32_t mip_level;
|
|
894
|
+
struct CanvasOrigin3d origin;
|
|
895
|
+
enum CanvasTextureAspect aspect;
|
|
896
|
+
} CanvasImageCopyTexture;
|
|
897
|
+
|
|
898
|
+
typedef struct CanvasExtent3d {
|
|
899
|
+
/**
|
|
900
|
+
* Width of the extent
|
|
901
|
+
*/
|
|
902
|
+
uint32_t width;
|
|
903
|
+
/**
|
|
904
|
+
* Height of the extent
|
|
905
|
+
*/
|
|
906
|
+
uint32_t height;
|
|
907
|
+
/**
|
|
908
|
+
* The depth of the extent or the number of array layers
|
|
909
|
+
*/
|
|
910
|
+
uint32_t depth_or_array_layers;
|
|
911
|
+
} CanvasExtent3d;
|
|
912
|
+
|
|
913
|
+
typedef struct CanvasBufferBindingLayout {
|
|
914
|
+
enum CanvasBufferBindingType type_;
|
|
915
|
+
bool has_dynamic_offset;
|
|
916
|
+
int64_t min_binding_size;
|
|
917
|
+
} CanvasBufferBindingLayout;
|
|
918
|
+
|
|
919
|
+
typedef struct CanvasSamplerBindingLayout {
|
|
920
|
+
enum CanvasSamplerBindingType type_;
|
|
921
|
+
} CanvasSamplerBindingLayout;
|
|
922
|
+
|
|
923
|
+
typedef struct CanvasTextureBindingLayout {
|
|
924
|
+
enum CanvasTextureSampleType sample_type;
|
|
925
|
+
enum CanvasTextureViewDimension view_dimension;
|
|
926
|
+
bool multisampled;
|
|
927
|
+
} CanvasTextureBindingLayout;
|
|
928
|
+
|
|
929
|
+
typedef enum CanvasGPUTextureFormat_Tag {
|
|
930
|
+
/**
|
|
931
|
+
* Red channel only. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
932
|
+
*/
|
|
933
|
+
CanvasGPUTextureFormatR8Unorm,
|
|
934
|
+
/**
|
|
935
|
+
* Red channel only. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
936
|
+
*/
|
|
937
|
+
CanvasGPUTextureFormatR8Snorm,
|
|
938
|
+
/**
|
|
939
|
+
* Red channel only. 8 bit integer per channel. Unsigned in shader.
|
|
940
|
+
*/
|
|
941
|
+
CanvasGPUTextureFormatR8Uint,
|
|
942
|
+
/**
|
|
943
|
+
* Red channel only. 8 bit integer per channel. Signed in shader.
|
|
944
|
+
*/
|
|
945
|
+
CanvasGPUTextureFormatR8Sint,
|
|
946
|
+
/**
|
|
947
|
+
* Red channel only. 16 bit integer per channel. Unsigned in shader.
|
|
948
|
+
*/
|
|
949
|
+
CanvasGPUTextureFormatR16Uint,
|
|
950
|
+
/**
|
|
951
|
+
* Red channel only. 16 bit integer per channel. Signed in shader.
|
|
952
|
+
*/
|
|
953
|
+
CanvasGPUTextureFormatR16Sint,
|
|
954
|
+
/**
|
|
955
|
+
* Red channel only. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.
|
|
956
|
+
*
|
|
957
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
958
|
+
*/
|
|
959
|
+
CanvasGPUTextureFormatR16Unorm,
|
|
960
|
+
/**
|
|
961
|
+
* Red channel only. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.
|
|
962
|
+
*
|
|
963
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
964
|
+
*/
|
|
965
|
+
CanvasGPUTextureFormatR16Snorm,
|
|
966
|
+
/**
|
|
967
|
+
* Red channel only. 16 bit float per channel. Float in shader.
|
|
968
|
+
*/
|
|
969
|
+
CanvasGPUTextureFormatR16Float,
|
|
970
|
+
/**
|
|
971
|
+
* Red and green channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
972
|
+
*/
|
|
973
|
+
CanvasGPUTextureFormatRg8Unorm,
|
|
974
|
+
/**
|
|
975
|
+
* Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
976
|
+
*/
|
|
977
|
+
CanvasGPUTextureFormatRg8Snorm,
|
|
978
|
+
/**
|
|
979
|
+
* Red and green channels. 8 bit integer per channel. Unsigned in shader.
|
|
980
|
+
*/
|
|
981
|
+
CanvasGPUTextureFormatRg8Uint,
|
|
982
|
+
/**
|
|
983
|
+
* Red and green channels. 8 bit integer per channel. Signed in shader.
|
|
984
|
+
*/
|
|
985
|
+
CanvasGPUTextureFormatRg8Sint,
|
|
986
|
+
/**
|
|
987
|
+
* Red channel only. 32 bit integer per channel. Unsigned in shader.
|
|
988
|
+
*/
|
|
989
|
+
CanvasGPUTextureFormatR32Uint,
|
|
990
|
+
/**
|
|
991
|
+
* Red channel only. 32 bit integer per channel. Signed in shader.
|
|
992
|
+
*/
|
|
993
|
+
CanvasGPUTextureFormatR32Sint,
|
|
994
|
+
/**
|
|
995
|
+
* Red channel only. 32 bit float per channel. Float in shader.
|
|
996
|
+
*/
|
|
997
|
+
CanvasGPUTextureFormatR32Float,
|
|
998
|
+
/**
|
|
999
|
+
* Red and green channels. 16 bit integer per channel. Unsigned in shader.
|
|
1000
|
+
*/
|
|
1001
|
+
CanvasGPUTextureFormatRg16Uint,
|
|
1002
|
+
/**
|
|
1003
|
+
* Red and green channels. 16 bit integer per channel. Signed in shader.
|
|
1004
|
+
*/
|
|
1005
|
+
CanvasGPUTextureFormatRg16Sint,
|
|
1006
|
+
/**
|
|
1007
|
+
* Red and green channels. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.
|
|
1008
|
+
*
|
|
1009
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
1010
|
+
*/
|
|
1011
|
+
CanvasGPUTextureFormatRg16Unorm,
|
|
1012
|
+
/**
|
|
1013
|
+
* Red and green channels. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.
|
|
1014
|
+
*
|
|
1015
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
1016
|
+
*/
|
|
1017
|
+
CanvasGPUTextureFormatRg16Snorm,
|
|
1018
|
+
/**
|
|
1019
|
+
* Red and green channels. 16 bit float per channel. Float in shader.
|
|
1020
|
+
*/
|
|
1021
|
+
CanvasGPUTextureFormatRg16Float,
|
|
1022
|
+
/**
|
|
1023
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
1024
|
+
*/
|
|
1025
|
+
CanvasGPUTextureFormatRgba8Unorm,
|
|
1026
|
+
/**
|
|
1027
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1028
|
+
*/
|
|
1029
|
+
CanvasGPUTextureFormatRgba8UnormSrgb,
|
|
1030
|
+
/**
|
|
1031
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1032
|
+
*/
|
|
1033
|
+
CanvasGPUTextureFormatRgba8Snorm,
|
|
1034
|
+
/**
|
|
1035
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. Unsigned in shader.
|
|
1036
|
+
*/
|
|
1037
|
+
CanvasGPUTextureFormatRgba8Uint,
|
|
1038
|
+
/**
|
|
1039
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. Signed in shader.
|
|
1040
|
+
*/
|
|
1041
|
+
CanvasGPUTextureFormatRgba8Sint,
|
|
1042
|
+
/**
|
|
1043
|
+
* Blue, green, red, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
1044
|
+
*/
|
|
1045
|
+
CanvasGPUTextureFormatBgra8Unorm,
|
|
1046
|
+
/**
|
|
1047
|
+
* Blue, green, red, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1048
|
+
*/
|
|
1049
|
+
CanvasGPUTextureFormatBgra8UnormSrgb,
|
|
1050
|
+
/**
|
|
1051
|
+
* Packed unsigned float with 9 bits mantisa for each RGB component, then a common 5 bits exponent
|
|
1052
|
+
*/
|
|
1053
|
+
CanvasGPUTextureFormatRgb9e5Ufloat,
|
|
1054
|
+
/**
|
|
1055
|
+
* Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. Unsigned in shader.
|
|
1056
|
+
*/
|
|
1057
|
+
CanvasGPUTextureFormatRgb10a2Uint,
|
|
1058
|
+
/**
|
|
1059
|
+
* Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha) converted to/from float [0, 1] in shader.
|
|
1060
|
+
*/
|
|
1061
|
+
CanvasGPUTextureFormatRgb10a2Unorm,
|
|
1062
|
+
/**
|
|
1063
|
+
* Red, green, and blue channels. 11 bit float with no sign bit for RG channels. 10 bit float with no sign bit for blue channel. Float in shader.
|
|
1064
|
+
*/
|
|
1065
|
+
CanvasGPUTextureFormatRg11b10Float,
|
|
1066
|
+
/**
|
|
1067
|
+
* Red and green channels. 32 bit integer per channel. Unsigned in shader.
|
|
1068
|
+
*/
|
|
1069
|
+
CanvasGPUTextureFormatRg32Uint,
|
|
1070
|
+
/**
|
|
1071
|
+
* Red and green channels. 32 bit integer per channel. Signed in shader.
|
|
1072
|
+
*/
|
|
1073
|
+
CanvasGPUTextureFormatRg32Sint,
|
|
1074
|
+
/**
|
|
1075
|
+
* Red and green channels. 32 bit float per channel. Float in shader.
|
|
1076
|
+
*/
|
|
1077
|
+
CanvasGPUTextureFormatRg32Float,
|
|
1078
|
+
/**
|
|
1079
|
+
* Red, green, blue, and alpha channels. 16 bit integer per channel. Unsigned in shader.
|
|
1080
|
+
*/
|
|
1081
|
+
CanvasGPUTextureFormatRgba16Uint,
|
|
1082
|
+
/**
|
|
1083
|
+
* Red, green, blue, and alpha channels. 16 bit integer per channel. Signed in shader.
|
|
1084
|
+
*/
|
|
1085
|
+
CanvasGPUTextureFormatRgba16Sint,
|
|
1086
|
+
/**
|
|
1087
|
+
* Red, green, blue, and alpha channels. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.
|
|
1088
|
+
*
|
|
1089
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
1090
|
+
*/
|
|
1091
|
+
CanvasGPUTextureFormatRgba16Unorm,
|
|
1092
|
+
/**
|
|
1093
|
+
* Red, green, blue, and alpha. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.
|
|
1094
|
+
*
|
|
1095
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
1096
|
+
*/
|
|
1097
|
+
CanvasGPUTextureFormatRgba16Snorm,
|
|
1098
|
+
/**
|
|
1099
|
+
* Red, green, blue, and alpha channels. 16 bit float per channel. Float in shader.
|
|
1100
|
+
*/
|
|
1101
|
+
CanvasGPUTextureFormatRgba16Float,
|
|
1102
|
+
/**
|
|
1103
|
+
* Red, green, blue, and alpha channels. 32 bit integer per channel. Unsigned in shader.
|
|
1104
|
+
*/
|
|
1105
|
+
CanvasGPUTextureFormatRgba32Uint,
|
|
1106
|
+
/**
|
|
1107
|
+
* Red, green, blue, and alpha channels. 32 bit integer per channel. Signed in shader.
|
|
1108
|
+
*/
|
|
1109
|
+
CanvasGPUTextureFormatRgba32Sint,
|
|
1110
|
+
/**
|
|
1111
|
+
* Red, green, blue, and alpha channels. 32 bit float per channel. Float in shader.
|
|
1112
|
+
*/
|
|
1113
|
+
CanvasGPUTextureFormatRgba32Float,
|
|
1114
|
+
/**
|
|
1115
|
+
* Stencil format with 8 bit integer stencil.
|
|
1116
|
+
*/
|
|
1117
|
+
CanvasGPUTextureFormatStencil8,
|
|
1118
|
+
/**
|
|
1119
|
+
* Special depth format with 16 bit integer depth.
|
|
1120
|
+
*/
|
|
1121
|
+
CanvasGPUTextureFormatDepth16Unorm,
|
|
1122
|
+
/**
|
|
1123
|
+
* Special depth format with at least 24 bit integer depth.
|
|
1124
|
+
*/
|
|
1125
|
+
CanvasGPUTextureFormatDepth24Plus,
|
|
1126
|
+
/**
|
|
1127
|
+
* Special depth/stencil format with at least 24 bit integer depth and 8 bits integer stencil.
|
|
1128
|
+
*/
|
|
1129
|
+
CanvasGPUTextureFormatDepth24PlusStencil8,
|
|
1130
|
+
/**
|
|
1131
|
+
* Special depth format with 32 bit floating point depth.
|
|
1132
|
+
*/
|
|
1133
|
+
CanvasGPUTextureFormatDepth32Float,
|
|
1134
|
+
/**
|
|
1135
|
+
* Special depth/stencil format with 32 bit floating point depth and 8 bits integer stencil.
|
|
1136
|
+
*
|
|
1137
|
+
* [`Features::DEPTH32FLOAT_STENCIL8`] must be enabled to use this texture format.
|
|
1138
|
+
*/
|
|
1139
|
+
CanvasGPUTextureFormatDepth32FloatStencil8,
|
|
1140
|
+
/**
|
|
1141
|
+
* YUV 4:2:0 chroma subsampled format.
|
|
1142
|
+
*
|
|
1143
|
+
* Contains two planes:
|
|
1144
|
+
* - 0: Single 8 bit channel luminance.
|
|
1145
|
+
* - 1: Dual 8 bit channel chrominance at half width and half height.
|
|
1146
|
+
*
|
|
1147
|
+
* Valid view formats for luminance are [`TextureFormat::R8Unorm`].
|
|
1148
|
+
*
|
|
1149
|
+
* Valid view formats for chrominance are [`TextureFormat::Rg8Unorm`].
|
|
1150
|
+
*
|
|
1151
|
+
* Width and height must be even.
|
|
1152
|
+
*
|
|
1153
|
+
* [`Features::TEXTURE_FORMAT_NV12`] must be enabled to use this texture format.
|
|
1154
|
+
*/
|
|
1155
|
+
CanvasGPUTextureFormatNV12,
|
|
1156
|
+
/**
|
|
1157
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha.
|
|
1158
|
+
* [0, 63] ([0, 1] for alpha) converted to/from float [0, 1] in shader.
|
|
1159
|
+
*
|
|
1160
|
+
* Also known as DXT1.
|
|
1161
|
+
*
|
|
1162
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1163
|
+
*/
|
|
1164
|
+
CanvasGPUTextureFormatBc1RgbaUnorm,
|
|
1165
|
+
/**
|
|
1166
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha.
|
|
1167
|
+
* Srgb-color [0, 63] ([0, 1] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1168
|
+
*
|
|
1169
|
+
* Also known as DXT1.
|
|
1170
|
+
*
|
|
1171
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1172
|
+
*/
|
|
1173
|
+
CanvasGPUTextureFormatBc1RgbaUnormSrgb,
|
|
1174
|
+
/**
|
|
1175
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha.
|
|
1176
|
+
* [0, 63] ([0, 15] for alpha) converted to/from float [0, 1] in shader.
|
|
1177
|
+
*
|
|
1178
|
+
* Also known as DXT3.
|
|
1179
|
+
*
|
|
1180
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1181
|
+
*/
|
|
1182
|
+
CanvasGPUTextureFormatBc2RgbaUnorm,
|
|
1183
|
+
/**
|
|
1184
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha.
|
|
1185
|
+
* Srgb-color [0, 63] ([0, 255] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1186
|
+
*
|
|
1187
|
+
* Also known as DXT3.
|
|
1188
|
+
*
|
|
1189
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1190
|
+
*/
|
|
1191
|
+
CanvasGPUTextureFormatBc2RgbaUnormSrgb,
|
|
1192
|
+
/**
|
|
1193
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha.
|
|
1194
|
+
* [0, 63] ([0, 255] for alpha) converted to/from float [0, 1] in shader.
|
|
1195
|
+
*
|
|
1196
|
+
* Also known as DXT5.
|
|
1197
|
+
*
|
|
1198
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1199
|
+
*/
|
|
1200
|
+
CanvasGPUTextureFormatBc3RgbaUnorm,
|
|
1201
|
+
/**
|
|
1202
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha.
|
|
1203
|
+
* Srgb-color [0, 63] ([0, 255] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1204
|
+
*
|
|
1205
|
+
* Also known as DXT5.
|
|
1206
|
+
*
|
|
1207
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1208
|
+
*/
|
|
1209
|
+
CanvasGPUTextureFormatBc3RgbaUnormSrgb,
|
|
1210
|
+
/**
|
|
1211
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R.
|
|
1212
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1213
|
+
*
|
|
1214
|
+
* Also known as RGTC1.
|
|
1215
|
+
*
|
|
1216
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1217
|
+
*/
|
|
1218
|
+
CanvasGPUTextureFormatBc4RUnorm,
|
|
1219
|
+
/**
|
|
1220
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R.
|
|
1221
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1222
|
+
*
|
|
1223
|
+
* Also known as RGTC1.
|
|
1224
|
+
*
|
|
1225
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1226
|
+
*/
|
|
1227
|
+
CanvasGPUTextureFormatBc4RSnorm,
|
|
1228
|
+
/**
|
|
1229
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG.
|
|
1230
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1231
|
+
*
|
|
1232
|
+
* Also known as RGTC2.
|
|
1233
|
+
*
|
|
1234
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1235
|
+
*/
|
|
1236
|
+
CanvasGPUTextureFormatBc5RgUnorm,
|
|
1237
|
+
/**
|
|
1238
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG.
|
|
1239
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1240
|
+
*
|
|
1241
|
+
* Also known as RGTC2.
|
|
1242
|
+
*
|
|
1243
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1244
|
+
*/
|
|
1245
|
+
CanvasGPUTextureFormatBc5RgSnorm,
|
|
1246
|
+
/**
|
|
1247
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit unsigned float RGB. Float in shader.
|
|
1248
|
+
*
|
|
1249
|
+
* Also known as BPTC (float).
|
|
1250
|
+
*
|
|
1251
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1252
|
+
*/
|
|
1253
|
+
CanvasGPUTextureFormatBc6hRgbUfloat,
|
|
1254
|
+
/**
|
|
1255
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit signed float RGB. Float in shader.
|
|
1256
|
+
*
|
|
1257
|
+
* Also known as BPTC (float).
|
|
1258
|
+
*
|
|
1259
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1260
|
+
*/
|
|
1261
|
+
CanvasGPUTextureFormatBc6hRgbFloat,
|
|
1262
|
+
/**
|
|
1263
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA.
|
|
1264
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1265
|
+
*
|
|
1266
|
+
* Also known as BPTC (unorm).
|
|
1267
|
+
*
|
|
1268
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1269
|
+
*/
|
|
1270
|
+
CanvasGPUTextureFormatBc7RgbaUnorm,
|
|
1271
|
+
/**
|
|
1272
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA.
|
|
1273
|
+
* Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1274
|
+
*
|
|
1275
|
+
* Also known as BPTC (unorm).
|
|
1276
|
+
*
|
|
1277
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1278
|
+
*/
|
|
1279
|
+
CanvasGPUTextureFormatBc7RgbaUnormSrgb,
|
|
1280
|
+
/**
|
|
1281
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.
|
|
1282
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1283
|
+
*
|
|
1284
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1285
|
+
*/
|
|
1286
|
+
CanvasGPUTextureFormatEtc2Rgb8Unorm,
|
|
1287
|
+
/**
|
|
1288
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.
|
|
1289
|
+
* Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1290
|
+
*
|
|
1291
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1292
|
+
*/
|
|
1293
|
+
CanvasGPUTextureFormatEtc2Rgb8UnormSrgb,
|
|
1294
|
+
/**
|
|
1295
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.
|
|
1296
|
+
* [0, 255] ([0, 1] for alpha) converted to/from float [0, 1] in shader.
|
|
1297
|
+
*
|
|
1298
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1299
|
+
*/
|
|
1300
|
+
CanvasGPUTextureFormatEtc2Rgb8A1Unorm,
|
|
1301
|
+
/**
|
|
1302
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.
|
|
1303
|
+
* Srgb-color [0, 255] ([0, 1] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1304
|
+
*
|
|
1305
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1306
|
+
*/
|
|
1307
|
+
CanvasGPUTextureFormatEtc2Rgb8A1UnormSrgb,
|
|
1308
|
+
/**
|
|
1309
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.
|
|
1310
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1311
|
+
*
|
|
1312
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1313
|
+
*/
|
|
1314
|
+
CanvasGPUTextureFormatEtc2Rgba8Unorm,
|
|
1315
|
+
/**
|
|
1316
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.
|
|
1317
|
+
* Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1318
|
+
*
|
|
1319
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1320
|
+
*/
|
|
1321
|
+
CanvasGPUTextureFormatEtc2Rgba8UnormSrgb,
|
|
1322
|
+
/**
|
|
1323
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.
|
|
1324
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1325
|
+
*
|
|
1326
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1327
|
+
*/
|
|
1328
|
+
CanvasGPUTextureFormatEacR11Unorm,
|
|
1329
|
+
/**
|
|
1330
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.
|
|
1331
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1332
|
+
*
|
|
1333
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1334
|
+
*/
|
|
1335
|
+
CanvasGPUTextureFormatEacR11Snorm,
|
|
1336
|
+
/**
|
|
1337
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.
|
|
1338
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1339
|
+
*
|
|
1340
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1341
|
+
*/
|
|
1342
|
+
CanvasGPUTextureFormatEacRg11Unorm,
|
|
1343
|
+
/**
|
|
1344
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.
|
|
1345
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1346
|
+
*
|
|
1347
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1348
|
+
*/
|
|
1349
|
+
CanvasGPUTextureFormatEacRg11Snorm,
|
|
1350
|
+
/**
|
|
1351
|
+
* block compressed texture. 16 bytes per block.
|
|
1352
|
+
*
|
|
1353
|
+
* Features [`TEXTURE_COMPRESSION_ASTC`] or [`TEXTURE_COMPRESSION_ASTC_HDR`]
|
|
1354
|
+
* must be enabled to use this texture format.
|
|
1355
|
+
*
|
|
1356
|
+
* [`TEXTURE_COMPRESSION_ASTC`]: Features::TEXTURE_COMPRESSION_ASTC
|
|
1357
|
+
* [`TEXTURE_COMPRESSION_ASTC_HDR`]: Features::TEXTURE_COMPRESSION_ASTC_HDR
|
|
1358
|
+
*/
|
|
1359
|
+
CanvasGPUTextureFormatAstc,
|
|
1360
|
+
} CanvasGPUTextureFormat_Tag;
|
|
1361
|
+
|
|
1362
|
+
typedef struct CanvasGPUTextureFormatAstc_Body {
|
|
1363
|
+
/**
|
|
1364
|
+
* compressed block dimensions
|
|
1365
|
+
*/
|
|
1366
|
+
enum CanvasAstcBlock block;
|
|
1367
|
+
/**
|
|
1368
|
+
* ASTC RGBA channel
|
|
1369
|
+
*/
|
|
1370
|
+
enum CanvasAstcChannel channel;
|
|
1371
|
+
} CanvasGPUTextureFormatAstc_Body;
|
|
1372
|
+
|
|
1373
|
+
typedef struct CanvasGPUTextureFormat {
|
|
1374
|
+
CanvasGPUTextureFormat_Tag tag;
|
|
1375
|
+
union {
|
|
1376
|
+
CanvasGPUTextureFormatAstc_Body astc;
|
|
1377
|
+
};
|
|
1378
|
+
} CanvasGPUTextureFormat;
|
|
1379
|
+
|
|
1380
|
+
typedef struct CanvasStorageTextureBindingLayout {
|
|
1381
|
+
enum CanvasStorageTextureAccess access;
|
|
1382
|
+
struct CanvasGPUTextureFormat format;
|
|
1383
|
+
enum CanvasTextureViewDimension view_dimension;
|
|
1384
|
+
} CanvasStorageTextureBindingLayout;
|
|
1385
|
+
|
|
1386
|
+
typedef enum CanvasBindingType_Tag {
|
|
1387
|
+
CanvasBindingTypeBuffer,
|
|
1388
|
+
CanvasBindingTypeSampler,
|
|
1389
|
+
CanvasBindingTypeTexture,
|
|
1390
|
+
CanvasBindingTypeStorageTexture,
|
|
1391
|
+
} CanvasBindingType_Tag;
|
|
1392
|
+
|
|
1393
|
+
typedef struct CanvasBindingType {
|
|
1394
|
+
CanvasBindingType_Tag tag;
|
|
1395
|
+
union {
|
|
1396
|
+
struct {
|
|
1397
|
+
struct CanvasBufferBindingLayout buffer;
|
|
1398
|
+
};
|
|
1399
|
+
struct {
|
|
1400
|
+
struct CanvasSamplerBindingLayout sampler;
|
|
1401
|
+
};
|
|
1402
|
+
struct {
|
|
1403
|
+
struct CanvasTextureBindingLayout texture;
|
|
1404
|
+
};
|
|
1405
|
+
struct {
|
|
1406
|
+
struct CanvasStorageTextureBindingLayout storage_texture;
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
} CanvasBindingType;
|
|
1410
|
+
|
|
1411
|
+
typedef struct CanvasBindGroupLayoutEntry {
|
|
1412
|
+
uint32_t binding;
|
|
1413
|
+
uint32_t visibility;
|
|
1414
|
+
struct CanvasBindingType binding_type;
|
|
1415
|
+
} CanvasBindGroupLayoutEntry;
|
|
1416
|
+
|
|
1417
|
+
typedef struct CanvasBufferBinding {
|
|
1418
|
+
const struct CanvasGPUBuffer *buffer;
|
|
1419
|
+
int64_t offset;
|
|
1420
|
+
int64_t size;
|
|
1421
|
+
} CanvasBufferBinding;
|
|
1422
|
+
|
|
1423
|
+
typedef enum CanvasBindGroupEntryResource_Tag {
|
|
1424
|
+
CanvasBindGroupEntryResourceBuffer,
|
|
1425
|
+
CanvasBindGroupEntryResourceSampler,
|
|
1426
|
+
CanvasBindGroupEntryResourceTextureView,
|
|
1427
|
+
} CanvasBindGroupEntryResource_Tag;
|
|
1428
|
+
|
|
1429
|
+
typedef struct CanvasBindGroupEntryResource {
|
|
1430
|
+
CanvasBindGroupEntryResource_Tag tag;
|
|
1431
|
+
union {
|
|
1432
|
+
struct {
|
|
1433
|
+
struct CanvasBufferBinding buffer;
|
|
1434
|
+
};
|
|
1435
|
+
struct {
|
|
1436
|
+
const struct CanvasGPUSampler *sampler;
|
|
1437
|
+
};
|
|
1438
|
+
struct {
|
|
1439
|
+
const struct CanvasGPUTextureView *texture_view;
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1442
|
+
} CanvasBindGroupEntryResource;
|
|
1443
|
+
|
|
1444
|
+
typedef struct CanvasBindGroupEntry {
|
|
1445
|
+
uint32_t binding;
|
|
1446
|
+
struct CanvasBindGroupEntryResource resource;
|
|
1447
|
+
} CanvasBindGroupEntry;
|
|
1448
|
+
|
|
1449
|
+
typedef enum CanvasGPUPipelineLayoutOrGPUAutoLayoutMode_Tag {
|
|
1450
|
+
CanvasGPUPipelineLayoutOrGPUAutoLayoutModeLayout,
|
|
1451
|
+
CanvasGPUPipelineLayoutOrGPUAutoLayoutModeAuto,
|
|
1452
|
+
} CanvasGPUPipelineLayoutOrGPUAutoLayoutMode_Tag;
|
|
1453
|
+
|
|
1454
|
+
typedef struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode {
|
|
1455
|
+
CanvasGPUPipelineLayoutOrGPUAutoLayoutMode_Tag tag;
|
|
1456
|
+
union {
|
|
1457
|
+
struct {
|
|
1458
|
+
const struct CanvasGPUPipelineLayout *layout;
|
|
1459
|
+
};
|
|
1460
|
+
struct {
|
|
1461
|
+
enum CanvasGPUAutoLayoutMode auto_;
|
|
1462
|
+
};
|
|
1463
|
+
};
|
|
1464
|
+
} CanvasGPUPipelineLayoutOrGPUAutoLayoutMode;
|
|
1465
|
+
|
|
1466
|
+
typedef struct CanvasProgrammableStage {
|
|
1467
|
+
const struct CanvasGPUShaderModule *module;
|
|
1468
|
+
const char *entry_point;
|
|
1469
|
+
const struct CanvasConstants *constants;
|
|
1470
|
+
} CanvasProgrammableStage;
|
|
1471
|
+
|
|
1472
|
+
typedef enum CanvasOptionalGPUTextureFormat_Tag {
|
|
1473
|
+
CanvasOptionalGPUTextureFormatNone,
|
|
1474
|
+
CanvasOptionalGPUTextureFormatSome,
|
|
1475
|
+
} CanvasOptionalGPUTextureFormat_Tag;
|
|
1476
|
+
|
|
1477
|
+
typedef struct CanvasOptionalGPUTextureFormat {
|
|
1478
|
+
CanvasOptionalGPUTextureFormat_Tag tag;
|
|
1479
|
+
union {
|
|
1480
|
+
struct {
|
|
1481
|
+
struct CanvasGPUTextureFormat some;
|
|
1482
|
+
};
|
|
1483
|
+
};
|
|
1484
|
+
} CanvasOptionalGPUTextureFormat;
|
|
1485
|
+
|
|
1486
|
+
typedef struct CanvasCreateRenderBundleEncoderDescriptor {
|
|
1487
|
+
const char *label;
|
|
1488
|
+
const struct CanvasGPUTextureFormat *color_formats;
|
|
1489
|
+
uintptr_t color_formats_size;
|
|
1490
|
+
struct CanvasOptionalGPUTextureFormat depth_stencil_format;
|
|
1491
|
+
uint32_t sample_count;
|
|
1492
|
+
bool depth_read_only;
|
|
1493
|
+
bool stencil_read_only;
|
|
1494
|
+
} CanvasCreateRenderBundleEncoderDescriptor;
|
|
1495
|
+
|
|
1496
|
+
typedef struct CanvasVertexAttribute {
|
|
1497
|
+
enum CanvasVertexFormat format;
|
|
1498
|
+
uint64_t offset;
|
|
1499
|
+
uint32_t shader_location;
|
|
1500
|
+
} CanvasVertexAttribute;
|
|
1501
|
+
|
|
1502
|
+
typedef struct CanvasVertexBufferLayout {
|
|
1503
|
+
uint64_t array_stride;
|
|
1504
|
+
enum CanvasVertexStepMode step_mode;
|
|
1505
|
+
const struct CanvasVertexAttribute *attributes;
|
|
1506
|
+
uintptr_t attributes_size;
|
|
1507
|
+
} CanvasVertexBufferLayout;
|
|
1508
|
+
|
|
1509
|
+
typedef struct CanvasVertexState {
|
|
1510
|
+
const struct CanvasGPUShaderModule *module;
|
|
1511
|
+
const char *entry_point;
|
|
1512
|
+
const struct CanvasConstants *constants;
|
|
1513
|
+
const struct CanvasVertexBufferLayout *buffers;
|
|
1514
|
+
uintptr_t buffers_size;
|
|
1515
|
+
} CanvasVertexState;
|
|
1516
|
+
|
|
1517
|
+
typedef enum CanvasOptionalIndexFormat_Tag {
|
|
1518
|
+
CanvasOptionalIndexFormatNone,
|
|
1519
|
+
CanvasOptionalIndexFormatSome,
|
|
1520
|
+
} CanvasOptionalIndexFormat_Tag;
|
|
1521
|
+
|
|
1522
|
+
typedef struct CanvasOptionalIndexFormat {
|
|
1523
|
+
CanvasOptionalIndexFormat_Tag tag;
|
|
1524
|
+
union {
|
|
1525
|
+
struct {
|
|
1526
|
+
enum CanvasIndexFormat some;
|
|
1527
|
+
};
|
|
1528
|
+
};
|
|
1529
|
+
} CanvasOptionalIndexFormat;
|
|
1530
|
+
|
|
1531
|
+
typedef struct CanvasPrimitiveState {
|
|
1532
|
+
enum CanvasPrimitiveTopology topology;
|
|
1533
|
+
struct CanvasOptionalIndexFormat strip_index_format;
|
|
1534
|
+
enum CanvasFrontFace front_face;
|
|
1535
|
+
enum CanvasCullMode cull_mode;
|
|
1536
|
+
bool unclipped_depth;
|
|
1537
|
+
} CanvasPrimitiveState;
|
|
1538
|
+
|
|
1539
|
+
typedef struct CanvasStencilFaceState {
|
|
1540
|
+
enum CanvasCompareFunction compare;
|
|
1541
|
+
enum CanvasStencilOperation fail_op;
|
|
1542
|
+
enum CanvasStencilOperation depth_fail_op;
|
|
1543
|
+
enum CanvasStencilOperation pass_op;
|
|
1544
|
+
} CanvasStencilFaceState;
|
|
1545
|
+
/**
|
|
1546
|
+
* Ignore the stencil state for the face.
|
|
1547
|
+
*/
|
|
1548
|
+
#define CanvasStencilFaceState_IGNORE (CanvasStencilFaceState){ .compare = CanvasCompareFunction_Always, .fail_op = CanvasStencilOperation_Keep, .depth_fail_op = CanvasStencilOperation_Keep, .pass_op = CanvasStencilOperation_Keep }
|
|
1549
|
+
|
|
1550
|
+
typedef struct CanvasDepthStencilState {
|
|
1551
|
+
struct CanvasGPUTextureFormat format;
|
|
1552
|
+
bool depth_write_enabled;
|
|
1553
|
+
enum CanvasCompareFunction depth_compare;
|
|
1554
|
+
struct CanvasStencilFaceState stencil_front;
|
|
1555
|
+
struct CanvasStencilFaceState stencil_back;
|
|
1556
|
+
uint32_t stencil_read_mask;
|
|
1557
|
+
uint32_t stencil_write_mask;
|
|
1558
|
+
int32_t depth_bias;
|
|
1559
|
+
float depth_bias_slope_scale;
|
|
1560
|
+
float depth_bias_clamp;
|
|
1561
|
+
} CanvasDepthStencilState;
|
|
1562
|
+
|
|
1563
|
+
typedef struct CanvasMultisampleState {
|
|
1564
|
+
uint32_t count;
|
|
1565
|
+
uint64_t mask;
|
|
1566
|
+
bool alpha_to_coverage_enabled;
|
|
1567
|
+
} CanvasMultisampleState;
|
|
1568
|
+
|
|
1569
|
+
typedef struct CanvasBlendComponent {
|
|
1570
|
+
enum CanvasBlendFactor src_factor;
|
|
1571
|
+
enum CanvasBlendFactor dst_factor;
|
|
1572
|
+
enum CanvasBlendOperation operation;
|
|
1573
|
+
} CanvasBlendComponent;
|
|
1574
|
+
/**
|
|
1575
|
+
* Default blending state that replaces destination with the source.
|
|
1576
|
+
*/
|
|
1577
|
+
#define CanvasBlendComponent_REPLACE (CanvasBlendComponent){ .src_factor = CanvasBlendFactor_One, .dst_factor = CanvasBlendFactor_Zero, .operation = CanvasBlendOperation_Add }
|
|
1578
|
+
/**
|
|
1579
|
+
* Blend state of (1 * src) + ((1 - src_alpha) * dst)
|
|
1580
|
+
*/
|
|
1581
|
+
#define CanvasBlendComponent_OVER (CanvasBlendComponent){ .src_factor = CanvasBlendFactor_One, .dst_factor = CanvasBlendFactor_OneMinusSrcAlpha, .operation = CanvasBlendOperation_Add }
|
|
1582
|
+
|
|
1583
|
+
typedef struct CanvasBlendState {
|
|
1584
|
+
/**
|
|
1585
|
+
* Color equation.
|
|
1586
|
+
*/
|
|
1587
|
+
struct CanvasBlendComponent color;
|
|
1588
|
+
/**
|
|
1589
|
+
* Alpha equation.
|
|
1590
|
+
*/
|
|
1591
|
+
struct CanvasBlendComponent alpha;
|
|
1592
|
+
} CanvasBlendState;
|
|
1593
|
+
/**
|
|
1594
|
+
* Blend mode that does no color blending, just overwrites the output with the contents of the shader.
|
|
1595
|
+
*/
|
|
1596
|
+
#define CanvasBlendState_REPLACE (CanvasBlendState){ .color = CanvasBlendComponent_REPLACE, .alpha = CanvasBlendComponent_REPLACE }
|
|
1597
|
+
/**
|
|
1598
|
+
* Blend mode that does standard alpha blending with non-premultiplied alpha.
|
|
1599
|
+
*/
|
|
1600
|
+
#define CanvasBlendState_ALPHA_BLENDING (CanvasBlendState){ .color = (CanvasBlendComponent){ .src_factor = CanvasBlendFactor_SrcAlpha, .dst_factor = CanvasBlendFactor_OneMinusSrcAlpha, .operation = CanvasBlendOperation_Add }, .alpha = CanvasBlendComponent_OVER }
|
|
1601
|
+
/**
|
|
1602
|
+
* Blend mode that does standard alpha blending with premultiplied alpha.
|
|
1603
|
+
*/
|
|
1604
|
+
#define CanvasBlendState_PREMULTIPLIED_ALPHA_BLENDING (CanvasBlendState){ .color = CanvasBlendComponent_OVER, .alpha = CanvasBlendComponent_OVER }
|
|
1605
|
+
|
|
1606
|
+
typedef enum CanvasOptionalBlendState_Tag {
|
|
1607
|
+
CanvasOptionalBlendStateNone,
|
|
1608
|
+
CanvasOptionalBlendStateSome,
|
|
1609
|
+
} CanvasOptionalBlendState_Tag;
|
|
1610
|
+
|
|
1611
|
+
typedef struct CanvasOptionalBlendState {
|
|
1612
|
+
CanvasOptionalBlendState_Tag tag;
|
|
1613
|
+
union {
|
|
1614
|
+
struct {
|
|
1615
|
+
struct CanvasBlendState some;
|
|
1616
|
+
};
|
|
1617
|
+
};
|
|
1618
|
+
} CanvasOptionalBlendState;
|
|
1619
|
+
|
|
1620
|
+
typedef struct CanvasColorTargetState {
|
|
1621
|
+
struct CanvasGPUTextureFormat format;
|
|
1622
|
+
struct CanvasOptionalBlendState blend;
|
|
1623
|
+
uint32_t write_mask;
|
|
1624
|
+
} CanvasColorTargetState;
|
|
1625
|
+
|
|
1626
|
+
typedef struct CanvasFragmentState {
|
|
1627
|
+
const struct CanvasColorTargetState *targets;
|
|
1628
|
+
uintptr_t targets_size;
|
|
1629
|
+
const struct CanvasGPUShaderModule *module;
|
|
1630
|
+
const char *entry_point;
|
|
1631
|
+
const struct CanvasConstants *constants;
|
|
1632
|
+
} CanvasFragmentState;
|
|
1633
|
+
|
|
1634
|
+
typedef struct CanvasCreateRenderPipelineDescriptor {
|
|
1635
|
+
const char *label;
|
|
1636
|
+
struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode layout;
|
|
1637
|
+
const struct CanvasVertexState *vertex;
|
|
1638
|
+
const struct CanvasPrimitiveState *primitive;
|
|
1639
|
+
const struct CanvasDepthStencilState *depth_stencil;
|
|
1640
|
+
const struct CanvasMultisampleState *multisample;
|
|
1641
|
+
const struct CanvasFragmentState *fragment;
|
|
1642
|
+
} CanvasCreateRenderPipelineDescriptor;
|
|
1643
|
+
|
|
1644
|
+
typedef struct CanvasCreateTextureDescriptor {
|
|
1645
|
+
const char *label;
|
|
1646
|
+
enum CanvasTextureDimension dimension;
|
|
1647
|
+
struct CanvasGPUTextureFormat format;
|
|
1648
|
+
uint32_t mipLevelCount;
|
|
1649
|
+
uint32_t sampleCount;
|
|
1650
|
+
uint32_t width;
|
|
1651
|
+
uint32_t height;
|
|
1652
|
+
uint32_t depthOrArrayLayers;
|
|
1653
|
+
uint32_t usage;
|
|
1654
|
+
const struct CanvasGPUTextureFormat *view_formats;
|
|
1655
|
+
uintptr_t view_formats_size;
|
|
1656
|
+
} CanvasCreateTextureDescriptor;
|
|
1657
|
+
|
|
1658
|
+
typedef enum CanvasOptionalCompareFunction_Tag {
|
|
1659
|
+
CanvasOptionalCompareFunctionNone,
|
|
1660
|
+
CanvasOptionalCompareFunctionSome,
|
|
1661
|
+
} CanvasOptionalCompareFunction_Tag;
|
|
1662
|
+
|
|
1663
|
+
typedef struct CanvasOptionalCompareFunction {
|
|
1664
|
+
CanvasOptionalCompareFunction_Tag tag;
|
|
1665
|
+
union {
|
|
1666
|
+
struct {
|
|
1667
|
+
enum CanvasCompareFunction some;
|
|
1668
|
+
};
|
|
1669
|
+
};
|
|
1670
|
+
} CanvasOptionalCompareFunction;
|
|
1671
|
+
|
|
1672
|
+
typedef struct CanvasCreateSamplerDescriptor {
|
|
1673
|
+
const char *label;
|
|
1674
|
+
enum CanvasAddressMode address_mode_u;
|
|
1675
|
+
enum CanvasAddressMode address_mode_v;
|
|
1676
|
+
enum CanvasAddressMode address_mode_w;
|
|
1677
|
+
enum CanvasFilterMode mag_filter;
|
|
1678
|
+
enum CanvasFilterMode min_filter;
|
|
1679
|
+
enum CanvasFilterMode mipmap_filter;
|
|
1680
|
+
float lod_min_clamp;
|
|
1681
|
+
float lod_max_clamp;
|
|
1682
|
+
struct CanvasOptionalCompareFunction compare;
|
|
1683
|
+
uint16_t max_anisotropy;
|
|
1684
|
+
} CanvasCreateSamplerDescriptor;
|
|
1685
|
+
|
|
1686
|
+
typedef struct CanvasOrigin2d {
|
|
1687
|
+
/**
|
|
1688
|
+
*
|
|
1689
|
+
*/
|
|
1690
|
+
uint32_t x;
|
|
1691
|
+
/**
|
|
1692
|
+
*
|
|
1693
|
+
*/
|
|
1694
|
+
uint32_t y;
|
|
1695
|
+
} CanvasOrigin2d;
|
|
1696
|
+
|
|
1697
|
+
typedef struct CanvasImageCopyExternalImage {
|
|
1698
|
+
/**
|
|
1699
|
+
* The texture to be copied from. The copy source data is captured at the moment
|
|
1700
|
+
* the copy is issued.
|
|
1701
|
+
*/
|
|
1702
|
+
const uint8_t *source;
|
|
1703
|
+
uintptr_t source_size;
|
|
1704
|
+
/**
|
|
1705
|
+
* The base texel used for copying from the external image. Together
|
|
1706
|
+
* with the `copy_size` argument to copy functions, defines the
|
|
1707
|
+
* sub-region of the image to copy.
|
|
1708
|
+
*
|
|
1709
|
+
* Relative to the top left of the image.
|
|
1710
|
+
*
|
|
1711
|
+
* Must be [`Origin2d::ZERO`] if [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`] is not supported.
|
|
1712
|
+
*/
|
|
1713
|
+
struct CanvasOrigin2d origin;
|
|
1714
|
+
/**
|
|
1715
|
+
* If the Y coordinate of the image should be flipped. Even if this is
|
|
1716
|
+
* true, `origin` is still relative to the top left.
|
|
1717
|
+
*/
|
|
1718
|
+
bool flip_y;
|
|
1719
|
+
uint32_t width;
|
|
1720
|
+
uint32_t height;
|
|
1721
|
+
} CanvasImageCopyExternalImage;
|
|
1722
|
+
|
|
1723
|
+
typedef struct CanvasImageDataLayout {
|
|
1724
|
+
uint64_t offset;
|
|
1725
|
+
int32_t bytes_per_row;
|
|
1726
|
+
int32_t rows_per_image;
|
|
1727
|
+
} CanvasImageDataLayout;
|
|
1728
|
+
|
|
1729
|
+
typedef struct CanvasGPUSurfaceConfiguration {
|
|
1730
|
+
enum CanvasGPUSurfaceAlphaMode alphaMode;
|
|
1731
|
+
uint32_t usage;
|
|
1732
|
+
enum CanvasGPUPresentMode presentMode;
|
|
1733
|
+
const struct CanvasGPUTextureFormat *view_formats;
|
|
1734
|
+
uintptr_t view_formats_size;
|
|
1735
|
+
const struct CanvasExtent3d *size;
|
|
1736
|
+
struct CanvasOptionalGPUTextureFormat format;
|
|
1737
|
+
} CanvasGPUSurfaceConfiguration;
|
|
1738
|
+
|
|
1739
|
+
typedef struct CanvasSurfaceCapabilities {
|
|
1740
|
+
const struct StringBuffer *formats;
|
|
1741
|
+
const struct StringBuffer *present_modes;
|
|
1742
|
+
const struct StringBuffer *alpha_modes;
|
|
1743
|
+
uint32_t usages;
|
|
1744
|
+
} CanvasSurfaceCapabilities;
|
|
1745
|
+
|
|
1746
|
+
typedef struct CanvasImageSubresourceRange {
|
|
1747
|
+
enum CanvasTextureAspect aspect;
|
|
1748
|
+
uint32_t base_mip_level;
|
|
1749
|
+
int32_t mip_level_count;
|
|
1750
|
+
uint32_t base_array_layer;
|
|
1751
|
+
int32_t array_layer_count;
|
|
1752
|
+
} CanvasImageSubresourceRange;
|
|
1753
|
+
|
|
1754
|
+
typedef struct CanvasCreateTextureViewDescriptor {
|
|
1755
|
+
const char *label;
|
|
1756
|
+
struct CanvasOptionalGPUTextureFormat format;
|
|
1757
|
+
enum CanvasOptionalTextureViewDimension dimension;
|
|
1758
|
+
const struct CanvasImageSubresourceRange *range;
|
|
1759
|
+
} CanvasCreateTextureViewDescriptor;
|
|
1760
|
+
|
|
213
1761
|
void canvas_native_image_filter_destroy(struct ImageFilter *value);
|
|
214
1762
|
|
|
215
1763
|
void canvas_native_font_add_family(const char *alias,
|
|
@@ -670,6 +2218,29 @@ void canvas_native_context_draw_image_context(struct CanvasRenderingContext2D *c
|
|
|
670
2218
|
float d_width,
|
|
671
2219
|
float d_height);
|
|
672
2220
|
|
|
2221
|
+
void canvas_native_context_draw_image_dx_dy_webgl(struct CanvasRenderingContext2D *context,
|
|
2222
|
+
struct WebGLState *source,
|
|
2223
|
+
float dx,
|
|
2224
|
+
float dy);
|
|
2225
|
+
|
|
2226
|
+
void canvas_native_context_draw_image_dx_dy_dw_dh_webgl(struct CanvasRenderingContext2D *context,
|
|
2227
|
+
struct WebGLState *source,
|
|
2228
|
+
float dx,
|
|
2229
|
+
float dy,
|
|
2230
|
+
float d_width,
|
|
2231
|
+
float d_height);
|
|
2232
|
+
|
|
2233
|
+
void canvas_native_context_draw_image_webgl(struct CanvasRenderingContext2D *context,
|
|
2234
|
+
struct WebGLState *source,
|
|
2235
|
+
float sx,
|
|
2236
|
+
float sy,
|
|
2237
|
+
float s_width,
|
|
2238
|
+
float s_height,
|
|
2239
|
+
float dx,
|
|
2240
|
+
float dy,
|
|
2241
|
+
float d_width,
|
|
2242
|
+
float d_height);
|
|
2243
|
+
|
|
673
2244
|
void canvas_native_context_draw_atlas(struct CanvasRenderingContext2D *context,
|
|
674
2245
|
const uint8_t *data,
|
|
675
2246
|
uintptr_t size,
|
|
@@ -1138,6 +2709,37 @@ float canvas_native_matrix_get_m44(const struct Matrix *matrix);
|
|
|
1138
2709
|
|
|
1139
2710
|
void canvas_native_matrix_set_m44(struct Matrix *matrix, float m44);
|
|
1140
2711
|
|
|
2712
|
+
struct Matrix *canvas_native_matrix_translate(float x, float y, const struct Matrix *matrix);
|
|
2713
|
+
|
|
2714
|
+
void canvas_native_matrix_translate_self(struct Matrix *matrix, float x, float y);
|
|
2715
|
+
|
|
2716
|
+
void canvas_native_matrix_multiply_self(struct Matrix *matrix, const struct Matrix *value);
|
|
2717
|
+
|
|
2718
|
+
void canvas_native_matrix_premultiply_self(struct Matrix *matrix, const struct Matrix *value);
|
|
2719
|
+
|
|
2720
|
+
struct Matrix *canvas_native_matrix_scale_non_uniform(float sx,
|
|
2721
|
+
float sy,
|
|
2722
|
+
const struct Matrix *matrix);
|
|
2723
|
+
|
|
2724
|
+
void canvas_native_matrix_scale_non_uniform_self(struct Matrix *matrix, float sx, float sy);
|
|
2725
|
+
|
|
2726
|
+
struct Matrix *canvas_native_matrix_rotate(float angle,
|
|
2727
|
+
float cx,
|
|
2728
|
+
float cy,
|
|
2729
|
+
const struct Matrix *matrix);
|
|
2730
|
+
|
|
2731
|
+
void canvas_native_matrix_rotate_self(struct Matrix *matrix, float angle, float cx, float cy);
|
|
2732
|
+
|
|
2733
|
+
struct Matrix *canvas_native_matrix_skew_x(float angle, const struct Matrix *matrix);
|
|
2734
|
+
|
|
2735
|
+
void canvas_native_matrix_skew_x_self(struct Matrix *matrix, float angle);
|
|
2736
|
+
|
|
2737
|
+
struct Matrix *canvas_native_matrix_skew_y(float angle, const struct Matrix *matrix);
|
|
2738
|
+
|
|
2739
|
+
void canvas_native_matrix_skew_y_self(struct Matrix *matrix, float angle);
|
|
2740
|
+
|
|
2741
|
+
struct Matrix *canvas_native_matrix_clone(const struct Matrix *matrix);
|
|
2742
|
+
|
|
1141
2743
|
struct ImageData *canvas_native_image_data_create(int32_t width, int32_t height);
|
|
1142
2744
|
|
|
1143
2745
|
int32_t canvas_native_image_data_get_width(const struct ImageData *image_data);
|
|
@@ -1148,6 +2750,8 @@ struct U8Buffer *canvas_native_image_data_get_data(struct ImageData *image_data)
|
|
|
1148
2750
|
|
|
1149
2751
|
struct ImageData *canvas_native_image_data_get_shared_instance(struct ImageData *image_data);
|
|
1150
2752
|
|
|
2753
|
+
int64_t canvas_native_image_asset_get_addr(struct ImageAsset *asset);
|
|
2754
|
+
|
|
1151
2755
|
struct ImageAsset *canvas_native_image_asset_create(void);
|
|
1152
2756
|
|
|
1153
2757
|
struct ImageAsset *canvas_native_image_asset_shared_clone(struct ImageAsset *asset);
|
|
@@ -1172,11 +2776,7 @@ const char *canvas_native_image_asset_get_error(struct ImageAsset *asset);
|
|
|
1172
2776
|
|
|
1173
2777
|
bool canvas_native_image_asset_has_error(struct ImageAsset *asset);
|
|
1174
2778
|
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
bool canvas_native_image_asset_save_path(struct ImageAsset *asset,
|
|
1178
|
-
const char *path,
|
|
1179
|
-
uint32_t format);
|
|
2779
|
+
struct U8Buffer *canvas_native_image_asset_get_data(struct ImageAsset *asset);
|
|
1180
2780
|
|
|
1181
2781
|
float canvas_native_text_metrics_get_width(const struct TextMetrics *metrics);
|
|
1182
2782
|
|
|
@@ -1353,7 +2953,7 @@ bool canvas_native_webgl_context_attribute_get_get_depth(const struct ContextAtt
|
|
|
1353
2953
|
|
|
1354
2954
|
bool canvas_native_webgl_context_attribute_get_get_fail_if_major_performance_caveat(const struct ContextAttributes *attr);
|
|
1355
2955
|
|
|
1356
|
-
|
|
2956
|
+
int32_t canvas_native_webgl_context_attribute_get_get_power_preference(const struct ContextAttributes *attr);
|
|
1357
2957
|
|
|
1358
2958
|
bool canvas_native_webgl_context_attribute_get_get_premultiplied_alpha(const struct ContextAttributes *attr);
|
|
1359
2959
|
|
|
@@ -1475,12 +3075,12 @@ void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t
|
|
|
1475
3075
|
const struct OES_vertex_array_object *object);
|
|
1476
3076
|
|
|
1477
3077
|
struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
|
|
1478
|
-
|
|
3078
|
+
int32_t version,
|
|
1479
3079
|
bool alpha,
|
|
1480
3080
|
bool antialias,
|
|
1481
3081
|
bool depth,
|
|
1482
3082
|
bool fail_if_major_performance_caveat,
|
|
1483
|
-
|
|
3083
|
+
int32_t power_preference,
|
|
1484
3084
|
bool premultiplied_alpha,
|
|
1485
3085
|
bool preserve_drawing_buffer,
|
|
1486
3086
|
bool stencil,
|
|
@@ -1489,12 +3089,12 @@ struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
|
|
|
1489
3089
|
|
|
1490
3090
|
struct WebGLState *canvas_native_webgl_create_no_window(int32_t width,
|
|
1491
3091
|
int32_t height,
|
|
1492
|
-
|
|
3092
|
+
int32_t version,
|
|
1493
3093
|
bool alpha,
|
|
1494
3094
|
bool antialias,
|
|
1495
3095
|
bool depth,
|
|
1496
3096
|
bool fail_if_major_performance_caveat,
|
|
1497
|
-
|
|
3097
|
+
int32_t power_preference,
|
|
1498
3098
|
bool premultiplied_alpha,
|
|
1499
3099
|
bool preserve_drawing_buffer,
|
|
1500
3100
|
bool stencil,
|
|
@@ -1999,9 +3599,9 @@ void canvas_native_webgl_tex_image2d_canvas2d(int32_t target,
|
|
|
1999
3599
|
|
|
2000
3600
|
void canvas_native_webgl_tex_image2d_webgl(int32_t target,
|
|
2001
3601
|
int32_t level,
|
|
2002
|
-
int32_t
|
|
2003
|
-
int32_t
|
|
2004
|
-
int32_t
|
|
3602
|
+
int32_t internalformat,
|
|
3603
|
+
int32_t format,
|
|
3604
|
+
int32_t image_type,
|
|
2005
3605
|
struct WebGLState *webgl,
|
|
2006
3606
|
struct WebGLState *state);
|
|
2007
3607
|
|
|
@@ -2067,8 +3667,8 @@ void canvas_native_webgl_tex_sub_image2d_webgl(uint32_t target,
|
|
|
2067
3667
|
int32_t level,
|
|
2068
3668
|
int32_t xoffset,
|
|
2069
3669
|
int32_t yoffset,
|
|
2070
|
-
uint32_t
|
|
2071
|
-
int32_t
|
|
3670
|
+
uint32_t format,
|
|
3671
|
+
int32_t image_type,
|
|
2072
3672
|
struct WebGLState *webgl,
|
|
2073
3673
|
struct WebGLState *state);
|
|
2074
3674
|
|
|
@@ -2555,6 +4155,18 @@ void canvas_native_webgl2_tex_image3d_asset(uint32_t target,
|
|
|
2555
4155
|
const struct ImageAsset *asset,
|
|
2556
4156
|
struct WebGLState *state);
|
|
2557
4157
|
|
|
4158
|
+
void canvas_native_webgl2_tex_image3d_canvas2d(uint32_t target,
|
|
4159
|
+
int32_t level,
|
|
4160
|
+
int32_t internalformat,
|
|
4161
|
+
int32_t _width,
|
|
4162
|
+
int32_t _height,
|
|
4163
|
+
int32_t depth,
|
|
4164
|
+
int32_t border,
|
|
4165
|
+
uint32_t format,
|
|
4166
|
+
uint32_t type_,
|
|
4167
|
+
struct CanvasRenderingContext2D *canvas,
|
|
4168
|
+
struct WebGLState *state);
|
|
4169
|
+
|
|
2558
4170
|
void canvas_native_webgl2_tex_image3d(uint32_t target,
|
|
2559
4171
|
int32_t level,
|
|
2560
4172
|
int32_t internalformat,
|
|
@@ -2637,6 +4249,19 @@ void canvas_native_webgl2_tex_sub_image3d_asset(uint32_t target,
|
|
|
2637
4249
|
const struct ImageAsset *asset,
|
|
2638
4250
|
struct WebGLState *state);
|
|
2639
4251
|
|
|
4252
|
+
void canvas_native_webgl2_tex_sub_image3d_canvas2d(uint32_t target,
|
|
4253
|
+
int32_t level,
|
|
4254
|
+
int32_t xoffset,
|
|
4255
|
+
int32_t yoffset,
|
|
4256
|
+
int32_t zoffset,
|
|
4257
|
+
int32_t width,
|
|
4258
|
+
int32_t height,
|
|
4259
|
+
int32_t depth,
|
|
4260
|
+
uint32_t format,
|
|
4261
|
+
uint32_t type_,
|
|
4262
|
+
struct CanvasRenderingContext2D *canvas,
|
|
4263
|
+
struct WebGLState *state);
|
|
4264
|
+
|
|
2640
4265
|
void canvas_native_webgl2_tex_sub_image3d_offset(uint32_t target,
|
|
2641
4266
|
int32_t level,
|
|
2642
4267
|
int32_t xoffset,
|
|
@@ -2777,6 +4402,608 @@ void canvas_native_matrix_destroy(struct Matrix *value);
|
|
|
2777
4402
|
|
|
2778
4403
|
void canvas_native_path_destroy(struct Path *value);
|
|
2779
4404
|
|
|
4405
|
+
const struct CanvasWebGPUInstance *canvas_native_webgpu_instance_create(void);
|
|
4406
|
+
|
|
4407
|
+
void canvas_native_webgpu_instance_release(const struct CanvasWebGPUInstance *instance);
|
|
4408
|
+
|
|
4409
|
+
void canvas_native_webgpu_request_adapter(const struct CanvasWebGPUInstance *instance,
|
|
4410
|
+
const struct CanvasGPURequestAdapterOptions *options,
|
|
4411
|
+
void (*callback)(const struct CanvasGPUAdapter*, void*),
|
|
4412
|
+
void *callback_data);
|
|
4413
|
+
|
|
4414
|
+
char *canvas_native_webgpu_adapter_info_vendor(const struct CanvasGPUAdapterInfo *info);
|
|
4415
|
+
|
|
4416
|
+
char *canvas_native_webgpu_adapter_info_architecture(const struct CanvasGPUAdapterInfo *_info);
|
|
4417
|
+
|
|
4418
|
+
char *canvas_native_webgpu_adapter_info_device(const struct CanvasGPUAdapterInfo *info);
|
|
4419
|
+
|
|
4420
|
+
char *canvas_native_webgpu_adapter_info_description(const struct CanvasGPUAdapterInfo *info);
|
|
4421
|
+
|
|
4422
|
+
void canvas_native_webgpu_adapter_info_reference(const struct CanvasGPUAdapterInfo *info);
|
|
4423
|
+
|
|
4424
|
+
void canvas_native_webgpu_adapter_info_release(const struct CanvasGPUAdapterInfo *info);
|
|
4425
|
+
|
|
4426
|
+
void canvas_native_webgpu_adapter_reference(const struct CanvasGPUAdapter *adapter);
|
|
4427
|
+
|
|
4428
|
+
void canvas_native_webgpu_adapter_release(const struct CanvasGPUAdapter *adapter);
|
|
4429
|
+
|
|
4430
|
+
struct StringBuffer *canvas_native_webgpu_adapter_get_features(const struct CanvasGPUAdapter *adapter);
|
|
4431
|
+
|
|
4432
|
+
bool canvas_native_webgpu_adapter_is_fallback_adapter(const struct CanvasGPUAdapter *adapter);
|
|
4433
|
+
|
|
4434
|
+
struct CanvasGPUSupportedLimits *canvas_native_webgpu_adapter_get_limits(const struct CanvasGPUAdapter *adapter);
|
|
4435
|
+
|
|
4436
|
+
const struct CanvasGPUAdapterInfo *canvas_native_webgpu_adapter_request_adapter_info(const struct CanvasGPUAdapter *adapter);
|
|
4437
|
+
|
|
4438
|
+
void canvas_native_webgpu_adapter_request_device(const struct CanvasGPUAdapter *adapter,
|
|
4439
|
+
const char *label,
|
|
4440
|
+
const char *const *required_features,
|
|
4441
|
+
uintptr_t required_features_length,
|
|
4442
|
+
const struct CanvasGPUSupportedLimits *required_limits,
|
|
4443
|
+
void (*callback)(char*,
|
|
4444
|
+
const struct CanvasGPUDevice*,
|
|
4445
|
+
void*),
|
|
4446
|
+
void *callback_data);
|
|
4447
|
+
|
|
4448
|
+
void canvas_native_webgpu_buffer_reference(const struct CanvasGPUBuffer *buffer);
|
|
4449
|
+
|
|
4450
|
+
void canvas_native_webgpu_buffer_release(const struct CanvasGPUBuffer *buffer);
|
|
4451
|
+
|
|
4452
|
+
uint32_t canvas_native_webgpu_buffer_usage(const struct CanvasGPUBuffer *buffer);
|
|
4453
|
+
|
|
4454
|
+
uint64_t canvas_native_webgpu_buffer_size(const struct CanvasGPUBuffer *buffer);
|
|
4455
|
+
|
|
4456
|
+
void *canvas_native_webgpu_buffer_get_mapped_range(const struct CanvasGPUBuffer *buffer,
|
|
4457
|
+
int64_t offset,
|
|
4458
|
+
int64_t size);
|
|
4459
|
+
|
|
4460
|
+
void canvas_native_webgpu_buffer_destroy(const struct CanvasGPUBuffer *buffer);
|
|
4461
|
+
|
|
4462
|
+
void canvas_native_webgpu_buffer_unmap(const struct CanvasGPUBuffer *buffer);
|
|
4463
|
+
|
|
4464
|
+
void canvas_native_webgpu_buffer_map_async(const struct CanvasGPUBuffer *buffer,
|
|
4465
|
+
enum GPUMapMode mode,
|
|
4466
|
+
int64_t offset,
|
|
4467
|
+
int64_t size,
|
|
4468
|
+
void (*callback)(char*, void*),
|
|
4469
|
+
void *callback_data);
|
|
4470
|
+
|
|
4471
|
+
void canvas_native_webgpu_command_encoder_reference(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
4472
|
+
|
|
4473
|
+
void canvas_native_webgpu_command_encoder_release(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
4474
|
+
|
|
4475
|
+
const struct CanvasGPUComputePassEncoder *canvas_native_webgpu_command_encoder_begin_compute_pass(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4476
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
4477
|
+
const char *label,
|
|
4478
|
+
int32_t beginning_of_pass_write_index,
|
|
4479
|
+
int32_t end_of_pass_write_index);
|
|
4480
|
+
|
|
4481
|
+
const struct CanvasGPURenderPassEncoder *canvas_native_webgpu_command_encoder_begin_render_pass(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4482
|
+
const char *label,
|
|
4483
|
+
const struct CanvasRenderPassColorAttachment *color_attachments,
|
|
4484
|
+
uintptr_t color_attachments_size,
|
|
4485
|
+
const struct CanvasRenderPassDepthStencilAttachment *depth_stencil_attachment,
|
|
4486
|
+
const struct CanvasGPUQuerySet *occlusion_query_set,
|
|
4487
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
4488
|
+
int32_t beginning_of_pass_write_index,
|
|
4489
|
+
int32_t end_of_pass_write_index);
|
|
4490
|
+
|
|
4491
|
+
void canvas_native_webgpu_command_encoder_clear_buffer(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4492
|
+
const struct CanvasGPUBuffer *buffer,
|
|
4493
|
+
int64_t offset,
|
|
4494
|
+
int64_t size);
|
|
4495
|
+
|
|
4496
|
+
void canvas_native_webgpu_command_encoder_copy_buffer_to_buffer(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4497
|
+
const struct CanvasGPUBuffer *src,
|
|
4498
|
+
int64_t src_offset,
|
|
4499
|
+
const struct CanvasGPUBuffer *dst,
|
|
4500
|
+
int64_t dst_offset,
|
|
4501
|
+
uint64_t size);
|
|
4502
|
+
|
|
4503
|
+
void canvas_native_webgpu_command_encoder_copy_buffer_to_texture(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4504
|
+
const struct CanvasImageCopyBuffer *src,
|
|
4505
|
+
const struct CanvasImageCopyTexture *dst,
|
|
4506
|
+
const struct CanvasExtent3d *copy_size);
|
|
4507
|
+
|
|
4508
|
+
void canvas_native_webgpu_command_encoder_copy_texture_to_buffer(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4509
|
+
const struct CanvasImageCopyTexture *src,
|
|
4510
|
+
const struct CanvasImageCopyBuffer *dst,
|
|
4511
|
+
const struct CanvasExtent3d *copy_size);
|
|
4512
|
+
|
|
4513
|
+
void canvas_native_webgpu_command_encoder_copy_texture_to_texture(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4514
|
+
const struct CanvasImageCopyTexture *src,
|
|
4515
|
+
const struct CanvasImageCopyTexture *dst,
|
|
4516
|
+
const struct CanvasExtent3d *copy_size);
|
|
4517
|
+
|
|
4518
|
+
const struct CanvasGPUCommandBuffer *canvas_native_webgpu_command_encoder_finish(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4519
|
+
const char *label);
|
|
4520
|
+
|
|
4521
|
+
void canvas_native_webgpu_command_encoder_insert_debug_marker(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4522
|
+
const char *label);
|
|
4523
|
+
|
|
4524
|
+
void canvas_native_webgpu_command_encoder_pop_debug_group(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
4525
|
+
|
|
4526
|
+
void canvas_native_webgpu_command_encoder_push_debug_group(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4527
|
+
const char *label);
|
|
4528
|
+
|
|
4529
|
+
void canvas_native_webgpu_command_encoder_resolve_query_set(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4530
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
4531
|
+
uint32_t first_query,
|
|
4532
|
+
uint32_t query_count,
|
|
4533
|
+
const struct CanvasGPUBuffer *dst,
|
|
4534
|
+
uint64_t dst_offset);
|
|
4535
|
+
|
|
4536
|
+
void canvas_native_webgpu_command_encoder_write_timestamp(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
4537
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
4538
|
+
uint32_t query_index);
|
|
4539
|
+
|
|
4540
|
+
void canvas_native_webgpu_compute_pass_encoder_reference(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
4541
|
+
|
|
4542
|
+
void canvas_native_webgpu_compute_pass_encoder_release(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
4543
|
+
|
|
4544
|
+
void canvas_native_webgpu_compute_pass_encoder_dispatch_workgroups(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
4545
|
+
uint32_t workgroup_count_x,
|
|
4546
|
+
uint32_t workgroup_count_y,
|
|
4547
|
+
uint32_t workgroup_count_z);
|
|
4548
|
+
|
|
4549
|
+
void canvas_native_webgpu_compute_pass_encoder_dispatch_workgroups_indirect(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
4550
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
4551
|
+
uintptr_t indirect_offset);
|
|
4552
|
+
|
|
4553
|
+
void canvas_native_webgpu_compute_pass_encoder_end(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
4554
|
+
|
|
4555
|
+
void canvas_native_webgpu_compute_pass_encoder_insert_debug_marker(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
4556
|
+
const char *label);
|
|
4557
|
+
|
|
4558
|
+
void canvas_native_webgpu_compute_pass_encoder_pop_debug_group(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
4559
|
+
|
|
4560
|
+
void canvas_native_webgpu_compute_pass_encoder_push_debug_group(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
4561
|
+
const char *label);
|
|
4562
|
+
|
|
4563
|
+
void canvas_native_webgpu_compute_pass_encoder_set_bind_group(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
4564
|
+
uint32_t index,
|
|
4565
|
+
const struct CanvasGPUBindGroup *bind_group,
|
|
4566
|
+
const uint32_t *dynamic_offsets,
|
|
4567
|
+
uintptr_t dynamic_offsets_size,
|
|
4568
|
+
uintptr_t dynamic_offsets_start,
|
|
4569
|
+
uintptr_t dynamic_offsets_length);
|
|
4570
|
+
|
|
4571
|
+
void canvas_native_webgpu_compute_pass_encoder_set_pipeline(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
4572
|
+
const struct CanvasGPUComputePipeline *pipeline);
|
|
4573
|
+
|
|
4574
|
+
struct StringBuffer *canvas_native_webgpu_device_get_features(const struct CanvasGPUDevice *device);
|
|
4575
|
+
|
|
4576
|
+
struct CanvasGPUSupportedLimits *canvas_native_webgpu_device_get_limits(const struct CanvasGPUDevice *device);
|
|
4577
|
+
|
|
4578
|
+
const struct CanvasGPUQueue *canvas_native_webgpu_device_get_queue(const struct CanvasGPUDevice *device);
|
|
4579
|
+
|
|
4580
|
+
void canvas_native_webgpu_device_set_lost_callback(const struct CanvasGPUDevice *device,
|
|
4581
|
+
void (*callback)(int32_t, char*, void*),
|
|
4582
|
+
void *userdata);
|
|
4583
|
+
|
|
4584
|
+
void canvas_native_webgpu_device_pop_error_scope(const struct CanvasGPUDevice *device,
|
|
4585
|
+
void (*callback)(enum CanvasGPUErrorType,
|
|
4586
|
+
char*,
|
|
4587
|
+
void*),
|
|
4588
|
+
void *userdata);
|
|
4589
|
+
|
|
4590
|
+
void canvas_native_webgpu_device_push_error_scope(const struct CanvasGPUDevice *device,
|
|
4591
|
+
enum CanvasGPUErrorFilter filter);
|
|
4592
|
+
|
|
4593
|
+
void canvas_native_webgpu_device_set_uncaptured_error_callback(const struct CanvasGPUDevice *device,
|
|
4594
|
+
void (*callback)(enum CanvasGPUErrorType,
|
|
4595
|
+
char*,
|
|
4596
|
+
void*),
|
|
4597
|
+
void *userdata);
|
|
4598
|
+
|
|
4599
|
+
void canvas_native_webgpu_device_destroy(const struct CanvasGPUDevice *device);
|
|
4600
|
+
|
|
4601
|
+
void canvas_native_webgpu_device_reference(const struct CanvasGPUDevice *device);
|
|
4602
|
+
|
|
4603
|
+
void canvas_native_webgpu_device_release(const struct CanvasGPUDevice *device);
|
|
4604
|
+
|
|
4605
|
+
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_device_create_bind_group_layout(const struct CanvasGPUDevice *device,
|
|
4606
|
+
const char *label,
|
|
4607
|
+
const struct CanvasBindGroupLayoutEntry *entries,
|
|
4608
|
+
uintptr_t size);
|
|
4609
|
+
|
|
4610
|
+
const struct CanvasGPUBindGroup *canvas_native_webgpu_device_create_bind_group(const struct CanvasGPUDevice *device,
|
|
4611
|
+
const char *label,
|
|
4612
|
+
const struct CanvasGPUBindGroupLayout *layout,
|
|
4613
|
+
const struct CanvasBindGroupEntry *entries,
|
|
4614
|
+
uintptr_t size);
|
|
4615
|
+
|
|
4616
|
+
const struct CanvasGPUCommandEncoder *canvas_native_webgpu_device_create_command_encoder(const struct CanvasGPUDevice *device,
|
|
4617
|
+
const char *label);
|
|
4618
|
+
|
|
4619
|
+
const struct CanvasGPUComputePipeline *canvas_native_webgpu_device_create_compute_pipeline(const struct CanvasGPUDevice *device,
|
|
4620
|
+
const char *label,
|
|
4621
|
+
struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode layout,
|
|
4622
|
+
const struct CanvasProgrammableStage *compute);
|
|
4623
|
+
|
|
4624
|
+
void canvas_native_webgpu_device_create_compute_pipeline_async(const struct CanvasGPUDevice *device,
|
|
4625
|
+
const char *label,
|
|
4626
|
+
struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode layout,
|
|
4627
|
+
const struct CanvasProgrammableStage *compute,
|
|
4628
|
+
void (*callback)(const struct CanvasGPUComputePipeline*,
|
|
4629
|
+
enum CanvasGPUErrorType,
|
|
4630
|
+
char*,
|
|
4631
|
+
void*),
|
|
4632
|
+
void *callback_data);
|
|
4633
|
+
|
|
4634
|
+
const struct CanvasGPUPipelineLayout *canvas_native_webgpu_device_create_pipeline_layout(const struct CanvasGPUDevice *device,
|
|
4635
|
+
const char *label,
|
|
4636
|
+
const struct CanvasGPUBindGroupLayout *const *group_layouts,
|
|
4637
|
+
uintptr_t size);
|
|
4638
|
+
|
|
4639
|
+
const struct CanvasGPUQuerySet *canvas_native_webgpu_device_create_query_set(const struct CanvasGPUDevice *device,
|
|
4640
|
+
const char *label,
|
|
4641
|
+
enum CanvasQueryType type_,
|
|
4642
|
+
uint32_t count);
|
|
4643
|
+
|
|
4644
|
+
const struct CanvasGPURenderBundleEncoder *canvas_native_webgpu_device_create_render_bundle_encoder(const struct CanvasGPUDevice *device,
|
|
4645
|
+
const struct CanvasCreateRenderBundleEncoderDescriptor *descriptor);
|
|
4646
|
+
|
|
4647
|
+
const struct CanvasGPUShaderModule *canvas_native_webgpu_device_create_shader_module(const struct CanvasGPUDevice *device,
|
|
4648
|
+
const char *label,
|
|
4649
|
+
const char *source);
|
|
4650
|
+
|
|
4651
|
+
const struct CanvasGPUBuffer *canvas_native_webgpu_device_create_buffer(const struct CanvasGPUDevice *device,
|
|
4652
|
+
const char *label,
|
|
4653
|
+
uint64_t size,
|
|
4654
|
+
uint32_t usage,
|
|
4655
|
+
bool mapped_at_creation);
|
|
4656
|
+
|
|
4657
|
+
struct CanvasConstants *canvas_native_webgpu_constants_create(void);
|
|
4658
|
+
|
|
4659
|
+
void canvas_native_webgpu_constants_insert(struct CanvasConstants *constants,
|
|
4660
|
+
const char *key,
|
|
4661
|
+
double value);
|
|
4662
|
+
|
|
4663
|
+
void canvas_native_webgpu_constants_destroy(struct CanvasConstants *constants);
|
|
4664
|
+
|
|
4665
|
+
const struct CanvasGPURenderPipeline *canvas_native_webgpu_device_create_render_pipeline(const struct CanvasGPUDevice *device,
|
|
4666
|
+
const struct CanvasCreateRenderPipelineDescriptor *descriptor);
|
|
4667
|
+
|
|
4668
|
+
void canvas_native_webgpu_device_create_render_pipeline_async(const struct CanvasGPUDevice *device,
|
|
4669
|
+
const struct CanvasCreateRenderPipelineDescriptor *descriptor,
|
|
4670
|
+
void (*callback)(const struct CanvasGPURenderPipeline*,
|
|
4671
|
+
enum CanvasGPUErrorType,
|
|
4672
|
+
char*,
|
|
4673
|
+
void*),
|
|
4674
|
+
void *callback_data);
|
|
4675
|
+
|
|
4676
|
+
const struct CanvasGPUTexture *canvas_native_webgpu_device_create_texture(const struct CanvasGPUDevice *device,
|
|
4677
|
+
const struct CanvasCreateTextureDescriptor *descriptor);
|
|
4678
|
+
|
|
4679
|
+
const struct CanvasGPUSampler *canvas_native_webgpu_device_create_sampler(const struct CanvasGPUDevice *device,
|
|
4680
|
+
const struct CanvasCreateSamplerDescriptor *descriptor);
|
|
4681
|
+
|
|
4682
|
+
char *canvas_native_webgpu_query_set_get_label(const struct CanvasGPUQuerySet *query_set);
|
|
4683
|
+
|
|
4684
|
+
uint32_t canvas_native_webgpu_query_set_get_count(const struct CanvasGPUQuerySet *query_set);
|
|
4685
|
+
|
|
4686
|
+
enum CanvasQueryType canvas_native_webgpu_query_set_get_type(const struct CanvasGPUQuerySet *query_set);
|
|
4687
|
+
|
|
4688
|
+
void canvas_native_webgpu_query_set_destroy(const struct CanvasGPUQuerySet *query_set);
|
|
4689
|
+
|
|
4690
|
+
void canvas_native_webgpu_query_set_reference(const struct CanvasGPUQuerySet *query_set);
|
|
4691
|
+
|
|
4692
|
+
void canvas_native_webgpu_query_set_release(const struct CanvasGPUQuerySet *query_set);
|
|
4693
|
+
|
|
4694
|
+
void canvas_native_webgpu_queue_reference(const struct CanvasGPUQueue *queue);
|
|
4695
|
+
|
|
4696
|
+
void canvas_native_webgpu_queue_release(const struct CanvasGPUQueue *queue);
|
|
4697
|
+
|
|
4698
|
+
void canvas_native_webgpu_queue_copy_external_image_to_texture(const struct CanvasGPUQueue *queue,
|
|
4699
|
+
const struct CanvasImageCopyExternalImage *source,
|
|
4700
|
+
const struct CanvasImageCopyTexture *destination,
|
|
4701
|
+
const struct CanvasExtent3d *size);
|
|
4702
|
+
|
|
4703
|
+
void canvas_native_webgpu_queue_on_submitted_work_done(const struct CanvasGPUQueue *queue,
|
|
4704
|
+
void (*callback)(char*, void*),
|
|
4705
|
+
void *callback_data);
|
|
4706
|
+
|
|
4707
|
+
void canvas_native_webgpu_queue_submit(const struct CanvasGPUQueue *queue,
|
|
4708
|
+
const struct CanvasGPUCommandBuffer *const *command_buffers,
|
|
4709
|
+
uintptr_t command_buffers_size);
|
|
4710
|
+
|
|
4711
|
+
void canvas_native_webgpu_queue_write_buffer(const struct CanvasGPUQueue *queue,
|
|
4712
|
+
const struct CanvasGPUBuffer *buffer,
|
|
4713
|
+
uint64_t buffer_offset,
|
|
4714
|
+
const uint8_t *data,
|
|
4715
|
+
uintptr_t data_size,
|
|
4716
|
+
uintptr_t data_offset,
|
|
4717
|
+
intptr_t size);
|
|
4718
|
+
|
|
4719
|
+
void canvas_native_webgpu_queue_write_texture(const struct CanvasGPUQueue *queue,
|
|
4720
|
+
const struct CanvasImageCopyTexture *destination,
|
|
4721
|
+
const struct CanvasImageDataLayout *data_layout,
|
|
4722
|
+
const struct CanvasExtent3d *size,
|
|
4723
|
+
const uint8_t *buf,
|
|
4724
|
+
uintptr_t buf_size);
|
|
4725
|
+
|
|
4726
|
+
struct CanvasGPUSupportedLimits *canvas_native_webgpu_create_limits(void);
|
|
4727
|
+
|
|
4728
|
+
void canvas_native_webgpu_limits_release(struct CanvasGPUSupportedLimits *limits);
|
|
4729
|
+
|
|
4730
|
+
void canvas_native_webgpu_render_pass_encoder_begin_occlusion_query(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4731
|
+
uint32_t query_index);
|
|
4732
|
+
|
|
4733
|
+
void canvas_native_webgpu_render_pass_encoder_draw(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4734
|
+
uint32_t vertex_count,
|
|
4735
|
+
uint32_t instance_count,
|
|
4736
|
+
uint32_t first_vertex,
|
|
4737
|
+
uint32_t first_instance);
|
|
4738
|
+
|
|
4739
|
+
void canvas_native_webgpu_render_pass_encoder_draw_indexed(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4740
|
+
uint32_t index_count,
|
|
4741
|
+
uint32_t instance_count,
|
|
4742
|
+
uint32_t first_index,
|
|
4743
|
+
int32_t base_vertex,
|
|
4744
|
+
uint32_t first_instance);
|
|
4745
|
+
|
|
4746
|
+
void canvas_native_webgpu_render_pass_encoder_draw_indexed_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4747
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
4748
|
+
uint64_t indirect_offset);
|
|
4749
|
+
|
|
4750
|
+
void canvas_native_webgpu_render_pass_encoder_draw_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4751
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
4752
|
+
uint64_t indirect_offset);
|
|
4753
|
+
|
|
4754
|
+
void canvas_native_webgpu_render_pass_encoder_end(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
4755
|
+
|
|
4756
|
+
void canvas_native_webgpu_render_pass_encoder_end_occlusion_query(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
4757
|
+
|
|
4758
|
+
void canvas_native_webgpu_render_pass_encoder_execute_bundles(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4759
|
+
const struct CanvasGPURenderBundle *const *bundles,
|
|
4760
|
+
uintptr_t bundles_size);
|
|
4761
|
+
|
|
4762
|
+
void canvas_native_webgpu_render_pass_encoder_insert_debug_marker(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4763
|
+
const char *marker_label);
|
|
4764
|
+
|
|
4765
|
+
void canvas_native_webgpu_render_pass_encoder_pop_debug_group(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
4766
|
+
|
|
4767
|
+
void canvas_native_webgpu_render_pass_encoder_push_debug_group(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4768
|
+
const char *group_label);
|
|
4769
|
+
|
|
4770
|
+
void canvas_native_webgpu_render_pass_encoder_set_bind_group(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4771
|
+
uint32_t index,
|
|
4772
|
+
const struct CanvasGPUBindGroup *bind_group,
|
|
4773
|
+
const uint32_t *dynamic_offsets,
|
|
4774
|
+
uintptr_t dynamic_offsets_size,
|
|
4775
|
+
uintptr_t dynamic_offsets_start,
|
|
4776
|
+
uintptr_t dynamic_offsets_length);
|
|
4777
|
+
|
|
4778
|
+
void canvas_native_webgpu_render_pass_encoder_set_blend_constant(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4779
|
+
const struct CanvasColor *color);
|
|
4780
|
+
|
|
4781
|
+
void canvas_native_webgpu_render_pass_encoder_set_index_buffer(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4782
|
+
const struct CanvasGPUBuffer *buffer,
|
|
4783
|
+
enum CanvasIndexFormat index_format,
|
|
4784
|
+
int64_t offset,
|
|
4785
|
+
int64_t size);
|
|
4786
|
+
|
|
4787
|
+
void canvas_native_webgpu_render_pass_encoder_set_pipeline(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4788
|
+
const struct CanvasGPURenderPipeline *pipeline);
|
|
4789
|
+
|
|
4790
|
+
void canvas_native_webgpu_render_pass_encoder_set_scissor_rect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4791
|
+
uint32_t x,
|
|
4792
|
+
uint32_t y,
|
|
4793
|
+
uint32_t width,
|
|
4794
|
+
uint32_t height);
|
|
4795
|
+
|
|
4796
|
+
void canvas_native_webgpu_render_pass_encoder_set_stencil_reference(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4797
|
+
uint32_t reference);
|
|
4798
|
+
|
|
4799
|
+
void canvas_native_webgpu_render_pass_encoder_set_vertex_buffer(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
4800
|
+
uint32_t slot,
|
|
4801
|
+
const struct CanvasGPUBuffer *buffer,
|
|
4802
|
+
int64_t offset,
|
|
4803
|
+
int64_t size);
|
|
4804
|
+
|
|
4805
|
+
void canvas_native_webgpu_render_pass_encoder_set_viewport(const struct CanvasGPURenderPassEncoder *pass,
|
|
4806
|
+
float x,
|
|
4807
|
+
float y,
|
|
4808
|
+
float width,
|
|
4809
|
+
float height,
|
|
4810
|
+
float depth_min,
|
|
4811
|
+
float depth_max);
|
|
4812
|
+
|
|
4813
|
+
void canvas_native_webgpu_render_pass_encoder_reference(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
4814
|
+
|
|
4815
|
+
void canvas_native_webgpu_render_pass_encoder_release(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
4816
|
+
|
|
4817
|
+
void canvas_native_webgpu_shader_module_reference(const struct CanvasGPUShaderModule *shader_module);
|
|
4818
|
+
|
|
4819
|
+
void canvas_native_webgpu_shader_module_release(const struct CanvasGPUShaderModule *shader_module);
|
|
4820
|
+
|
|
4821
|
+
#if defined(TARGET_OS_ANDROID)
|
|
4822
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(struct CanvasWebGPUInstance *instance,
|
|
4823
|
+
void *window,
|
|
4824
|
+
uint32_t width,
|
|
4825
|
+
uint32_t height);
|
|
4826
|
+
#endif
|
|
4827
|
+
|
|
4828
|
+
#if (defined(TARGET_OS_IOS) || defined(TARGET_OS_MACOS))
|
|
4829
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(const struct CanvasWebGPUInstance *instance,
|
|
4830
|
+
void *view,
|
|
4831
|
+
uint32_t width,
|
|
4832
|
+
uint32_t height);
|
|
4833
|
+
#endif
|
|
4834
|
+
|
|
4835
|
+
#if defined(TARGET_OS_IOS)
|
|
4836
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_uiview(const struct CanvasWebGPUInstance *instance,
|
|
4837
|
+
void *view,
|
|
4838
|
+
uint32_t width,
|
|
4839
|
+
uint32_t height);
|
|
4840
|
+
#endif
|
|
4841
|
+
|
|
4842
|
+
#if defined(TARGET_OS_MACOS)
|
|
4843
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_nsview(const struct CanvasWebGPUInstance *instance,
|
|
4844
|
+
void *view,
|
|
4845
|
+
uint32_t width,
|
|
4846
|
+
uint32_t height);
|
|
4847
|
+
#endif
|
|
4848
|
+
|
|
4849
|
+
void canvas_native_webgpu_context_configure(const struct CanvasGPUCanvasContext *context,
|
|
4850
|
+
const struct CanvasGPUDevice *device,
|
|
4851
|
+
const struct CanvasGPUSurfaceConfiguration *config);
|
|
4852
|
+
|
|
4853
|
+
void canvas_native_webgpu_context_unconfigure(const struct CanvasGPUCanvasContext *context,
|
|
4854
|
+
struct CanvasGPUDevice *device,
|
|
4855
|
+
const struct CanvasGPUSurfaceConfiguration *config);
|
|
4856
|
+
|
|
4857
|
+
const struct CanvasGPUTexture *canvas_native_webgpu_context_get_current_texture(const struct CanvasGPUCanvasContext *context);
|
|
4858
|
+
|
|
4859
|
+
void canvas_native_webgpu_context_present_surface(const struct CanvasGPUCanvasContext *context,
|
|
4860
|
+
const struct CanvasGPUTexture *texture);
|
|
4861
|
+
|
|
4862
|
+
struct CanvasSurfaceCapabilities *canvas_native_webgpu_context_get_capabilities(const struct CanvasGPUCanvasContext *context,
|
|
4863
|
+
const struct CanvasGPUAdapter *adapter);
|
|
4864
|
+
|
|
4865
|
+
void canvas_native_webgpu_context_reference(const struct CanvasGPUCanvasContext *context);
|
|
4866
|
+
|
|
4867
|
+
void canvas_native_webgpu_context_release(const struct CanvasGPUCanvasContext *context);
|
|
4868
|
+
|
|
4869
|
+
char *canvas_native_webgpu_enum_gpu_texture_to_string(struct CanvasGPUTextureFormat value);
|
|
4870
|
+
|
|
4871
|
+
struct CanvasOptionalGPUTextureFormat canvas_native_webgpu_enum_string_to_gpu_texture(const char *format);
|
|
4872
|
+
|
|
4873
|
+
void canvas_native_webgpu_texture_reference(const struct CanvasGPUTexture *texture);
|
|
4874
|
+
|
|
4875
|
+
void canvas_native_webgpu_texture_release(const struct CanvasGPUTexture *texture);
|
|
4876
|
+
|
|
4877
|
+
const struct CanvasGPUTextureView *canvas_native_webgpu_texture_create_texture_view(const struct CanvasGPUTexture *texture,
|
|
4878
|
+
const struct CanvasCreateTextureViewDescriptor *descriptor);
|
|
4879
|
+
|
|
4880
|
+
uint32_t canvas_native_webgpu_texture_get_depth_or_array_layers(const struct CanvasGPUTexture *texture);
|
|
4881
|
+
|
|
4882
|
+
uint32_t canvas_native_webgpu_texture_get_width(const struct CanvasGPUTexture *texture);
|
|
4883
|
+
|
|
4884
|
+
uint32_t canvas_native_webgpu_texture_get_height(const struct CanvasGPUTexture *texture);
|
|
4885
|
+
|
|
4886
|
+
enum CanvasTextureDimension canvas_native_webgpu_texture_get_dimension(const struct CanvasGPUTexture *texture);
|
|
4887
|
+
|
|
4888
|
+
struct CanvasGPUTextureFormat canvas_native_webgpu_texture_get_format(const struct CanvasGPUTexture *texture);
|
|
4889
|
+
|
|
4890
|
+
uint32_t canvas_native_webgpu_texture_get_usage(const struct CanvasGPUTexture *texture);
|
|
4891
|
+
|
|
4892
|
+
char *canvas_native_webgpu_texture_get_label(const struct CanvasGPUTexture *_texture);
|
|
4893
|
+
|
|
4894
|
+
uint32_t canvas_native_webgpu_texture_get_mip_level_count(const struct CanvasGPUTexture *texture);
|
|
4895
|
+
|
|
4896
|
+
uint32_t canvas_native_webgpu_texture_get_sample_count(const struct CanvasGPUTexture *texture);
|
|
4897
|
+
|
|
4898
|
+
void canvas_native_webgpu_texture_destroy(const struct CanvasGPUTexture *texture);
|
|
4899
|
+
|
|
4900
|
+
void canvas_native_webgpu_texture_view_reference(const struct CanvasGPUTextureView *texture_view);
|
|
4901
|
+
|
|
4902
|
+
void canvas_native_webgpu_texture_view_release(const struct CanvasGPUTextureView *texture_view);
|
|
4903
|
+
|
|
4904
|
+
void canvas_native_webgpu_bind_group_reference(const struct CanvasGPUBindGroup *bind_group);
|
|
4905
|
+
|
|
4906
|
+
void canvas_native_webgpu_bind_group_release(const struct CanvasGPUBindGroup *bind_group);
|
|
4907
|
+
|
|
4908
|
+
void canvas_native_webgpu_bind_group_layout_reference(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
4909
|
+
|
|
4910
|
+
void canvas_native_webgpu_bind_group_layout_release(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
4911
|
+
|
|
4912
|
+
void canvas_native_webgpu_command_buffer_reference(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
4913
|
+
|
|
4914
|
+
void canvas_native_webgpu_command_buffer_release(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
4915
|
+
|
|
4916
|
+
void canvas_native_webgpu_struct_surface_capabilities_release(struct CanvasSurfaceCapabilities *cap);
|
|
4917
|
+
|
|
4918
|
+
void canvas_native_webgpu_render_bundle_reference(const struct CanvasGPURenderBundle *bundle);
|
|
4919
|
+
|
|
4920
|
+
void canvas_native_webgpu_render_bundle_release(const struct CanvasGPURenderBundle *bundle);
|
|
4921
|
+
|
|
4922
|
+
void canvas_native_webgpu_render_pipeline_reference(const struct CanvasGPURenderPipeline *pipeline);
|
|
4923
|
+
|
|
4924
|
+
void canvas_native_webgpu_render_pipeline_release(const struct CanvasGPURenderPipeline *pipeline);
|
|
4925
|
+
|
|
4926
|
+
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_render_pipeline_get_bind_group_layout(const struct CanvasGPURenderPipeline *pipeline,
|
|
4927
|
+
uint32_t index);
|
|
4928
|
+
|
|
4929
|
+
void canvas_native_webgpu_pipeline_layout_reference(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
4930
|
+
|
|
4931
|
+
void canvas_native_webgpu_pipeline_layout_release(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
4932
|
+
|
|
4933
|
+
enum CanvasGPUErrorType canvas_native_webgpu_error_get_type(const struct CanvasGPUError *error);
|
|
4934
|
+
|
|
4935
|
+
char *canvas_native_webgpu_error_get_message(const struct CanvasGPUError *error);
|
|
4936
|
+
|
|
4937
|
+
void canvas_native_webgpu_compute_pipeline_reference(const struct CanvasGPUComputePipeline *pipeline);
|
|
4938
|
+
|
|
4939
|
+
void canvas_native_webgpu_compute_pipeline_release(const struct CanvasGPUComputePipeline *pipeline);
|
|
4940
|
+
|
|
4941
|
+
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_compute_pipeline_get_bind_group_layout(const struct CanvasGPUComputePipeline *pipeline,
|
|
4942
|
+
uint32_t index);
|
|
4943
|
+
|
|
4944
|
+
void canvas_native_webgpu_sampler_reference(const struct CanvasGPUSampler *sampler);
|
|
4945
|
+
|
|
4946
|
+
void canvas_native_webgpu_sampler_release(const struct CanvasGPUSampler *sampler);
|
|
4947
|
+
|
|
4948
|
+
void canvas_native_webgpu_render_bundle_encoder_draw(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4949
|
+
uint32_t vertex_count,
|
|
4950
|
+
uint32_t instance_count,
|
|
4951
|
+
uint32_t first_vertex,
|
|
4952
|
+
uint32_t first_instance);
|
|
4953
|
+
|
|
4954
|
+
void canvas_native_webgpu_render_bundle_encoder_draw_indexed(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4955
|
+
uint32_t index_count,
|
|
4956
|
+
uint32_t instance_count,
|
|
4957
|
+
uint32_t first_index,
|
|
4958
|
+
int32_t base_vertex,
|
|
4959
|
+
uint32_t first_instance);
|
|
4960
|
+
|
|
4961
|
+
void canvas_native_webgpu_render_bundle_encoder_draw_indexed_indirect(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4962
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
4963
|
+
uint64_t indirect_offset);
|
|
4964
|
+
|
|
4965
|
+
void canvas_native_webgpu_render_bundle_encoder_draw_indirect(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4966
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
4967
|
+
uint64_t indirect_offset);
|
|
4968
|
+
|
|
4969
|
+
void canvas_native_webgpu_render_bundle_encoder_insert_debug_marker(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4970
|
+
const char *label);
|
|
4971
|
+
|
|
4972
|
+
void canvas_native_webgpu_render_bundle_encoder_pop_debug_group(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
4973
|
+
|
|
4974
|
+
void canvas_native_webgpu_render_bundle_encoder_push_debug_group(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4975
|
+
const char *label);
|
|
4976
|
+
|
|
4977
|
+
void canvas_native_webgpu_render_bundle_encoder_set_bind_group(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4978
|
+
uint32_t index,
|
|
4979
|
+
const struct CanvasGPUBindGroup *bind_group,
|
|
4980
|
+
const uint32_t *dynamic_offsets,
|
|
4981
|
+
uintptr_t dynamic_offsets_size,
|
|
4982
|
+
uintptr_t dynamic_offsets_start,
|
|
4983
|
+
uintptr_t dynamic_offsets_length);
|
|
4984
|
+
|
|
4985
|
+
void canvas_native_webgpu_render_bundle_encoder_set_index_buffer(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4986
|
+
const struct CanvasGPUBuffer *buffer,
|
|
4987
|
+
enum CanvasIndexFormat index_format,
|
|
4988
|
+
int64_t offset,
|
|
4989
|
+
int64_t size);
|
|
4990
|
+
|
|
4991
|
+
void canvas_native_webgpu_render_bundle_encoder_set_pipeline(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4992
|
+
const struct CanvasGPURenderPipeline *pipeline);
|
|
4993
|
+
|
|
4994
|
+
void canvas_native_webgpu_render_bundle_encoder_set_vertex_buffer(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
4995
|
+
uint32_t slot,
|
|
4996
|
+
const struct CanvasGPUBuffer *buffer,
|
|
4997
|
+
int64_t offset,
|
|
4998
|
+
int64_t size);
|
|
4999
|
+
|
|
5000
|
+
const struct CanvasGPURenderBundle *canvas_native_webgpu_render_bundle_encoder_finish(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
5001
|
+
const char *label);
|
|
5002
|
+
|
|
5003
|
+
void canvas_native_webgpu_render_bundle_encoder_reference(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
5004
|
+
|
|
5005
|
+
void canvas_native_webgpu_render_bundle_encoder_release(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
5006
|
+
|
|
2780
5007
|
const uint8_t *canvas_native_u8_buffer_get_bytes(const struct U8Buffer *buffer);
|
|
2781
5008
|
|
|
2782
5009
|
uint8_t *canvas_native_u8_buffer_get_bytes_mut(struct U8Buffer *buffer);
|
|
@@ -2833,54 +5060,4 @@ char *canvas_native_string_buffer_get_value_at(const struct StringBuffer *buffer
|
|
|
2833
5060
|
|
|
2834
5061
|
void canvas_native_string_buffer_destroy(struct StringBuffer *buffer);
|
|
2835
5062
|
|
|
2836
|
-
bool canvas_url_can_parse(const char *value, const char *base);
|
|
2837
|
-
|
|
2838
|
-
struct URL *canvas_url_create(const char *value, const char *base);
|
|
2839
|
-
|
|
2840
|
-
void canvas_url_destroy(struct URL *url);
|
|
2841
|
-
|
|
2842
|
-
struct CCow *canvas_url_to_string(struct URL *url);
|
|
2843
|
-
|
|
2844
|
-
const char *canvas_url_hash(struct URL *url);
|
|
2845
|
-
|
|
2846
|
-
void canvas_url_set_hash(struct URL *url, const char *hash);
|
|
2847
|
-
|
|
2848
|
-
const char *canvas_url_host(struct URL *url);
|
|
2849
|
-
|
|
2850
|
-
void canvas_url_set_host(struct URL *url, const char *host);
|
|
2851
|
-
|
|
2852
|
-
const char *canvas_url_host_name(struct URL *url);
|
|
2853
|
-
|
|
2854
|
-
void canvas_url_set_host_name(struct URL *url, const char *hostname);
|
|
2855
|
-
|
|
2856
|
-
const char *canvas_url_href(struct URL *url);
|
|
2857
|
-
|
|
2858
|
-
void canvas_url_set_href(struct URL *url, const char *href);
|
|
2859
|
-
|
|
2860
|
-
const char *canvas_url_origin(struct URL *url);
|
|
2861
|
-
|
|
2862
|
-
const char *canvas_url_password(struct URL *url);
|
|
2863
|
-
|
|
2864
|
-
void canvas_url_set_password(struct URL *url, const char *password);
|
|
2865
|
-
|
|
2866
|
-
const char *canvas_url_pathname(struct URL *url);
|
|
2867
|
-
|
|
2868
|
-
void canvas_url_set_pathname(struct URL *url, const char *pathname);
|
|
2869
|
-
|
|
2870
|
-
const char *canvas_url_port(struct URL *url);
|
|
2871
|
-
|
|
2872
|
-
void canvas_url_set_port(struct URL *url, const char *port);
|
|
2873
|
-
|
|
2874
|
-
const char *canvas_url_protocol(struct URL *url);
|
|
2875
|
-
|
|
2876
|
-
void canvas_url_set_protocol(struct URL *url, const char *protocol);
|
|
2877
|
-
|
|
2878
|
-
const char *canvas_url_search(struct URL *url);
|
|
2879
|
-
|
|
2880
|
-
void canvas_url_set_search(struct URL *url, const char *search);
|
|
2881
|
-
|
|
2882
|
-
const char *canvas_url_username(struct URL *url);
|
|
2883
|
-
|
|
2884
|
-
void canvas_url_set_username(struct URL *url, const char *username);
|
|
2885
|
-
|
|
2886
5063
|
#endif /* CANVAS_C_H */
|