react-native-wgpu 0.1.23 → 0.2.1
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/cpp/dawn/dawn_proc_table.h +17 -25
- package/cpp/dawn/native/D3D11Backend.h +7 -0
- package/cpp/dawn/native/DawnNative.h +70 -26
- package/cpp/dawn/native/WebGPUBackend.h +35 -0
- package/cpp/dawn/platform/DawnPlatform.h +1 -0
- package/cpp/dawn/webgpu_cpp_print.h +338 -293
- package/cpp/dawn_logging.cpp +122 -0
- package/cpp/jsi/RNFJSIConverter.h +5 -2
- package/cpp/rnwgpu/SurfaceRegistry.h +3 -2
- package/cpp/rnwgpu/api/Convertors.h +38 -42
- package/cpp/rnwgpu/api/GPU.cpp +20 -18
- package/cpp/rnwgpu/api/GPU.h +6 -2
- package/cpp/rnwgpu/api/GPUAdapter.cpp +49 -40
- package/cpp/rnwgpu/api/GPUBuffer.cpp +21 -19
- package/cpp/rnwgpu/api/GPUCanvasContext.cpp +1 -0
- package/cpp/rnwgpu/api/GPUCommandEncoder.cpp +6 -6
- package/cpp/rnwgpu/api/GPUCompilationInfo.h +0 -9
- package/cpp/rnwgpu/api/GPUDevice.cpp +7 -10
- package/cpp/rnwgpu/api/GPUFeatures.h +5 -14
- package/cpp/rnwgpu/api/GPUQueue.cpp +4 -4
- package/cpp/rnwgpu/api/GPUShaderModule.cpp +0 -3
- package/cpp/rnwgpu/api/GPUSupportedLimits.cpp +31 -35
- package/cpp/rnwgpu/api/GPUSupportedLimits.h +3 -7
- package/cpp/rnwgpu/api/descriptors/Unions.h +8 -28
- package/cpp/webgpu/webgpu.h +2197 -1863
- package/cpp/webgpu/webgpu_cpp.h +2800 -2479
- package/cpp/webgpu/webgpu_cpp_print.h +33 -0
- package/cpp/webgpu/webgpu_glfw.h +17 -0
- package/lib/commonjs/Canvas.js +1 -3
- package/lib/commonjs/Canvas.js.map +1 -1
- package/lib/module/Canvas.js +1 -3
- package/lib/module/Canvas.js.map +1 -1
- package/lib/typescript/lib/module/Canvas.d.ts.map +1 -1
- package/lib/typescript/src/__tests__/components/meshes/mesh.d.ts.map +1 -1
- package/lib/typescript/src/__tests__/setup.d.ts.map +1 -1
- package/lib/typescript/src/hooks.d.ts.map +1 -1
- package/libs/android/arm64-v8a/libwebgpu_dawn.so +0 -0
- package/libs/android/armeabi-v7a/libwebgpu_dawn.so +0 -0
- package/libs/android/x86/libwebgpu_dawn.so +0 -0
- package/libs/android/x86_64/libwebgpu_dawn.so +0 -0
- package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
- package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +11 -11
- package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
- package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
- package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
- package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
- package/libs/dawn.json +659 -798
- package/package.json +4 -4
- package/src/Canvas.tsx +1 -1
|
@@ -64,8 +64,8 @@ void GPUCommandEncoder::copyTextureToBuffer(
|
|
|
64
64
|
std::shared_ptr<GPUImageCopyBuffer> destination,
|
|
65
65
|
std::shared_ptr<GPUExtent3D> copySize) {
|
|
66
66
|
Convertor conv;
|
|
67
|
-
wgpu::
|
|
68
|
-
wgpu::
|
|
67
|
+
wgpu::TexelCopyTextureInfo src{};
|
|
68
|
+
wgpu::TexelCopyBufferInfo dst{};
|
|
69
69
|
wgpu::Extent3D size{};
|
|
70
70
|
if (!conv(src, source) || //
|
|
71
71
|
!conv(dst, destination) || //
|
|
@@ -81,8 +81,8 @@ void GPUCommandEncoder::copyTextureToTexture(
|
|
|
81
81
|
std::shared_ptr<GPUExtent3D> copySize) {
|
|
82
82
|
Convertor conv;
|
|
83
83
|
|
|
84
|
-
wgpu::
|
|
85
|
-
wgpu::
|
|
84
|
+
wgpu::TexelCopyTextureInfo src{};
|
|
85
|
+
wgpu::TexelCopyTextureInfo dst{};
|
|
86
86
|
wgpu::Extent3D size{};
|
|
87
87
|
if (!conv(src, source) || //
|
|
88
88
|
!conv(dst, destination) || //
|
|
@@ -137,8 +137,8 @@ void GPUCommandEncoder::copyBufferToTexture(
|
|
|
137
137
|
std::shared_ptr<GPUExtent3D> copySize) {
|
|
138
138
|
Convertor conv;
|
|
139
139
|
|
|
140
|
-
wgpu::
|
|
141
|
-
wgpu::
|
|
140
|
+
wgpu::TexelCopyBufferInfo src{};
|
|
141
|
+
wgpu::TexelCopyTextureInfo dst{};
|
|
142
142
|
wgpu::Extent3D size{};
|
|
143
143
|
if (!conv(src, source) || //
|
|
144
144
|
!conv(dst, destination) || //
|
|
@@ -22,9 +22,6 @@ struct GPUCompilationMessage {
|
|
|
22
22
|
uint64_t linePos;
|
|
23
23
|
uint64_t offset;
|
|
24
24
|
uint64_t length;
|
|
25
|
-
uint64_t utf16LinePos;
|
|
26
|
-
uint64_t utf16Offset;
|
|
27
|
-
uint64_t utf16Length;
|
|
28
25
|
};
|
|
29
26
|
|
|
30
27
|
class GPUCompilationInfo : public m::HybridObject {
|
|
@@ -75,12 +72,6 @@ template <> struct JSIConverter<std::vector<rnwgpu::GPUCompilationMessage>> {
|
|
|
75
72
|
static_cast<double>(message.offset));
|
|
76
73
|
messageObj.setProperty(runtime, "length",
|
|
77
74
|
static_cast<double>(message.length));
|
|
78
|
-
messageObj.setProperty(runtime, "utf16LinePos",
|
|
79
|
-
static_cast<double>(message.utf16LinePos));
|
|
80
|
-
messageObj.setProperty(runtime, "utf16Offset",
|
|
81
|
-
static_cast<double>(message.utf16Offset));
|
|
82
|
-
messageObj.setProperty(runtime, "utf16Length",
|
|
83
|
-
static_cast<double>(message.utf16Length));
|
|
84
75
|
result.setValueAtIndex(runtime, i, messageObj);
|
|
85
76
|
}
|
|
86
77
|
return result;
|
|
@@ -22,7 +22,7 @@ GPUDevice::createBuffer(std::shared_ptr<GPUBufferDescriptor> descriptor) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
std::shared_ptr<GPUSupportedLimits> GPUDevice::getLimits() {
|
|
25
|
-
wgpu::
|
|
25
|
+
wgpu::Limits limits{};
|
|
26
26
|
if (!_instance.GetLimits(&limits)) {
|
|
27
27
|
throw std::runtime_error("failed to get device limits");
|
|
28
28
|
}
|
|
@@ -301,9 +301,8 @@ GPUDevice::popErrorScope() {
|
|
|
301
301
|
break;
|
|
302
302
|
}
|
|
303
303
|
case wgpu::ErrorType::Unknown:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
message);
|
|
304
|
+
result =
|
|
305
|
+
std::make_shared<GPUError>(wgpu::ErrorType::Unknown, message);
|
|
307
306
|
break;
|
|
308
307
|
default:
|
|
309
308
|
throw std::runtime_error(
|
|
@@ -321,13 +320,11 @@ GPUDevice::popErrorScope() {
|
|
|
321
320
|
}
|
|
322
321
|
|
|
323
322
|
std::unordered_set<std::string> GPUDevice::getFeatures() {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
if (count > 0) {
|
|
327
|
-
_instance.EnumerateFeatures(features.data());
|
|
328
|
-
}
|
|
323
|
+
wgpu::SupportedFeatures supportedFeatures;
|
|
324
|
+
_instance.GetFeatures(&supportedFeatures);
|
|
329
325
|
std::unordered_set<std::string> result;
|
|
330
|
-
for (
|
|
326
|
+
for (size_t i = 0; i < supportedFeatures.featureCount; ++i) {
|
|
327
|
+
auto feature = supportedFeatures.features[i];
|
|
331
328
|
std::string name;
|
|
332
329
|
convertEnumToJSUnion(feature, &name);
|
|
333
330
|
result.insert(name);
|
|
@@ -47,9 +47,6 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
47
47
|
case wgpu::FeatureName::Subgroups:
|
|
48
48
|
*outUnion = "subgroups";
|
|
49
49
|
break;
|
|
50
|
-
case wgpu::FeatureName::SubgroupsF16:
|
|
51
|
-
*outUnion = "subgroups-f16";
|
|
52
|
-
break;
|
|
53
50
|
case wgpu::FeatureName::DawnInternalUsages:
|
|
54
51
|
*outUnion = "dawn-internal-usages";
|
|
55
52
|
break;
|
|
@@ -65,9 +62,6 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
65
62
|
case wgpu::FeatureName::ImplicitDeviceSynchronization:
|
|
66
63
|
*outUnion = "implicit-device-synchronization";
|
|
67
64
|
break;
|
|
68
|
-
// case wgpu::FeatureName::SurfaceCapabilities:
|
|
69
|
-
// *outUnion = "surface-capabilities";
|
|
70
|
-
// break;
|
|
71
65
|
case wgpu::FeatureName::TransientAttachments:
|
|
72
66
|
*outUnion = "transient-attachments";
|
|
73
67
|
break;
|
|
@@ -83,11 +77,8 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
83
77
|
case wgpu::FeatureName::ANGLETextureSharing:
|
|
84
78
|
*outUnion = "angle-texture-sharing";
|
|
85
79
|
break;
|
|
86
|
-
case wgpu::FeatureName::
|
|
87
|
-
*outUnion = "chromium-experimental-subgroups";
|
|
88
|
-
break;
|
|
89
|
-
case wgpu::FeatureName::ChromiumExperimentalSubgroupUniformControlFlow:
|
|
90
|
-
*outUnion = "chromium-experimental-subgroup-uniform-control-flow";
|
|
80
|
+
case wgpu::FeatureName::ChromiumExperimentalSubgroupMatrix:
|
|
81
|
+
*outUnion = "chromium-experimental-subgroups-matrix";
|
|
91
82
|
break;
|
|
92
83
|
case wgpu::FeatureName::PixelLocalStorageCoherent:
|
|
93
84
|
*outUnion = "pixel-local-storage-coherent";
|
|
@@ -134,10 +125,10 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
134
125
|
case wgpu::FeatureName::R8UnormStorage:
|
|
135
126
|
*outUnion = "r8unorm-storage";
|
|
136
127
|
break;
|
|
137
|
-
case wgpu::FeatureName::
|
|
128
|
+
case wgpu::FeatureName::DawnFormatCapabilities:
|
|
138
129
|
*outUnion = "format-capabilities";
|
|
139
130
|
break;
|
|
140
|
-
case wgpu::FeatureName::
|
|
131
|
+
case wgpu::FeatureName::DawnDrmFormatCapabilities:
|
|
141
132
|
*outUnion = "drm-format-capabilities";
|
|
142
133
|
break;
|
|
143
134
|
case wgpu::FeatureName::Norm16TextureFormats:
|
|
@@ -185,7 +176,7 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
185
176
|
case wgpu::FeatureName::SharedFenceVkSemaphoreOpaqueFD:
|
|
186
177
|
*outUnion = "shared-fence-vk-semaphore-opaque-fd";
|
|
187
178
|
break;
|
|
188
|
-
case wgpu::FeatureName::
|
|
179
|
+
case wgpu::FeatureName::SharedFenceSyncFD:
|
|
189
180
|
*outUnion = "shared-fence-vk-semaphore-sync-fd";
|
|
190
181
|
break;
|
|
191
182
|
case wgpu::FeatureName::SharedFenceVkSemaphoreZirconHandle:
|
|
@@ -87,8 +87,8 @@ void GPUQueue::copyExternalImageToTexture(
|
|
|
87
87
|
std::shared_ptr<GPUImageCopyExternalImage> source,
|
|
88
88
|
std::shared_ptr<GPUImageCopyTextureTagged> destination,
|
|
89
89
|
std::shared_ptr<GPUExtent3D> size) {
|
|
90
|
-
wgpu::
|
|
91
|
-
wgpu::
|
|
90
|
+
wgpu::TexelCopyTextureInfo dst{};
|
|
91
|
+
wgpu::TexelCopyBufferLayout layout{};
|
|
92
92
|
wgpu::Extent3D sz{};
|
|
93
93
|
Convertor conv;
|
|
94
94
|
uint32_t bytesPerPixel =
|
|
@@ -137,8 +137,8 @@ void GPUQueue::writeTexture(std::shared_ptr<GPUImageCopyTexture> destination,
|
|
|
137
137
|
std::shared_ptr<ArrayBuffer> data,
|
|
138
138
|
std::shared_ptr<GPUImageDataLayout> dataLayout,
|
|
139
139
|
std::shared_ptr<GPUExtent3D> size) {
|
|
140
|
-
wgpu::
|
|
141
|
-
wgpu::
|
|
140
|
+
wgpu::TexelCopyTextureInfo dst{};
|
|
141
|
+
wgpu::TexelCopyBufferLayout layout{};
|
|
142
142
|
wgpu::Extent3D sz{};
|
|
143
143
|
Convertor conv;
|
|
144
144
|
if (!conv(dst, destination) || //
|
|
@@ -25,9 +25,6 @@ GPUShaderModule::getCompilationInfo() {
|
|
|
25
25
|
message.linePos = wgpuMessage.linePos;
|
|
26
26
|
message.offset = wgpuMessage.offset;
|
|
27
27
|
message.length = wgpuMessage.length;
|
|
28
|
-
message.utf16LinePos = wgpuMessage.utf16LinePos;
|
|
29
|
-
message.utf16Offset = wgpuMessage.utf16Offset;
|
|
30
|
-
message.utf16Length = wgpuMessage.utf16Length;
|
|
31
28
|
result->_messages.push_back(std::move(message));
|
|
32
29
|
}
|
|
33
30
|
}
|
|
@@ -3,131 +3,127 @@
|
|
|
3
3
|
namespace rnwgpu {
|
|
4
4
|
|
|
5
5
|
double GPUSupportedLimits::getMaxTextureDimension1D() {
|
|
6
|
-
return _instance.
|
|
6
|
+
return _instance.maxTextureDimension1D;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
double GPUSupportedLimits::getMaxTextureDimension2D() {
|
|
10
|
-
return _instance.
|
|
10
|
+
return _instance.maxTextureDimension2D;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
double GPUSupportedLimits::getMaxTextureDimension3D() {
|
|
14
|
-
return _instance.
|
|
14
|
+
return _instance.maxTextureDimension3D;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
double GPUSupportedLimits::getMaxTextureArrayLayers() {
|
|
18
|
-
return _instance.
|
|
18
|
+
return _instance.maxTextureArrayLayers;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
double GPUSupportedLimits::getMaxBindGroups() {
|
|
22
|
-
return _instance.
|
|
22
|
+
return _instance.maxBindGroups;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
double GPUSupportedLimits::getMaxBindGroupsPlusVertexBuffers() {
|
|
26
|
-
return _instance.
|
|
26
|
+
return _instance.maxBindGroupsPlusVertexBuffers;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
double GPUSupportedLimits::getMaxBindingsPerBindGroup() {
|
|
30
|
-
return _instance.
|
|
30
|
+
return _instance.maxBindingsPerBindGroup;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
double GPUSupportedLimits::getMaxDynamicUniformBuffersPerPipelineLayout() {
|
|
34
|
-
return _instance.
|
|
34
|
+
return _instance.maxDynamicUniformBuffersPerPipelineLayout;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
double GPUSupportedLimits::getMaxDynamicStorageBuffersPerPipelineLayout() {
|
|
38
|
-
return _instance.
|
|
38
|
+
return _instance.maxDynamicStorageBuffersPerPipelineLayout;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
double GPUSupportedLimits::getMaxSampledTexturesPerShaderStage() {
|
|
42
|
-
return _instance.
|
|
42
|
+
return _instance.maxSampledTexturesPerShaderStage;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
double GPUSupportedLimits::getMaxSamplersPerShaderStage() {
|
|
46
|
-
return _instance.
|
|
46
|
+
return _instance.maxSamplersPerShaderStage;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
double GPUSupportedLimits::getMaxStorageBuffersPerShaderStage() {
|
|
50
|
-
return _instance.
|
|
50
|
+
return _instance.maxStorageBuffersPerShaderStage;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
double GPUSupportedLimits::getMaxStorageTexturesPerShaderStage() {
|
|
54
|
-
return _instance.
|
|
54
|
+
return _instance.maxStorageTexturesPerShaderStage;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
double GPUSupportedLimits::getMaxUniformBuffersPerShaderStage() {
|
|
58
|
-
return _instance.
|
|
58
|
+
return _instance.maxUniformBuffersPerShaderStage;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
double GPUSupportedLimits::getMaxUniformBufferBindingSize() {
|
|
62
|
-
return _instance.
|
|
62
|
+
return _instance.maxUniformBufferBindingSize;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
double GPUSupportedLimits::getMaxStorageBufferBindingSize() {
|
|
66
|
-
return _instance.
|
|
66
|
+
return _instance.maxStorageBufferBindingSize;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
double GPUSupportedLimits::getMinUniformBufferOffsetAlignment() {
|
|
70
|
-
return _instance.
|
|
70
|
+
return _instance.minUniformBufferOffsetAlignment;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
double GPUSupportedLimits::getMinStorageBufferOffsetAlignment() {
|
|
74
|
-
return _instance.
|
|
74
|
+
return _instance.minStorageBufferOffsetAlignment;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
double GPUSupportedLimits::getMaxVertexBuffers() {
|
|
78
|
-
return _instance.
|
|
78
|
+
return _instance.maxVertexBuffers;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
double GPUSupportedLimits::getMaxBufferSize() {
|
|
82
|
-
return _instance.
|
|
82
|
+
return _instance.maxBufferSize;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
double GPUSupportedLimits::getMaxVertexAttributes() {
|
|
86
|
-
return _instance.
|
|
86
|
+
return _instance.maxVertexAttributes;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
double GPUSupportedLimits::getMaxVertexBufferArrayStride() {
|
|
90
|
-
return _instance.
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
double GPUSupportedLimits::getMaxInterStageShaderComponents() {
|
|
94
|
-
return _instance.limits.maxInterStageShaderComponents;
|
|
90
|
+
return _instance.maxVertexBufferArrayStride;
|
|
95
91
|
}
|
|
96
92
|
|
|
97
93
|
double GPUSupportedLimits::getMaxInterStageShaderVariables() {
|
|
98
|
-
return _instance.
|
|
94
|
+
return _instance.maxInterStageShaderVariables;
|
|
99
95
|
}
|
|
100
96
|
|
|
101
97
|
double GPUSupportedLimits::getMaxColorAttachments() {
|
|
102
|
-
return _instance.
|
|
98
|
+
return _instance.maxColorAttachments;
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
double GPUSupportedLimits::getMaxColorAttachmentBytesPerSample() {
|
|
106
|
-
return _instance.
|
|
102
|
+
return _instance.maxColorAttachmentBytesPerSample;
|
|
107
103
|
}
|
|
108
104
|
|
|
109
105
|
double GPUSupportedLimits::getMaxComputeWorkgroupStorageSize() {
|
|
110
|
-
return _instance.
|
|
106
|
+
return _instance.maxComputeWorkgroupStorageSize;
|
|
111
107
|
}
|
|
112
108
|
|
|
113
109
|
double GPUSupportedLimits::getMaxComputeInvocationsPerWorkgroup() {
|
|
114
|
-
return _instance.
|
|
110
|
+
return _instance.maxComputeInvocationsPerWorkgroup;
|
|
115
111
|
}
|
|
116
112
|
|
|
117
113
|
double GPUSupportedLimits::getMaxComputeWorkgroupSizeX() {
|
|
118
|
-
return _instance.
|
|
114
|
+
return _instance.maxComputeWorkgroupSizeX;
|
|
119
115
|
}
|
|
120
116
|
|
|
121
117
|
double GPUSupportedLimits::getMaxComputeWorkgroupSizeY() {
|
|
122
|
-
return _instance.
|
|
118
|
+
return _instance.maxComputeWorkgroupSizeY;
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
double GPUSupportedLimits::getMaxComputeWorkgroupSizeZ() {
|
|
126
|
-
return _instance.
|
|
122
|
+
return _instance.maxComputeWorkgroupSizeZ;
|
|
127
123
|
}
|
|
128
124
|
|
|
129
125
|
double GPUSupportedLimits::getMaxComputeWorkgroupsPerDimension() {
|
|
130
|
-
return _instance.
|
|
126
|
+
return _instance.maxComputeWorkgroupsPerDimension;
|
|
131
127
|
}
|
|
132
128
|
|
|
133
129
|
} // namespace rnwgpu
|
|
@@ -16,7 +16,7 @@ namespace m = margelo;
|
|
|
16
16
|
|
|
17
17
|
class GPUSupportedLimits : public m::HybridObject {
|
|
18
18
|
public:
|
|
19
|
-
explicit GPUSupportedLimits(wgpu::
|
|
19
|
+
explicit GPUSupportedLimits(wgpu::Limits instance)
|
|
20
20
|
: HybridObject("GPUSupportedLimits"), _instance(instance) {}
|
|
21
21
|
|
|
22
22
|
public:
|
|
@@ -44,7 +44,6 @@ public:
|
|
|
44
44
|
double getMaxBufferSize();
|
|
45
45
|
double getMaxVertexAttributes();
|
|
46
46
|
double getMaxVertexBufferArrayStride();
|
|
47
|
-
double getMaxInterStageShaderComponents();
|
|
48
47
|
double getMaxInterStageShaderVariables();
|
|
49
48
|
double getMaxColorAttachments();
|
|
50
49
|
double getMaxColorAttachmentBytesPerSample();
|
|
@@ -117,9 +116,6 @@ public:
|
|
|
117
116
|
registerHybridGetter("maxVertexBufferArrayStride",
|
|
118
117
|
&GPUSupportedLimits::getMaxVertexBufferArrayStride,
|
|
119
118
|
this);
|
|
120
|
-
registerHybridGetter("maxInterStageShaderComponents",
|
|
121
|
-
&GPUSupportedLimits::getMaxInterStageShaderComponents,
|
|
122
|
-
this);
|
|
123
119
|
registerHybridGetter("maxInterStageShaderVariables",
|
|
124
120
|
&GPUSupportedLimits::getMaxInterStageShaderVariables,
|
|
125
121
|
this);
|
|
@@ -148,10 +144,10 @@ public:
|
|
|
148
144
|
&GPUSupportedLimits::getMaxComputeWorkgroupsPerDimension, this);
|
|
149
145
|
}
|
|
150
146
|
|
|
151
|
-
inline const wgpu::
|
|
147
|
+
inline const wgpu::Limits get() { return _instance; }
|
|
152
148
|
|
|
153
149
|
private:
|
|
154
|
-
wgpu::
|
|
150
|
+
wgpu::Limits _instance;
|
|
155
151
|
};
|
|
156
152
|
|
|
157
153
|
} // namespace rnwgpu
|
|
@@ -434,8 +434,6 @@ static void convertJSUnionToEnum(const std::string &inUnion,
|
|
|
434
434
|
*outEnum = wgpu::FeatureName::Float32Filterable;
|
|
435
435
|
} else if (inUnion == "subgroups") {
|
|
436
436
|
*outEnum = wgpu::FeatureName::Subgroups;
|
|
437
|
-
} else if (inUnion == "subgroups-f16") {
|
|
438
|
-
*outEnum = wgpu::FeatureName::SubgroupsF16;
|
|
439
437
|
} else if (inUnion == "dawn-internal-usages") {
|
|
440
438
|
*outEnum = wgpu::FeatureName::DawnInternalUsages;
|
|
441
439
|
} else if (inUnion == "dawn-multi-planar-formats") {
|
|
@@ -456,10 +454,8 @@ static void convertJSUnionToEnum(const std::string &inUnion,
|
|
|
456
454
|
*outEnum = wgpu::FeatureName::D3D11MultithreadProtected;
|
|
457
455
|
} else if (inUnion == "angle-texture-sharing") {
|
|
458
456
|
*outEnum = wgpu::FeatureName::ANGLETextureSharing;
|
|
459
|
-
} else if (inUnion == "chromium-experimental-subgroups") {
|
|
460
|
-
*outEnum = wgpu::FeatureName::
|
|
461
|
-
} else if (inUnion == "chromium-experimental-subgroup-uniform-control-flow") {
|
|
462
|
-
*outEnum = wgpu::FeatureName::ChromiumExperimentalSubgroupUniformControlFlow;
|
|
457
|
+
} else if (inUnion == "chromium-experimental-subgroups-matrix") {
|
|
458
|
+
*outEnum = wgpu::FeatureName::ChromiumExperimentalSubgroupMatrix;
|
|
463
459
|
} else if (inUnion == "pixel-local-storage-coherent") {
|
|
464
460
|
*outEnum = wgpu::FeatureName::PixelLocalStorageCoherent;
|
|
465
461
|
} else if (inUnion == "pixel-local-storage-non-coherent") {
|
|
@@ -490,10 +486,8 @@ static void convertJSUnionToEnum(const std::string &inUnion,
|
|
|
490
486
|
*outEnum = wgpu::FeatureName::AdapterPropertiesVk;
|
|
491
487
|
} else if (inUnion == "r8unorm-storage") {
|
|
492
488
|
*outEnum = wgpu::FeatureName::R8UnormStorage;
|
|
493
|
-
} else if (inUnion == "format-capabilities") {
|
|
494
|
-
*outEnum = wgpu::FeatureName::
|
|
495
|
-
} else if (inUnion == "drm-format-capabilities") {
|
|
496
|
-
*outEnum = wgpu::FeatureName::DrmFormatCapabilities;
|
|
489
|
+
} else if (inUnion == "dawn-format-capabilities") {
|
|
490
|
+
*outEnum = wgpu::FeatureName::DawnFormatCapabilities;
|
|
497
491
|
} else if (inUnion == "norm16-texture-formats") {
|
|
498
492
|
*outEnum = wgpu::FeatureName::Norm16TextureFormats;
|
|
499
493
|
} else if (inUnion == "multi-planar-format-nv16") {
|
|
@@ -524,8 +518,6 @@ static void convertJSUnionToEnum(const std::string &inUnion,
|
|
|
524
518
|
*outEnum = wgpu::FeatureName::SharedTextureMemoryEGLImage;
|
|
525
519
|
} else if (inUnion == "shared-fence-vk-semaphore-opaque-fd") {
|
|
526
520
|
*outEnum = wgpu::FeatureName::SharedFenceVkSemaphoreOpaqueFD;
|
|
527
|
-
} else if (inUnion == "shared-fence-vk-semaphore-sync-fd") {
|
|
528
|
-
*outEnum = wgpu::FeatureName::SharedFenceVkSemaphoreSyncFD;
|
|
529
521
|
} else if (inUnion == "shared-fence-vk-semaphore-zircon-handle") {
|
|
530
522
|
*outEnum = wgpu::FeatureName::SharedFenceVkSemaphoreZirconHandle;
|
|
531
523
|
} else if (inUnion == "shared-fence-dxgi-shared-handle") {
|
|
@@ -588,9 +580,6 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
588
580
|
case wgpu::FeatureName::Subgroups:
|
|
589
581
|
*outUnion = "subgroups";
|
|
590
582
|
break;
|
|
591
|
-
case wgpu::FeatureName::SubgroupsF16:
|
|
592
|
-
*outUnion = "subgroups-f16";
|
|
593
|
-
break;
|
|
594
583
|
case wgpu::FeatureName::DawnInternalUsages:
|
|
595
584
|
*outUnion = "dawn-internal-usages";
|
|
596
585
|
break;
|
|
@@ -624,11 +613,8 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
624
613
|
case wgpu::FeatureName::ANGLETextureSharing:
|
|
625
614
|
*outUnion = "angle-texture-sharing";
|
|
626
615
|
break;
|
|
627
|
-
|
|
628
|
-
*outUnion = "chromium-experimental-subgroups";
|
|
629
|
-
break;
|
|
630
|
-
case wgpu::FeatureName::ChromiumExperimentalSubgroupUniformControlFlow:
|
|
631
|
-
*outUnion = "chromium-experimental-subgroup-uniform-control-flow";
|
|
616
|
+
case wgpu::FeatureName::ChromiumExperimentalSubgroupMatrix:
|
|
617
|
+
*outUnion = "chromium-experimental-subgroups-matrix";
|
|
632
618
|
break;
|
|
633
619
|
case wgpu::FeatureName::PixelLocalStorageCoherent:
|
|
634
620
|
*outUnion = "pixel-local-storage-coherent";
|
|
@@ -675,11 +661,8 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
675
661
|
case wgpu::FeatureName::R8UnormStorage:
|
|
676
662
|
*outUnion = "r8unorm-storage";
|
|
677
663
|
break;
|
|
678
|
-
case wgpu::FeatureName::
|
|
679
|
-
*outUnion = "format-capabilities";
|
|
680
|
-
break;
|
|
681
|
-
case wgpu::FeatureName::DrmFormatCapabilities:
|
|
682
|
-
*outUnion = "drm-format-capabilities";
|
|
664
|
+
case wgpu::FeatureName::DawnFormatCapabilities:
|
|
665
|
+
*outUnion = "dawn-format-capabilities";
|
|
683
666
|
break;
|
|
684
667
|
case wgpu::FeatureName::Norm16TextureFormats:
|
|
685
668
|
*outUnion = "norm16-texture-formats";
|
|
@@ -726,9 +709,6 @@ static void convertEnumToJSUnion(wgpu::FeatureName inEnum,
|
|
|
726
709
|
case wgpu::FeatureName::SharedFenceVkSemaphoreOpaqueFD:
|
|
727
710
|
*outUnion = "shared-fence-vk-semaphore-opaque-fd";
|
|
728
711
|
break;
|
|
729
|
-
case wgpu::FeatureName::SharedFenceVkSemaphoreSyncFD:
|
|
730
|
-
*outUnion = "shared-fence-vk-semaphore-sync-fd";
|
|
731
|
-
break;
|
|
732
712
|
case wgpu::FeatureName::SharedFenceVkSemaphoreZirconHandle:
|
|
733
713
|
*outUnion = "shared-fence-vk-semaphore-zircon-handle";
|
|
734
714
|
break;
|