react-native-webgpu 0.22.0 → 0.24.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/Package.swift +18 -129
- package/README.md +15 -2
- package/android/CMakeLists.txt +2 -1
- package/android/cpp/AndroidAnimationFrameSource.h +136 -0
- package/android/cpp/AndroidPlatformContext.h +65 -9
- package/android/cpp/cpp-adapter.cpp +148 -2
- package/android/src/main/java/com/webgpu/WebGPUModule.java +24 -7
- package/android/src/main/java/com/webgpu/WebGPUNativeBufferView.java +370 -0
- package/android/src/main/java/com/webgpu/WebGPUNativeBufferViewManager.java +56 -0
- package/android/src/main/java/com/webgpu/WebGPUTextureView.java +21 -0
- package/android/src/main/java/com/webgpu/WebGPUVideoPlayer.java +2 -2
- package/android/src/main/java/com/webgpu/WebGPUView.java +19 -3
- package/android/src/main/java/com/webgpu/WebGPUViewPackage.java +2 -2
- package/android/src/newarch/com/webgpu/WebGPUNativeBufferViewManagerSpec.java +24 -0
- package/apple/AppleAnimationFrameSource.mm +208 -0
- package/apple/ApplePlatformContext.h +8 -1
- package/apple/ApplePlatformContext.mm +75 -2
- package/apple/NativeBufferFenceWait.mm +88 -0
- package/apple/WebGPUNativeBufferView.h +15 -0
- package/apple/WebGPUNativeBufferView.mm +200 -0
- package/binaries.json +53 -105
- package/cpp/dawn/common/ExternalTextureParams.h +3 -3
- package/cpp/dawn/include/dawn/dawn_proc.h +53 -0
- package/cpp/dawn/include/dawn/dawn_proc_table.h +329 -0
- package/cpp/dawn/include/dawn/dawn_thread_dispatch_proc.h +47 -0
- package/cpp/dawn/include/dawn/dawn_version.h +51 -0
- package/cpp/dawn/include/dawn/native/D3D11Backend.h +65 -0
- package/cpp/dawn/include/dawn/native/D3D12Backend.h +104 -0
- package/cpp/dawn/include/dawn/native/D3DBackend.h +56 -0
- package/cpp/dawn/include/dawn/native/DawnNative.h +375 -0
- package/cpp/dawn/include/dawn/native/MetalBackend.h +67 -0
- package/cpp/dawn/include/dawn/native/NullBackend.h +39 -0
- package/cpp/dawn/include/dawn/native/OpenGLBackend.h +89 -0
- package/cpp/dawn/include/dawn/native/VulkanBackend.h +199 -0
- package/cpp/dawn/include/dawn/native/WebGPUBackend.h +49 -0
- package/cpp/dawn/include/dawn/native/dawn_native_export.h +49 -0
- package/cpp/dawn/include/dawn/platform/DawnPlatform.h +210 -0
- package/cpp/dawn/include/dawn/platform/dawn_platform_export.h +49 -0
- package/cpp/dawn/include/dawn/replay/Replay.h +99 -0
- package/cpp/dawn/include/dawn/replay/dawn_replay_export.h +49 -0
- package/cpp/dawn/include/dawn/webgpu.h +5119 -0
- package/cpp/dawn/include/dawn/webgpu_cpp.h +10506 -0
- package/cpp/dawn/include/dawn/webgpu_cpp_print.h +2897 -0
- package/cpp/dawn/include/webgpu/webgpu.h +33 -0
- package/cpp/dawn/include/webgpu/webgpu_cpp.h +33 -0
- package/cpp/dawn/include/webgpu/webgpu_cpp_chained_struct.h +57 -0
- package/cpp/dawn/include/webgpu/webgpu_cpp_print.h +33 -0
- package/cpp/dawn/include/webgpu/webgpu_enum_class_bitmasks.h +163 -0
- package/cpp/dawn/include/webgpu/webgpu_glfw.h +88 -0
- package/cpp/rnwgpu/AnimationFrames.cpp +576 -0
- package/cpp/rnwgpu/AnimationFrames.h +233 -0
- package/cpp/rnwgpu/NativeBufferViewRegistry.cpp +396 -0
- package/cpp/rnwgpu/NativeBufferViewRegistry.h +163 -0
- package/cpp/rnwgpu/PlatformContext.h +21 -1
- package/cpp/rnwgpu/RNWebGPUManager.cpp +17 -4
- package/cpp/rnwgpu/SurfaceRegistry.h +2 -2
- package/cpp/rnwgpu/api/GPUAdapter.cpp +2 -2
- package/cpp/rnwgpu/api/GPUDevice.cpp +16 -131
- package/cpp/rnwgpu/api/GPUDevice.h +0 -18
- package/cpp/rnwgpu/api/GPUExternalTexture.cpp +35 -3
- package/cpp/rnwgpu/api/GPUExternalTexture.h +4 -4
- package/cpp/rnwgpu/api/GPUQueue.cpp +1 -1
- package/cpp/rnwgpu/api/GPUQueue.h +1 -1
- package/cpp/rnwgpu/api/GPUSharedFence.h +1 -0
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp +11 -5
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.h +21 -2
- package/cpp/rnwgpu/api/GPUTexture.h +18 -0
- package/cpp/rnwgpu/api/NativeFrameFeatures.h +1 -1
- package/cpp/rnwgpu/api/NativeFrameImport.cpp +20 -17
- package/cpp/rnwgpu/api/NativeFrameImport.h +31 -20
- package/cpp/rnwgpu/api/RNWebGPU.h +206 -7
- package/cpp/rnwgpu/api/VideoFrame.h +5 -4
- package/cpp/rnwgpu/api/VideoFrameBlit.h +2 -2
- package/cpp/rnwgpu/api/descriptors/GPUExternalTextureDescriptor.h +21 -14
- package/cpp/rnwgpu/api/descriptors/GPUImageCopyExternalImage.h +1 -1
- package/cpp/rnwgpu/api/descriptors/GPUSharedTextureMemoryDescriptor.h +17 -9
- package/cpp/rnwgpu/async/RuntimeContext.cpp +21 -4
- package/cpp/rnwgpu/async/RuntimeContext.h +8 -0
- package/lib/commonjs/NativeBufferView.js +131 -0
- package/lib/commonjs/NativeBufferView.js.map +1 -0
- package/lib/commonjs/NativeBufferViewNativeComponent.js +10 -0
- package/lib/commonjs/NativeBufferViewNativeComponent.js.map +1 -0
- package/lib/commonjs/animationFrame.js +91 -0
- package/lib/commonjs/animationFrame.js.map +1 -0
- package/lib/commonjs/index.js +16 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/main/index.js +12 -0
- package/lib/commonjs/main/index.js.map +1 -1
- package/lib/commonjs/mock.js +30 -1
- package/lib/commonjs/mock.js.map +1 -1
- package/lib/commonjs/video.js +21 -7
- package/lib/commonjs/video.js.map +1 -1
- package/lib/module/NativeBufferView.js +122 -0
- package/lib/module/NativeBufferView.js.map +1 -0
- package/lib/module/NativeBufferViewNativeComponent.js +4 -0
- package/lib/module/NativeBufferViewNativeComponent.js.map +1 -0
- package/lib/module/animationFrame.js +83 -0
- package/lib/module/animationFrame.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/main/index.js +1 -0
- package/lib/module/main/index.js.map +1 -1
- package/lib/module/mock.js +21 -0
- package/lib/module/mock.js.map +1 -1
- package/lib/module/video.js +17 -4
- package/lib/module/video.js.map +1 -1
- package/lib/typescript/lib/commonjs/NativeBufferView.d.ts +48 -0
- package/lib/typescript/lib/commonjs/NativeBufferView.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/NativeBufferViewNativeComponent.d.ts +5 -0
- package/lib/typescript/lib/commonjs/NativeBufferViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/animationFrame.d.ts +54 -0
- package/lib/typescript/lib/commonjs/animationFrame.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/mock.d.ts +12 -0
- package/lib/typescript/lib/commonjs/mock.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/video.d.ts +9 -4
- package/lib/typescript/lib/commonjs/video.d.ts.map +1 -1
- package/lib/typescript/lib/module/NativeBufferView.d.ts +14 -0
- package/lib/typescript/lib/module/NativeBufferView.d.ts.map +1 -0
- package/lib/typescript/lib/module/NativeBufferViewNativeComponent.d.ts +3 -0
- package/lib/typescript/lib/module/NativeBufferViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/lib/module/animationFrame.d.ts +3 -0
- package/lib/typescript/lib/module/animationFrame.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +1 -0
- package/lib/typescript/lib/module/main/index.d.ts +1 -0
- package/lib/typescript/lib/module/mock.d.ts +14 -0
- package/lib/typescript/lib/module/mock.d.ts.map +1 -1
- package/lib/typescript/lib/module/video.d.ts +4 -3
- package/lib/typescript/lib/module/video.d.ts.map +1 -1
- package/lib/typescript/react-native.config.d.ts +1 -0
- package/lib/typescript/src/NativeBufferView.d.ts +99 -0
- package/lib/typescript/src/NativeBufferView.d.ts.map +1 -0
- package/lib/typescript/src/NativeBufferViewNativeComponent.d.ts +13 -0
- package/lib/typescript/src/NativeBufferViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/animationFrame.d.ts +59 -0
- package/lib/typescript/src/animationFrame.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +18 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/main/index.d.ts +1 -0
- package/lib/typescript/src/main/index.d.ts.map +1 -1
- package/lib/typescript/src/mock.d.ts +11 -0
- package/lib/typescript/src/mock.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +33 -32
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/video.d.ts +18 -6
- package/lib/typescript/src/video.d.ts.map +1 -1
- package/package.json +16 -6
- package/react-native-webgpu.podspec +47 -79
- package/react-native.config.js +9 -6
- package/scripts/apple-binaries-utils.sh +280 -0
- package/scripts/prepare-apple-binaries.sh +309 -0
- package/scripts/spm-plugin.js +130 -0
- package/src/NativeBufferView.tsx +199 -0
- package/src/NativeBufferViewNativeComponent.ts +20 -0
- package/src/animationFrame.ts +82 -0
- package/src/index.tsx +48 -42
- package/src/main/index.tsx +1 -0
- package/src/mock.ts +35 -0
- package/src/types.ts +62 -88
- package/src/video.ts +32 -12
- package/cpp/rnwgpu/api/GPUNativeBufferExternalTexture.h +0 -60
- package/cpp/rnwgpu/api/GPUNativeBufferTexture.h +0 -52
- package/cpp/rnwgpu/api/GPUNativeBufferWrapper.cpp +0 -144
- package/cpp/rnwgpu/api/GPUNativeBufferWrapper.h +0 -143
- package/cpp/rnwgpu/api/descriptors/GPUNativeBufferTextureDescriptor.h +0 -55
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
#import "WebGPUNativeBufferView.h"
|
|
2
|
+
|
|
3
|
+
#import <QuartzCore/QuartzCore.h>
|
|
4
|
+
|
|
5
|
+
#import <react/renderer/components/RNWgpuViewSpec/ComponentDescriptors.h>
|
|
6
|
+
#import <react/renderer/components/RNWgpuViewSpec/EventEmitters.h>
|
|
7
|
+
#import <react/renderer/components/RNWgpuViewSpec/Props.h>
|
|
8
|
+
#import <react/renderer/components/RNWgpuViewSpec/RCTComponentViewHelpers.h>
|
|
9
|
+
|
|
10
|
+
#import <React/RCTFabricComponentsPlugins.h>
|
|
11
|
+
|
|
12
|
+
#include <cmath>
|
|
13
|
+
#include <memory>
|
|
14
|
+
|
|
15
|
+
#include "NativeBufferViewRegistry.h"
|
|
16
|
+
|
|
17
|
+
using namespace facebook::react;
|
|
18
|
+
|
|
19
|
+
static const std::shared_ptr<const WebGPUNativeBufferViewProps> &
|
|
20
|
+
defaultNativeBufferViewProps() {
|
|
21
|
+
static const auto props =
|
|
22
|
+
std::make_shared<const WebGPUNativeBufferViewProps>();
|
|
23
|
+
return props;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static NSString *gravityForResizeMode(WebGPUNativeBufferViewResizeMode mode) {
|
|
27
|
+
switch (mode) {
|
|
28
|
+
case WebGPUNativeBufferViewResizeMode::Contain:
|
|
29
|
+
return kCAGravityResizeAspect;
|
|
30
|
+
case WebGPUNativeBufferViewResizeMode::Cover:
|
|
31
|
+
return kCAGravityResizeAspectFill;
|
|
32
|
+
case WebGPUNativeBufferViewResizeMode::TopLeft:
|
|
33
|
+
#if !TARGET_OS_OSX
|
|
34
|
+
// The gravity constants assume a bottom-left origin; UIKit layers have
|
|
35
|
+
// a top-left one, so "bottom" is the top edge on screen.
|
|
36
|
+
return kCAGravityBottomLeft;
|
|
37
|
+
#else
|
|
38
|
+
return kCAGravityTopLeft;
|
|
39
|
+
#endif
|
|
40
|
+
case WebGPUNativeBufferViewResizeMode::Stretch:
|
|
41
|
+
default:
|
|
42
|
+
return kCAGravityResize;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@implementation WebGPUNativeBufferView {
|
|
47
|
+
// Shows the IOSurface as its layer's contents. A subview rather than this
|
|
48
|
+
// view's own layer, which keeps React Native's background and borders.
|
|
49
|
+
RNWGPlatformView *_surfaceView;
|
|
50
|
+
int _viewId;
|
|
51
|
+
// The registry sequence number of what is shown, 0 for nothing.
|
|
52
|
+
uint64_t _sequence;
|
|
53
|
+
int _reportedWidth;
|
|
54
|
+
int _reportedHeight;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider {
|
|
58
|
+
return concreteComponentDescriptorProvider<
|
|
59
|
+
WebGPUNativeBufferViewComponentDescriptor>();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
63
|
+
if (self = [super initWithFrame:frame]) {
|
|
64
|
+
// updateProps: casts _props to WebGPUNativeBufferViewProps, so it must
|
|
65
|
+
// hold that type from the start (see WebGPUView).
|
|
66
|
+
_props = defaultNativeBufferViewProps();
|
|
67
|
+
_surfaceView = [RNWGPlatformView new];
|
|
68
|
+
#if TARGET_OS_OSX
|
|
69
|
+
_surfaceView.wantsLayer = YES;
|
|
70
|
+
#else
|
|
71
|
+
_surfaceView.userInteractionEnabled = NO;
|
|
72
|
+
#endif
|
|
73
|
+
CALayer *layer = _surfaceView.layer;
|
|
74
|
+
layer.contentsGravity = kCAGravityResize;
|
|
75
|
+
layer.masksToBounds = YES;
|
|
76
|
+
self.contentView = _surfaceView;
|
|
77
|
+
}
|
|
78
|
+
return self;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
- (void)dealloc {
|
|
82
|
+
if (_viewId != 0) {
|
|
83
|
+
rnwgpu::NativeBufferViewRegistry::getInstance().detachView(_viewId);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
- (void)prepareForRecycle {
|
|
88
|
+
[super prepareForRecycle];
|
|
89
|
+
[self attachToViewId:0];
|
|
90
|
+
[self setSurfaceContents:nil];
|
|
91
|
+
_reportedWidth = 0;
|
|
92
|
+
_reportedHeight = 0;
|
|
93
|
+
// Reset to the default props (viewId == 0) so the next mount attaches.
|
|
94
|
+
_props = defaultNativeBufferViewProps();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
- (void)updateProps:(const Props::Shared &)props
|
|
98
|
+
oldProps:(const Props::Shared &)oldProps {
|
|
99
|
+
const auto &oldViewProps =
|
|
100
|
+
*std::static_pointer_cast<const WebGPUNativeBufferViewProps>(_props);
|
|
101
|
+
const auto &newViewProps =
|
|
102
|
+
*std::static_pointer_cast<const WebGPUNativeBufferViewProps>(props);
|
|
103
|
+
|
|
104
|
+
if (newViewProps.viewId != oldViewProps.viewId) {
|
|
105
|
+
[self attachToViewId:newViewProps.viewId];
|
|
106
|
+
}
|
|
107
|
+
NSString *gravity = gravityForResizeMode(newViewProps.resizeMode);
|
|
108
|
+
if (![_surfaceView.layer.contentsGravity isEqualToString:gravity]) {
|
|
109
|
+
[CATransaction begin];
|
|
110
|
+
[CATransaction setDisableActions:YES];
|
|
111
|
+
_surfaceView.layer.contentsGravity = gravity;
|
|
112
|
+
[CATransaction commit];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[super updateProps:props oldProps:oldProps];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
- (void)updateEventEmitter:(const EventEmitter::Shared &)eventEmitter {
|
|
119
|
+
[super updateEventEmitter:eventEmitter];
|
|
120
|
+
[self reportPixelSize];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
- (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics
|
|
124
|
+
oldLayoutMetrics:(const LayoutMetrics &)oldLayoutMetrics {
|
|
125
|
+
[super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics];
|
|
126
|
+
// With the screen scale, a buffer of the reported size maps 1:1 to pixels,
|
|
127
|
+
// and topLeft shows it unscaled.
|
|
128
|
+
_surfaceView.layer.contentsScale = layoutMetrics.pointScaleFactor;
|
|
129
|
+
[self reportPixelSize];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// onPixelSizeChange: the size the producer should render at for a 1:1
|
|
133
|
+
// display. Layout frames are already on the pixel grid; the rounding only
|
|
134
|
+
// absorbs floating point error, the same rounding as Android's.
|
|
135
|
+
- (void)reportPixelSize {
|
|
136
|
+
const auto scale = _layoutMetrics.pointScaleFactor;
|
|
137
|
+
const auto size = _layoutMetrics.frame.size;
|
|
138
|
+
const int width = static_cast<int>(std::lround(size.width * scale));
|
|
139
|
+
const int height = static_cast<int>(std::lround(size.height * scale));
|
|
140
|
+
if (width <= 0 || height <= 0 || _eventEmitter == nullptr ||
|
|
141
|
+
(width == _reportedWidth && height == _reportedHeight)) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
_reportedWidth = width;
|
|
145
|
+
_reportedHeight = height;
|
|
146
|
+
std::static_pointer_cast<const WebGPUNativeBufferViewEventEmitter>(
|
|
147
|
+
_eventEmitter)
|
|
148
|
+
->onPixelSizeChange({.width = width, .height = height});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Main thread.
|
|
152
|
+
- (void)attachToViewId:(int)viewId {
|
|
153
|
+
auto ®istry = rnwgpu::NativeBufferViewRegistry::getInstance();
|
|
154
|
+
if (_viewId != 0) {
|
|
155
|
+
registry.detachView(_viewId);
|
|
156
|
+
}
|
|
157
|
+
_viewId = viewId;
|
|
158
|
+
_sequence = 0;
|
|
159
|
+
if (viewId == 0) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
// Called from any thread (the fence listener's queue, the JS thread)
|
|
163
|
+
// when content is ready, and right away when there is some already.
|
|
164
|
+
__weak WebGPUNativeBufferView *weakSelf = self;
|
|
165
|
+
registry.setListener(viewId, [weakSelf]() {
|
|
166
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
167
|
+
[weakSelf consumeContent];
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Main thread: shows the newest content, if it is newer than what is shown.
|
|
173
|
+
// Present on change, no frame pacing: Core Animation shows it on the next
|
|
174
|
+
// vsync, and retains the IOSurface for as long as it does.
|
|
175
|
+
- (void)consumeContent {
|
|
176
|
+
if (_viewId == 0) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
uint64_t sequence = 0;
|
|
180
|
+
auto content = rnwgpu::NativeBufferViewRegistry::getInstance().content(
|
|
181
|
+
_viewId, &sequence);
|
|
182
|
+
if (content == nullptr || sequence <= _sequence) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
_sequence = sequence;
|
|
186
|
+
[self setSurfaceContents:(__bridge id)content->buffer()];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
- (void)setSurfaceContents:(nullable id)contents {
|
|
190
|
+
[CATransaction begin];
|
|
191
|
+
[CATransaction setDisableActions:YES];
|
|
192
|
+
_surfaceView.layer.contents = contents;
|
|
193
|
+
[CATransaction commit];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
Class<RCTComponentViewProtocol> WebGPUNativeBufferViewCls(void) {
|
|
197
|
+
return WebGPUNativeBufferView.class;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@end
|
package/binaries.json
CHANGED
|
@@ -1,156 +1,104 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "158.
|
|
3
|
-
"tag": "binaries-158.
|
|
4
|
-
"skia": "
|
|
2
|
+
"version": "158.1.0",
|
|
3
|
+
"tag": "binaries-158.1.0",
|
|
4
|
+
"skia": "m158a",
|
|
5
5
|
"dawn": {
|
|
6
6
|
"commit": "1716e88cc9e58398fab5d4473f7f2e858667b677",
|
|
7
7
|
"repository": "https://dawn.googlesource.com/dawn.git",
|
|
8
8
|
"patches": [
|
|
9
|
-
"metal-
|
|
9
|
+
"metal-platforms.patch",
|
|
10
10
|
"metal-suspend-submissions-in-background.patch",
|
|
11
11
|
"vulkan-fifo-three-images-android.patch"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"assets": {
|
|
15
15
|
"skia-graphite-android-armeabi-v7a.zip": {
|
|
16
|
-
"sha256": "
|
|
17
|
-
"size":
|
|
16
|
+
"sha256": "47781a5c9a8cadcacfd34ecc7ba4fb693720317ecf5a3222d06f2a8e2d68bfbf",
|
|
17
|
+
"size": 15722986
|
|
18
18
|
},
|
|
19
19
|
"dawn-android-armeabi-v7a.zip": {
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "2b57530193b024be85f285b6da30298afd53900c9280fb2ffdd46f008c3f3d1e",
|
|
21
21
|
"size": 4885803
|
|
22
22
|
},
|
|
23
23
|
"skia-graphite-android-arm64-v8a.zip": {
|
|
24
|
-
"sha256": "
|
|
25
|
-
"size":
|
|
24
|
+
"sha256": "ea089e96d0f6ceab54d548086d59b16aa3eb4cb74b938e01615090d161d85682",
|
|
25
|
+
"size": 16819745
|
|
26
26
|
},
|
|
27
27
|
"dawn-android-arm64-v8a.zip": {
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "9d6ba71daeb9b10b0209d542a0579bbb55dcf9be88af1792aaa5681b92860b94",
|
|
29
29
|
"size": 5308117
|
|
30
30
|
},
|
|
31
31
|
"skia-graphite-android-x86.zip": {
|
|
32
|
-
"sha256": "
|
|
33
|
-
"size":
|
|
32
|
+
"sha256": "2b3da6ede43dec15b4daaed779d98f5b86b445c4805db2b4a289460fc079a029",
|
|
33
|
+
"size": 17308398
|
|
34
34
|
},
|
|
35
35
|
"dawn-android-x86.zip": {
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "a2d86b4c796e41124cf12a455644dc668cab2d77c1d920892b8d8633d87c15de",
|
|
37
37
|
"size": 6066809
|
|
38
38
|
},
|
|
39
39
|
"skia-graphite-android-x86_64.zip": {
|
|
40
|
-
"sha256": "
|
|
41
|
-
"size":
|
|
40
|
+
"sha256": "91c49f9174bd3d869cb633b3ddcfe8ba50e91cc20a7e3b41f99cda951d54386b",
|
|
41
|
+
"size": 16894623
|
|
42
42
|
},
|
|
43
43
|
"dawn-android-x86_64.zip": {
|
|
44
|
-
"sha256": "
|
|
44
|
+
"sha256": "2dc9d121cd1d03b9d864daf42ea89363ac7aa9307194bfd624d13243ec744335",
|
|
45
45
|
"size": 5659211
|
|
46
46
|
},
|
|
47
47
|
"dawn-headers.zip": {
|
|
48
|
-
"sha256": "
|
|
48
|
+
"sha256": "52306f91ada60f507924ae2b377423b4630ba2610f6921771026831d1dcd7ee6",
|
|
49
49
|
"size": 150497
|
|
50
50
|
},
|
|
51
51
|
"dawn-LICENSE.txt": {
|
|
52
52
|
"sha256": "0493f897193af1796d5054659f45ec7d4c5af648fa67a99f01d30e55cc805abc",
|
|
53
53
|
"size": 11829
|
|
54
54
|
},
|
|
55
|
-
"skia-graphite-apple-
|
|
56
|
-
"sha256": "
|
|
57
|
-
"size":
|
|
55
|
+
"skia-graphite-apple-iphoneos.zip": {
|
|
56
|
+
"sha256": "73f4f5f26decc5406ecf51d49b8fa4f49e1d22fe01888921d060c7dda5df24a2",
|
|
57
|
+
"size": 13661198
|
|
58
58
|
},
|
|
59
|
-
"
|
|
60
|
-
"sha256": "
|
|
61
|
-
"size":
|
|
59
|
+
"dawn-apple-iphoneos.zip": {
|
|
60
|
+
"sha256": "02447594afe473f138e8af0bca7797da5065cb47fd386e9b865e8979b8f56323",
|
|
61
|
+
"size": 5165717
|
|
62
62
|
},
|
|
63
|
-
"skia-graphite-apple-
|
|
64
|
-
"sha256": "
|
|
65
|
-
"size":
|
|
63
|
+
"skia-graphite-apple-iphonesimulator.zip": {
|
|
64
|
+
"sha256": "a241b57f7bf5e3496e3886336593a3272427701346f1cbf3000309fd305e36b5",
|
|
65
|
+
"size": 27756601
|
|
66
66
|
},
|
|
67
|
-
"
|
|
68
|
-
"sha256": "
|
|
69
|
-
"size":
|
|
67
|
+
"dawn-apple-iphonesimulator.zip": {
|
|
68
|
+
"sha256": "6dbd06127709c7bc2f291f624943386642c86507a10c51f978ccacbacd8b2073",
|
|
69
|
+
"size": 10355986
|
|
70
70
|
},
|
|
71
|
-
"skia-graphite-apple-
|
|
72
|
-
"sha256": "
|
|
73
|
-
"size":
|
|
71
|
+
"skia-graphite-apple-maccatalyst.zip": {
|
|
72
|
+
"sha256": "7555f273222a6a53d14cea1111d1442fee0cfbaf61503f233678a37271509921",
|
|
73
|
+
"size": 28586272
|
|
74
74
|
},
|
|
75
|
-
"
|
|
76
|
-
"sha256": "
|
|
77
|
-
"size":
|
|
75
|
+
"dawn-apple-maccatalyst.zip": {
|
|
76
|
+
"sha256": "2b7469f7634e751159f500bc75c71db3c019440cb74f3dbd79589d0e3cb491d8",
|
|
77
|
+
"size": 10682325
|
|
78
78
|
},
|
|
79
|
-
"skia-graphite-apple-
|
|
80
|
-
"sha256": "
|
|
81
|
-
"size":
|
|
79
|
+
"skia-graphite-apple-appletvos.zip": {
|
|
80
|
+
"sha256": "9a76b0e38fac39a92decee00dc1827982b93c79c4e46fad5023cc8745af1a7ef",
|
|
81
|
+
"size": 13661376
|
|
82
82
|
},
|
|
83
|
-
"
|
|
84
|
-
"sha256": "
|
|
85
|
-
"size":
|
|
83
|
+
"dawn-apple-appletvos.zip": {
|
|
84
|
+
"sha256": "a20dd2d2e7355588a576e49a8efaff00124ebb241e9c94600b66fcfaeeb88754",
|
|
85
|
+
"size": 5163794
|
|
86
86
|
},
|
|
87
|
-
"skia-graphite-apple-
|
|
88
|
-
"sha256": "
|
|
89
|
-
"size":
|
|
87
|
+
"skia-graphite-apple-appletvsimulator.zip": {
|
|
88
|
+
"sha256": "f633d90ab9f4030183ec5da9c09e2b0415fb55e689e82825945dc8a46a233297",
|
|
89
|
+
"size": 27755222
|
|
90
90
|
},
|
|
91
|
-
"
|
|
92
|
-
"sha256": "
|
|
93
|
-
"size":
|
|
91
|
+
"dawn-apple-appletvsimulator.zip": {
|
|
92
|
+
"sha256": "2d41261a7bd067c32c001fd39eadafa29c22e625f77cfba3f7ec22b110ae8b3a",
|
|
93
|
+
"size": 10352864
|
|
94
94
|
},
|
|
95
|
-
"skia-graphite-apple-
|
|
96
|
-
"sha256": "
|
|
97
|
-
"size":
|
|
95
|
+
"skia-graphite-apple-macos.zip": {
|
|
96
|
+
"sha256": "fe3a7388c25e807774bac85b2b3526947bde8717beb4c6379b810e62185c602d",
|
|
97
|
+
"size": 28540342
|
|
98
98
|
},
|
|
99
|
-
"
|
|
100
|
-
"sha256": "
|
|
101
|
-
"size":
|
|
102
|
-
},
|
|
103
|
-
"skia-graphite-apple-tvos-libskunicode_core.xcframework.zip": {
|
|
104
|
-
"sha256": "f73bb1ce3cee1d2fbd940b8b5b91ed4512cb618f91a0009f49cf718945826812",
|
|
105
|
-
"size": 11546
|
|
106
|
-
},
|
|
107
|
-
"skia-graphite-apple-tvos-libskunicode_libgrapheme.xcframework.zip": {
|
|
108
|
-
"sha256": "c515f56f998e6ea7e2b74b853915e1627e3efcf406b7ec29316fd0769ca5c1e3",
|
|
109
|
-
"size": 491185
|
|
110
|
-
},
|
|
111
|
-
"skia-graphite-apple-tvos-libskottie.xcframework.zip": {
|
|
112
|
-
"sha256": "384f861b6c635199a249f2b76d4c2bbd55a3f3480b4fc0f5f0879d6862f0daf9",
|
|
113
|
-
"size": 6335725
|
|
114
|
-
},
|
|
115
|
-
"skia-graphite-apple-tvos-libsksg.xcframework.zip": {
|
|
116
|
-
"sha256": "929096f800fcfe775218625eb4eb9ecba3e5c8a547f6eb3d6a2867e175531a8e",
|
|
117
|
-
"size": 5328696
|
|
118
|
-
},
|
|
119
|
-
"skia-graphite-apple-macos-libskia.xcframework.zip": {
|
|
120
|
-
"sha256": "96526c51628b7ac52360c3ea6c4c86f16c8e28801fc9428fc42b36e6555b01bc",
|
|
121
|
-
"size": 13678266
|
|
122
|
-
},
|
|
123
|
-
"skia-graphite-apple-macos-libsvg.xcframework.zip": {
|
|
124
|
-
"sha256": "636d4d2c6e38ea1bb4e7c19dba98ed013745975bef38ffd53d96d901b3206e8c",
|
|
125
|
-
"size": 3939058
|
|
126
|
-
},
|
|
127
|
-
"skia-graphite-apple-macos-libskshaper.xcframework.zip": {
|
|
128
|
-
"sha256": "80d719fb0c9cb5311791170204102d0a5901e92d43f428f856ee60a32706dc7c",
|
|
129
|
-
"size": 5251775
|
|
130
|
-
},
|
|
131
|
-
"skia-graphite-apple-macos-libskparagraph.xcframework.zip": {
|
|
132
|
-
"sha256": "15a6fe0ade4e5d08661c0282aadc76a5f9293745dfb77e2d3cfe20f5258c315a",
|
|
133
|
-
"size": 462769
|
|
134
|
-
},
|
|
135
|
-
"skia-graphite-apple-macos-libskunicode_core.xcframework.zip": {
|
|
136
|
-
"sha256": "a0f5173dcee332280e72dd49411fa4534256fd6540dfa69ec71463d822fca238",
|
|
137
|
-
"size": 7659
|
|
138
|
-
},
|
|
139
|
-
"skia-graphite-apple-macos-libskunicode_libgrapheme.xcframework.zip": {
|
|
140
|
-
"sha256": "8129e8ab9bfa8d9ced3793db079e0977cdbd9c7436d057eb1ce4b48fb03b082b",
|
|
141
|
-
"size": 334680
|
|
142
|
-
},
|
|
143
|
-
"skia-graphite-apple-macos-libskottie.xcframework.zip": {
|
|
144
|
-
"sha256": "ffbcc4ccb3dd37ac634d394f263488c5f216bdaa2aa5a819093edc5ca03a0fc4",
|
|
145
|
-
"size": 4373140
|
|
146
|
-
},
|
|
147
|
-
"skia-graphite-apple-macos-libsksg.xcframework.zip": {
|
|
148
|
-
"sha256": "58b85895c87561cc4904e1c24b2b05faf6776e5f2fcf49469d6808f0421f5f8f",
|
|
149
|
-
"size": 3684323
|
|
150
|
-
},
|
|
151
|
-
"dawn-apple-libwebgpu_dawn.xcframework.zip": {
|
|
152
|
-
"sha256": "b1844ccfb27809361a9724cf5dac4b1a4b7f9e40f26dc7cf60d40a5013dd7114",
|
|
153
|
-
"size": 53231891
|
|
99
|
+
"dawn-apple-macos.zip": {
|
|
100
|
+
"sha256": "79f72607b6793e299fa6668c3c589f96f90f581b28a7782b6688239607facb9b",
|
|
101
|
+
"size": 10596222
|
|
154
102
|
}
|
|
155
103
|
}
|
|
156
104
|
}
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
//
|
|
30
30
|
// Vendored from Dawn's src/dawn/common/ExternalTextureParams.h, unchanged. The
|
|
31
31
|
// functions it declares are compiled into the Dawn binaries that
|
|
32
|
-
//
|
|
33
|
-
// export them, but the
|
|
34
|
-
// pinned to the
|
|
32
|
+
// the pinned release ships (libwebgpu_dawn.so, libwebgpu_dawn.a), which
|
|
33
|
+
// export them, but the released include/ tree has only public headers. The copy
|
|
34
|
+
// is pinned to the release commit in scripts/check-dawn.ts: on a Dawn
|
|
35
35
|
// bump, diff it against the new commit's file and re-sync it.
|
|
36
36
|
|
|
37
37
|
#ifndef SRC_DAWN_COMMON_EXTERNALTEXTUREPARAMS_H_
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright 2019 The Dawn & Tint Authors
|
|
2
|
+
//
|
|
3
|
+
// Redistribution and use in source and binary forms, with or without
|
|
4
|
+
// modification, are permitted provided that the following conditions are met:
|
|
5
|
+
//
|
|
6
|
+
// 1. Redistributions of source code must retain the above copyright notice, this
|
|
7
|
+
// list of conditions and the following disclaimer.
|
|
8
|
+
//
|
|
9
|
+
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
10
|
+
// this list of conditions and the following disclaimer in the documentation
|
|
11
|
+
// and/or other materials provided with the distribution.
|
|
12
|
+
//
|
|
13
|
+
// 3. Neither the name of the copyright holder nor the names of its
|
|
14
|
+
// contributors may be used to endorse or promote products derived from
|
|
15
|
+
// this software without specific prior written permission.
|
|
16
|
+
//
|
|
17
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
18
|
+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
20
|
+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
21
|
+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
22
|
+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
23
|
+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
24
|
+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
25
|
+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
#ifndef INCLUDE_DAWN_DAWN_PROC_H_
|
|
29
|
+
#define INCLUDE_DAWN_DAWN_PROC_H_
|
|
30
|
+
|
|
31
|
+
#include <webgpu/webgpu.h>
|
|
32
|
+
|
|
33
|
+
#include "dawn/dawn_proc_table.h"
|
|
34
|
+
|
|
35
|
+
#ifdef __cplusplus
|
|
36
|
+
extern "C" {
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
// Sets the static proctable used by libdawn_proc to implement the Dawn entrypoints. Passing NULL
|
|
40
|
+
// for `procs` sets up the null proctable that contains only null function pointers. It is the
|
|
41
|
+
// default value of the proctable. Setting the proctable back to null is good practice when you
|
|
42
|
+
// are done using libdawn_proc since further usage will cause a segfault instead of calling an
|
|
43
|
+
// unexpected function.
|
|
44
|
+
WGPU_EXPORT void dawnProcSetProcs(const DawnProcTable* procs);
|
|
45
|
+
|
|
46
|
+
// Returns the static array of uint8_t of size 20 representing the Dawn version.
|
|
47
|
+
WGPU_EXPORT const uint8_t* dawnProcGetVersion();
|
|
48
|
+
|
|
49
|
+
#ifdef __cplusplus
|
|
50
|
+
} // extern "C"
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
#endif // INCLUDE_DAWN_DAWN_PROC_H_
|