@nativescript/canvas 2.0.0-beta.9 → 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 +4 -5
- package/Canvas/index.ios.js +72 -82
- 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 +86 -32
- 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/Info.plist +5 -5
- 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 +41 -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 +1563 -3729
- 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 -663
- 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 +41 -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 +1563 -3729
- 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 +1563 -3729
- 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 -662
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +638 -641
- 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
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
export class GPURenderBundleEncoder {
|
|
3
|
+
draw(vertexCount, instanceCount = 1, firstVertex = 0, firstInstance = 0) {
|
|
4
|
+
this[native_].draw(vertexCount, instanceCount ?? 1, firstVertex ?? 0, firstInstance ?? 0);
|
|
5
|
+
}
|
|
6
|
+
drawIndexed(indexCount, instanceCount = 1, firstVertex = 0, firstInstance = 0) {
|
|
7
|
+
this[native_].drawIndexed(indexCount, instanceCount ?? 1, firstVertex ?? 0, firstInstance ?? 0);
|
|
8
|
+
}
|
|
9
|
+
drawIndexedIndirect(indirectBuffer, indirectOffset) {
|
|
10
|
+
this[native_].drawIndexedIndirect(indirectBuffer[native_], indirectOffset);
|
|
11
|
+
}
|
|
12
|
+
drawIndirect(indirectBuffer, indirectOffset) {
|
|
13
|
+
this[native_].drawIndirect(indirectBuffer[native_], indirectOffset);
|
|
14
|
+
}
|
|
15
|
+
finish() {
|
|
16
|
+
this[native_].finish();
|
|
17
|
+
}
|
|
18
|
+
insertDebugMarker(markerLabel) {
|
|
19
|
+
this[native_].insertDebugMarker(markerLabel);
|
|
20
|
+
}
|
|
21
|
+
popDebugGroup() {
|
|
22
|
+
this[native_].popDebugGroup();
|
|
23
|
+
}
|
|
24
|
+
pushDebugGroup(groupLabel) {
|
|
25
|
+
this[native_].pushDebugGroup(groupLabel);
|
|
26
|
+
}
|
|
27
|
+
setBindGroup(index, bindGroup, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength) {
|
|
28
|
+
const group = bindGroup?.[native_];
|
|
29
|
+
if (!group) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (Array.isArray(dynamicOffsetsData)) {
|
|
33
|
+
const data = new Uint32Array(dynamicOffsetsData);
|
|
34
|
+
this[native_].setBindGroup(index, group, data, 0, data.length);
|
|
35
|
+
}
|
|
36
|
+
else if (dynamicOffsetsData instanceof Uint32Array) {
|
|
37
|
+
this[native_].setBindGroup(index, group, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this[native_].setBindGroup(index, group);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
setIndexBuffer(buffer, indexFormat, offset, size) {
|
|
44
|
+
this[native_].setIndexBuffer(buffer[native_], indexFormat, offset, size);
|
|
45
|
+
}
|
|
46
|
+
setPipeline(renderPipeline) {
|
|
47
|
+
this[native_].setPipeline(renderPipeline[native_]);
|
|
48
|
+
}
|
|
49
|
+
setVertexBuffer(slot, buffer, offset, size) {
|
|
50
|
+
this[native_].setVertexBuffer(slot, buffer[native_], offset ?? -1, size ?? -1);
|
|
51
|
+
}
|
|
52
|
+
static fromNative(encoder) {
|
|
53
|
+
if (encoder) {
|
|
54
|
+
const ret = new GPURenderBundleEncoder();
|
|
55
|
+
ret[native_] = encoder;
|
|
56
|
+
return ret;
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=GPURenderBundleEncoder.js.map
|
|
@@ -0,0 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AAI,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,OAAO;QACxB,IAAI,OAAO,EAAE;YACZ,MAAM,GAAG,GAAG,IAAI,sBAAsB,EAAE,CAAC;YACzC,GAAG,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;YACvB,OAAO,GAAG,CAAC;SACX;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
import { GPUBindGroup } from './GPUBindGroup';
|
|
3
|
+
import { GPUBuffer } from './GPUBuffer';
|
|
4
|
+
import { GPURenderBundle } from './GPURenderBundle';
|
|
5
|
+
import { GPURenderPipeline } from './GPURenderPipeline';
|
|
6
|
+
import { GPUColor } from './Types';
|
|
7
|
+
export declare class GPURenderPassEncoder {
|
|
8
|
+
[native_]: any;
|
|
9
|
+
beginOcclusionQuery(queryIndex: number): void;
|
|
10
|
+
draw(vertexCount: number, instanceCount?: number, firstVertex?: number, firstInstance?: number): void;
|
|
11
|
+
drawIndexed(indexCount: number, instanceCount?: number, firstVertex?: number, firstInstance?: number): void;
|
|
12
|
+
drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;
|
|
13
|
+
drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: number): void;
|
|
14
|
+
end(): void;
|
|
15
|
+
endOcclusionQuery(): void;
|
|
16
|
+
executeBundles(bundles: GPURenderBundle[]): void;
|
|
17
|
+
insertDebugMarker(markerLabel: string): void;
|
|
18
|
+
popDebugGroup(): void;
|
|
19
|
+
pushDebugGroup(groupLabel: string): void;
|
|
20
|
+
setBindGroup(index: number, bindGroup: GPUBindGroup, dynamicOffsetsData?: number[] | Uint32Array, dynamicOffsetsDataStart?: number, dynamicOffsetsDataLength?: number): void;
|
|
21
|
+
setBlendConstant(color: GPUColor): void;
|
|
22
|
+
setIndexBuffer(buffer: GPUBindGroup, indexFormat: 'uint16' | 'uint32', offset?: number, size?: number): void;
|
|
23
|
+
setPipeline(renderPipeline: GPURenderPipeline): void;
|
|
24
|
+
setScissorRect(x: number, y: number, width: number, height: number): void;
|
|
25
|
+
setStencilReference(reference: number): void;
|
|
26
|
+
setVertexBuffer(slot: number, buffer: GPUBuffer, offset?: number, size?: number): void;
|
|
27
|
+
setViewport(x: any, y: any, width: any, height: any, minDepth: any, maxDepth: any): void;
|
|
28
|
+
static fromNative(pass: any): GPURenderPassEncoder;
|
|
29
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
export class GPURenderPassEncoder {
|
|
3
|
+
beginOcclusionQuery(queryIndex) {
|
|
4
|
+
this[native_].beginOcclusionQuery(queryIndex);
|
|
5
|
+
}
|
|
6
|
+
draw(vertexCount, instanceCount = 1, firstVertex = 0, firstInstance = 0) {
|
|
7
|
+
this[native_].draw(vertexCount, instanceCount ?? 1, firstVertex ?? 0, firstInstance ?? 0);
|
|
8
|
+
}
|
|
9
|
+
drawIndexed(indexCount, instanceCount = 1, firstVertex = 0, firstInstance = 0) {
|
|
10
|
+
this[native_].drawIndexed(indexCount, instanceCount ?? 1, firstVertex ?? 0, firstInstance ?? 0);
|
|
11
|
+
}
|
|
12
|
+
drawIndexedIndirect(indirectBuffer, indirectOffset) {
|
|
13
|
+
this[native_].drawIndexedIndirect(indirectBuffer[native_], indirectOffset);
|
|
14
|
+
}
|
|
15
|
+
drawIndirect(indirectBuffer, indirectOffset) {
|
|
16
|
+
this[native_].drawIndirect(indirectBuffer[native_], indirectOffset);
|
|
17
|
+
}
|
|
18
|
+
end() {
|
|
19
|
+
this[native_].end();
|
|
20
|
+
}
|
|
21
|
+
endOcclusionQuery() {
|
|
22
|
+
this[native_].endOcclusionQuery();
|
|
23
|
+
}
|
|
24
|
+
executeBundles(bundles) {
|
|
25
|
+
if (Array.isArray(bundles)) {
|
|
26
|
+
this[native_].executeBundles(bundles.map((bundle) => bundle[native_]));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
insertDebugMarker(markerLabel) {
|
|
30
|
+
this[native_].insertDebugMarker(markerLabel);
|
|
31
|
+
}
|
|
32
|
+
popDebugGroup() {
|
|
33
|
+
this[native_].popDebugGroup();
|
|
34
|
+
}
|
|
35
|
+
pushDebugGroup(groupLabel) {
|
|
36
|
+
this[native_].pushDebugGroup(groupLabel);
|
|
37
|
+
}
|
|
38
|
+
setBindGroup(index, bindGroup, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength) {
|
|
39
|
+
const group = bindGroup?.[native_];
|
|
40
|
+
if (!group) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (Array.isArray(dynamicOffsetsData)) {
|
|
44
|
+
const data = new Uint32Array(dynamicOffsetsData);
|
|
45
|
+
this[native_].setBindGroup(index, group, data, 0, data.length);
|
|
46
|
+
}
|
|
47
|
+
else if (dynamicOffsetsData instanceof Uint32Array) {
|
|
48
|
+
this[native_].setBindGroup(index, group, dynamicOffsetsData, dynamicOffsetsDataStart, dynamicOffsetsDataLength);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this[native_].setBindGroup(index, group);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
setBlendConstant(color) {
|
|
55
|
+
if (Array.isArray(color)) {
|
|
56
|
+
this[native_].setBlendConstant({
|
|
57
|
+
r: color[0],
|
|
58
|
+
g: color[1],
|
|
59
|
+
b: color[2],
|
|
60
|
+
a: color[3],
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
this[native_].setBlendConstant(color);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
setIndexBuffer(buffer, indexFormat, offset, size) {
|
|
68
|
+
this[native_].setIndexBuffer(buffer[native_], indexFormat, offset, size);
|
|
69
|
+
}
|
|
70
|
+
setPipeline(renderPipeline) {
|
|
71
|
+
this[native_].setPipeline(renderPipeline[native_]);
|
|
72
|
+
}
|
|
73
|
+
setScissorRect(x, y, width, height) {
|
|
74
|
+
this[native_].setScissorRect(x, y, width, height);
|
|
75
|
+
}
|
|
76
|
+
setStencilReference(reference) {
|
|
77
|
+
this[native_].setStencilReference(reference);
|
|
78
|
+
}
|
|
79
|
+
setVertexBuffer(slot, buffer, offset, size) {
|
|
80
|
+
this[native_].setVertexBuffer(slot, buffer[native_], offset ?? -1, size ?? -1);
|
|
81
|
+
}
|
|
82
|
+
setViewport(x, y, width, height, minDepth, maxDepth) {
|
|
83
|
+
this[native_].setViewport(x, y, width, height, minDepth, maxDepth);
|
|
84
|
+
}
|
|
85
|
+
static fromNative(pass) {
|
|
86
|
+
if (pass) {
|
|
87
|
+
const ret = new GPURenderPassEncoder();
|
|
88
|
+
ret[native_] = pass;
|
|
89
|
+
return ret;
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=GPURenderPassEncoder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPURenderPassEncoder.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/GPURenderPassEncoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAOtC,MAAM,OAAO,oBAAoB;IAEhC,mBAAmB,CAAC,UAAkB;QACrC,IAAI,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,CAAC,WAAmB,EAAE,gBAAwB,CAAC,EAAE,cAAsB,CAAC,EAAE,gBAAwB,CAAC;QACtG,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,IAAI,CAAC,EAAE,WAAW,IAAI,CAAC,EAAE,aAAa,IAAI,CAAC,CAAC,CAA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|
+
import { GPUBindGroupLayout } from './GPUBindGroupLayout';
|
|
3
|
+
export declare class GPURenderPipeline {
|
|
4
|
+
[native_]: any;
|
|
5
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
6
|
+
static fromNative(pipeline: any): GPURenderPipeline;
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
import { GPUBindGroupLayout } from './GPUBindGroupLayout';
|
|
3
|
+
export class GPURenderPipeline {
|
|
4
|
+
getBindGroupLayout(index) {
|
|
5
|
+
return GPUBindGroupLayout.fromNative(this[native_].getBindGroupLayout(index));
|
|
6
|
+
}
|
|
7
|
+
static fromNative(pipeline) {
|
|
8
|
+
if (pipeline) {
|
|
9
|
+
const ret = new GPURenderPipeline();
|
|
10
|
+
ret[native_] = pipeline;
|
|
11
|
+
return ret;
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=GPURenderPipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPURenderPipeline.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/GPURenderPipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,OAAO,iBAAiB;IAG7B,kBAAkB,CAAC,KAAa;QAC/B,OAAO,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,QAAQ;QACzB,IAAI,QAAQ,EAAE;YACb,MAAM,GAAG,GAAG,IAAI,iBAAiB,EAAE,CAAC;YACpC,GAAG,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC;YACxB,OAAO,GAAG,CAAC;SACX;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
export class GPUSampler {
|
|
3
|
+
static fromNative(sampler) {
|
|
4
|
+
if (sampler) {
|
|
5
|
+
const ret = new GPUSampler();
|
|
6
|
+
ret[native_] = sampler;
|
|
7
|
+
return ret;
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=GPUSampler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPUSampler.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/GPUSampler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,OAAO,UAAU;IAEtB,MAAM,CAAC,UAAU,CAAC,OAAO;QACxB,IAAI,OAAO,EAAE;YACZ,MAAM,GAAG,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,GAAG,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;YACvB,OAAO,GAAG,CAAC;SACX;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
export class GPUShaderModule {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = '';
|
|
5
|
+
}
|
|
6
|
+
static fromNative(module) {
|
|
7
|
+
if (module) {
|
|
8
|
+
const ret = new GPUShaderModule();
|
|
9
|
+
ret[native_] = module;
|
|
10
|
+
return ret;
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=GPUShaderModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPUShaderModule.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/GPUShaderModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,OAAO,eAAe;IAA5B;QACC,UAAK,GAAG,EAAE,CAAC;IAYZ,CAAC;IATA,MAAM,CAAC,UAAU,CAAC,MAAM;QACvB,IAAI,MAAM,EAAE;YACX,MAAM,GAAG,GAAG,IAAI,eAAe,EAAE,CAAC;YAClC,GAAG,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;YACtB,OAAO,GAAG,CAAC;SACX;QAED,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
import { GPUTextureView } from './GPUTextureView';
|
|
3
|
+
import type { GPUTextureViewDescriptor } from './Interfaces';
|
|
4
|
+
export declare class GPUTexture {
|
|
5
|
+
[native_]: any;
|
|
6
|
+
get depthOrArrayLayers(): any;
|
|
7
|
+
get dimension(): any;
|
|
8
|
+
get format(): any;
|
|
9
|
+
get mipLevelCount(): any;
|
|
10
|
+
get sampleCount(): any;
|
|
11
|
+
get width(): any;
|
|
12
|
+
get height(): any;
|
|
13
|
+
get usage(): any;
|
|
14
|
+
static fromNative(texture: any): GPUTexture;
|
|
15
|
+
createView(desc?: GPUTextureViewDescriptor): GPUTextureView;
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
import { GPUTextureView } from './GPUTextureView';
|
|
3
|
+
export class GPUTexture {
|
|
4
|
+
get depthOrArrayLayers() {
|
|
5
|
+
return this[native_].depthOrArrayLayers;
|
|
6
|
+
}
|
|
7
|
+
get dimension() {
|
|
8
|
+
return this[native_].dimension;
|
|
9
|
+
}
|
|
10
|
+
get format() {
|
|
11
|
+
return this[native_].format;
|
|
12
|
+
}
|
|
13
|
+
get mipLevelCount() {
|
|
14
|
+
return this[native_].mipLevelCount;
|
|
15
|
+
}
|
|
16
|
+
get sampleCount() {
|
|
17
|
+
return this[native_].sampleCount;
|
|
18
|
+
}
|
|
19
|
+
get width() {
|
|
20
|
+
return this[native_].width;
|
|
21
|
+
}
|
|
22
|
+
get height() {
|
|
23
|
+
return this[native_].height;
|
|
24
|
+
}
|
|
25
|
+
get usage() {
|
|
26
|
+
return this[native_].usage;
|
|
27
|
+
}
|
|
28
|
+
static fromNative(texture) {
|
|
29
|
+
if (texture) {
|
|
30
|
+
const ret = new GPUTexture();
|
|
31
|
+
ret[native_] = texture;
|
|
32
|
+
return ret;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
createView(desc) {
|
|
37
|
+
const view = this[native_].createView(desc);
|
|
38
|
+
return GPUTextureView.fromNative(view);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=GPUTexture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPUTexture.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/GPUTexture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,MAAM,OAAO,UAAU;IAGtB,IAAI,kBAAkB;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC;IACzC,CAAC;IACD,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;IAChC,CAAC;IACD,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IAC7B,CAAC;IACD,IAAI,aAAa;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC;IACpC,CAAC;IACD,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC;IAClC,CAAC;IACD,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;IAC5B,CAAC;IACD,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IAC7B,CAAC;IACD,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;IAC5B,CAAC;IACD,MAAM,CAAC,UAAU,CAAC,OAAO;QACxB,IAAI,OAAO,EAAE;YACZ,MAAM,GAAG,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,GAAG,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;YACvB,OAAO,GAAG,CAAC;SACX;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,UAAU,CAAC,IAA+B;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CACD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { native_ } from './Constants';
|
|
2
|
+
export class GPUTextureView {
|
|
3
|
+
static fromNative(view) {
|
|
4
|
+
if (view) {
|
|
5
|
+
const ret = new GPUTextureView();
|
|
6
|
+
ret[native_] = view;
|
|
7
|
+
return ret;
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=GPUTextureView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GPUTextureView.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/GPUTextureView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,OAAO,cAAc;IAE1B,MAAM,CAAC,UAAU,CAAC,IAAI;QACrB,IAAI,IAAI,EAAE;YACT,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;YACjC,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;YACpB,OAAO,GAAG,CAAC;SACX;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { GPUBuffer } from './GPUBuffer';
|
|
2
|
+
import type { GPUQuerySet } from './GPUQuerySet';
|
|
3
|
+
import type { GPUShaderModule } from './GPUShaderModule';
|
|
4
|
+
import type { GPUTexture } from './GPUTexture';
|
|
5
|
+
import type { GPUTextureView } from './GPUTextureView';
|
|
6
|
+
import type { GPUBlendFactor, GPUBlendOperation, GPUColor, GPUCompareFunction, GPUCullMode, GPUFrontFace, GPUIndexFormat, GPULoadOp, GPUOrigin2D, GPUOrigin3D, GPUPrimitiveTopology, GPUStencilOperation, GPUStoreOp, GPUTextureAspect, GPUTextureFormat, GPUTextureViewDimension, GPUVertexFormat, GPUVertexStepMode } from './Types';
|
|
7
|
+
export interface GPUExternalTextureBindingLayout {
|
|
8
|
+
}
|
|
9
|
+
export interface GPUProgrammableStage {
|
|
10
|
+
constants?: {
|
|
11
|
+
[name: string]: number;
|
|
12
|
+
};
|
|
13
|
+
entryPoint: string | Uint32Array;
|
|
14
|
+
module: GPUShaderModule;
|
|
15
|
+
}
|
|
16
|
+
export interface GPUStencilFaceState {
|
|
17
|
+
compare?: GPUCompareFunction;
|
|
18
|
+
depthFailOp?: GPUStencilOperation;
|
|
19
|
+
failOp?: GPUStencilOperation;
|
|
20
|
+
passOp?: GPUStencilOperation;
|
|
21
|
+
}
|
|
22
|
+
export interface GPUDepthStencilState {
|
|
23
|
+
depthBias?: number;
|
|
24
|
+
depthBiasClamp?: number;
|
|
25
|
+
depthBiasSlopeScale?: number;
|
|
26
|
+
depthCompare?: GPUCompareFunction;
|
|
27
|
+
depthWriteEnabled?: boolean;
|
|
28
|
+
format: GPUTextureFormat;
|
|
29
|
+
stencilBack?: GPUStencilFaceState;
|
|
30
|
+
stencilFront?: GPUStencilFaceState;
|
|
31
|
+
stencilReadMask?: number;
|
|
32
|
+
stencilWriteMask?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface GPUBlendComponent {
|
|
35
|
+
dstFactor?: GPUBlendFactor;
|
|
36
|
+
operation?: GPUBlendOperation;
|
|
37
|
+
srcFactor?: GPUBlendFactor;
|
|
38
|
+
}
|
|
39
|
+
export interface GPUBlendState {
|
|
40
|
+
alpha: GPUBlendComponent;
|
|
41
|
+
color: GPUBlendComponent;
|
|
42
|
+
}
|
|
43
|
+
export interface GPUColorTargetState {
|
|
44
|
+
blend?: GPUBlendState;
|
|
45
|
+
format: GPUTextureFormat;
|
|
46
|
+
writeMask?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface GPUFragmentState {
|
|
49
|
+
constants?: {
|
|
50
|
+
[name: string]: number;
|
|
51
|
+
};
|
|
52
|
+
entryPoint: string | Uint32Array;
|
|
53
|
+
module: GPUShaderModule;
|
|
54
|
+
targets: (null | GPUColorTargetState)[];
|
|
55
|
+
}
|
|
56
|
+
export interface GPUMultisampleState {
|
|
57
|
+
alphaToCoverageEnabled?: boolean;
|
|
58
|
+
count?: number;
|
|
59
|
+
mask?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface GPUPrimitiveState {
|
|
62
|
+
cullMode?: GPUCullMode;
|
|
63
|
+
frontFace?: GPUFrontFace;
|
|
64
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
65
|
+
topology?: GPUPrimitiveTopology;
|
|
66
|
+
unclippedDepth?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface GPUVertexAttribute {
|
|
69
|
+
format: GPUVertexFormat;
|
|
70
|
+
offset: number;
|
|
71
|
+
shaderLocation: number;
|
|
72
|
+
}
|
|
73
|
+
export interface GPUVertexBufferLayout {
|
|
74
|
+
arrayStride: number;
|
|
75
|
+
attributes: GPUVertexAttribute[];
|
|
76
|
+
stepMode?: GPUVertexStepMode;
|
|
77
|
+
}
|
|
78
|
+
export interface GPUVertexState {
|
|
79
|
+
buffers?: GPUVertexBufferLayout[];
|
|
80
|
+
constants?: {
|
|
81
|
+
[name: string]: number;
|
|
82
|
+
};
|
|
83
|
+
entryPoint: string | Uint32Array;
|
|
84
|
+
module: GPUShaderModule;
|
|
85
|
+
}
|
|
86
|
+
export interface GPUColorDict {
|
|
87
|
+
a: number;
|
|
88
|
+
b: number;
|
|
89
|
+
g: number;
|
|
90
|
+
r: number;
|
|
91
|
+
}
|
|
92
|
+
export interface GPURenderPassColorAttachment {
|
|
93
|
+
clearValue?: GPUColor;
|
|
94
|
+
depthSlice?: number;
|
|
95
|
+
loadOp: GPULoadOp;
|
|
96
|
+
resolveTarget?: GPUTextureView;
|
|
97
|
+
storeOp: GPUStoreOp;
|
|
98
|
+
view: GPUTextureView;
|
|
99
|
+
}
|
|
100
|
+
export interface GPURenderPassDepthStencilAttachment {
|
|
101
|
+
depthClearValue?: number;
|
|
102
|
+
depthLoadOp: GPULoadOp;
|
|
103
|
+
depthReadOnly?: boolean;
|
|
104
|
+
depthStoreOp: GPUStoreOp;
|
|
105
|
+
stencilClearValue?: number;
|
|
106
|
+
stencilLoadOp?: GPULoadOp;
|
|
107
|
+
stencilReadOnly?: boolean;
|
|
108
|
+
stencilStoreOp?: GPUStoreOp;
|
|
109
|
+
view: GPUTextureView;
|
|
110
|
+
}
|
|
111
|
+
export interface GPURenderPassTimestampWrites {
|
|
112
|
+
beginningOfPassWriteIndex: number;
|
|
113
|
+
endOfPassWriteIndex: number;
|
|
114
|
+
querySet: GPUQuerySet;
|
|
115
|
+
}
|
|
116
|
+
export interface GPUImageCopyBuffer {
|
|
117
|
+
buffer: GPUBuffer;
|
|
118
|
+
bytesPerRow: number;
|
|
119
|
+
offset?: number;
|
|
120
|
+
rowsPerImage?: number;
|
|
121
|
+
}
|
|
122
|
+
export interface GPUImageCopyTexture {
|
|
123
|
+
aspect?: GPUTextureAspect;
|
|
124
|
+
mipLevel?: number;
|
|
125
|
+
origin?: GPUOrigin3D;
|
|
126
|
+
texture: GPUTexture;
|
|
127
|
+
}
|
|
128
|
+
export interface GPUImageCopyExternalImage {
|
|
129
|
+
flipY?: boolean;
|
|
130
|
+
origin?: GPUOrigin2D;
|
|
131
|
+
source: any;
|
|
132
|
+
}
|
|
133
|
+
export interface GPUImageCopyTextureTagged {
|
|
134
|
+
aspect?: GPUTextureAspect;
|
|
135
|
+
colorSpace?: PredefinedColorSpace;
|
|
136
|
+
mipLevel?: number;
|
|
137
|
+
origin?: GPUOrigin3D;
|
|
138
|
+
premultipliedAlpha?: boolean;
|
|
139
|
+
texture: GPUTexture;
|
|
140
|
+
}
|
|
141
|
+
export interface GPUImageDataLayout {
|
|
142
|
+
bytesPerRow: number;
|
|
143
|
+
offset?: number;
|
|
144
|
+
rowsPerImage?: number;
|
|
145
|
+
}
|
|
146
|
+
export interface GPUTextureViewDescriptor {
|
|
147
|
+
arrayLayerCount?: number;
|
|
148
|
+
aspect?: GPUTextureAspect;
|
|
149
|
+
baseArrayLayer?: number;
|
|
150
|
+
baseMipLevel?: number;
|
|
151
|
+
dimension: GPUTextureViewDimension;
|
|
152
|
+
format?: GPUTextureFormat;
|
|
153
|
+
label?: string;
|
|
154
|
+
mipLevelCount?: number;
|
|
155
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/Interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GPUColorDict } from './Interfaces';
|
|
2
|
+
export declare type GPUOrigin2D = [number, number] | {
|
|
3
|
+
x?: number;
|
|
4
|
+
y?: number;
|
|
5
|
+
};
|
|
6
|
+
export declare type GPUExtent3D = [number, number, number] | [number, number] | {
|
|
7
|
+
depthOrArrayLayers?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export declare type GPUOrigin3D = [number, number, number] | {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
z: number;
|
|
15
|
+
};
|
|
16
|
+
export declare type GPUTextureAspect = 'all' | 'stencil-only' | 'depth-only';
|
|
17
|
+
export declare type GPULoadOp = 'load' | 'clear';
|
|
18
|
+
export declare type GPUStoreOp = 'store' | 'discard';
|
|
19
|
+
export declare type GPUColor = [number, number, number, number] | GPUColorDict;
|
|
20
|
+
export declare type GPUErrorFilter = 'validation' | 'out-of-memory' | 'internal';
|
|
21
|
+
export declare type GPUMipmapFilterMode = 'nearest' | 'linear';
|
|
22
|
+
export declare type GPUFilterMode = 'nearest' | 'linear';
|
|
23
|
+
export declare type GPUAddressMode = 'clamp-to-edge' | 'repeat' | 'mirror-repeat';
|
|
24
|
+
export declare type GPUVertexStepMode = 'vertex' | 'instance';
|
|
25
|
+
export declare type GPUPrimitiveTopology = 'point-list' | 'line-list' | 'line-strip' | 'triangle-list' | 'triangle-strip';
|
|
26
|
+
export declare type GPUIndexFormat = 'uint16' | 'uint32';
|
|
27
|
+
export declare type GPUFrontFace = 'ccw' | 'cw';
|
|
28
|
+
export declare type GPUCullMode = 'none' | 'front' | 'back';
|
|
29
|
+
export declare type GPUBlendOperation = 'add' | 'subtract' | 'reverse-subtract' | 'min' | 'max';
|
|
30
|
+
export declare type GPUBlendFactor = 'zero' | 'one' | 'src' | 'one-minus-src' | 'src-alpha' | 'one-minus-src-alpha' | 'dst' | 'one-minus-dst' | 'dst-alpha' | 'one-minus-dst-alpha' | 'src-alpha-saturated' | 'constant' | 'one-minus-constant';
|
|
31
|
+
export declare type GPUStencilOperation = 'keep' | 'zero' | 'replace' | 'invert' | 'increment-clamp' | 'decrement-clamp' | 'increment-wrap' | 'decrement-wrap';
|
|
32
|
+
export declare type GPUCompareFunction = 'never' | 'less' | 'equal' | 'less-equal' | 'greater' | 'not-equal' | 'greater-equal' | 'always';
|
|
33
|
+
export declare type GPUQueryType = 'occlusion' | 'timestamp';
|
|
34
|
+
export declare type GPUTextureViewDimension = '1d' | '2d' | '2d-array' | 'cube' | 'cube-array' | '3d';
|
|
35
|
+
export declare type GPUTextureSampleType = 'float' | 'unfilterable-float' | 'depth' | 'sint' | 'uint';
|
|
36
|
+
export declare type GPUTextureFormat = 'r8unorm' | 'r8snorm' | 'r8uint' | 'r8sint' | 'r16uint' | 'r16sint' | 'r16float' | 'rg8unorm' | 'rg8snorm' | 'rg8uint' | 'rg8sint' | 'r32uint' | 'r32sint' | 'r32float' | 'rg16uint' | 'rg16sint' | 'rg16float' | 'rgba8unorm' | 'rgba8unorm-srgb' | 'rgba8snorm' | 'rgba8uint' | 'rgba8sint' | 'bgra8unorm' | 'bgra8unorm-srgb' | 'rgb9e5ufloat' | 'rgb10a2uint' | 'rgb10a2unorm' | 'rg11b10ufloat' | 'rg32uint' | 'rg32sint' | 'rg32float' | 'rgba16uint' | 'rgba16sint' | 'rgba16float' | 'rgba32uint' | 'rgba32sint' | 'rgba32float' | 'stencil8' | 'depth16unorm' | 'depth24plus' | 'depth24plus-stencil8' | 'depth32float' | 'depth32float-stencil8' | 'bc1-rgba-unorm' | 'bc1-rgba-unorm-srgb' | 'bc2-rgba-unorm' | 'bc2-rgba-unorm-srgb' | 'bc3-rgba-unorm' | 'bc3-rgba-unorm-srgb' | 'bc4-r-unorm' | 'bc4-r-snorm' | 'bc5-rg-unorm' | 'bc5-rg-snorm' | 'bc6h-rgb-ufloat' | 'bc6h-rgb-float' | 'bc7-rgba-unorm' | 'bc7-rgba-unorm-srgb' | 'etc2-rgb8unorm' | 'etc2-rgb8unorm-srgb' | 'etc2-rgb8a1unorm' | 'etc2-rgb8a1unorm-srgb' | 'etc2-rgba8unorm' | 'etc2-rgba8unorm-srgb' | 'eac-r11unorm' | 'eac-r11snorm' | 'eac-rg11unorm' | 'eac-rg11snorm' | 'astc-4x4-unorm' | 'astc-4x4-unorm-srgb' | 'astc-5x4-unorm' | 'astc-5x4-unorm-srgb' | 'astc-5x5-unorm' | 'astc-5x5-unorm-srgb' | 'astc-6x5-unorm' | 'astc-6x5-unorm-srgb' | 'astc-6x6-unorm' | 'astc-6x6-unorm-srgb' | 'astc-8x5-unorm' | 'astc-8x5-unorm-srgb' | 'astc-8x6-unorm' | 'astc-8x6-unorm-srgb' | 'astc-8x8-unorm' | 'astc-8x8-unorm-srgb' | 'astc-10x5-unorm' | 'astc-10x5-unorm-srgb' | 'astc-10x6-unorm' | 'astc-10x6-unorm-srgb' | 'astc-10x8-unorm' | 'astc-10x8-unorm-srgb' | 'astc-10x10-unorm' | 'astc-10x10-unorm-srgb' | 'astc-12x10-unorm' | 'astc-12x10-unorm-srgb' | 'astc-12x12-unorm' | 'astc-12x12-unorm-srgb';
|
|
37
|
+
export declare type GPUVertexFormat = 'uint8x2' | 'uint8x4' | 'sint8x2' | 'sint8x4' | 'unorm8x2' | 'unorm8x4' | 'snorm8x2' | 'snorm8x4' | 'uint16x2' | 'uint16x4' | 'sint16x2' | 'sint16x4' | 'unorm16x2' | 'unorm16x4' | 'snorm16x2' | 'snorm16x4' | 'float16x2' | 'float16x4' | 'float32' | 'float32x2' | 'float32x3' | 'float32x4' | 'uint32' | 'uint32x2' | 'uint32x3' | 'uint32x4' | 'sint32' | 'sint32x2' | 'sint32x3' | 'sint32x4' | 'unorm10-10-10-2';
|
|
38
|
+
export declare type GPUCanvasAlphaMode = 'opaque' | 'premultiplied' | 'postmultiplied' | 'inherit';
|
|
39
|
+
export declare type GPUCanvasPresentMode = 'autoVsync' | 'autoNoVsync' | 'fifo' | 'fifoRelaxed' | 'immediate' | 'mailbox';
|
package/WebGPU/Types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../../../packages/canvas/WebGPU/Types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseVertexFormat(value: string): 1 | 0 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34;
|