@nativescript/canvas 2.0.0-webgpu.14 → 2.0.0-webgpu.16
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/ImageBitmap/index.js +6 -2
- package/ImageBitmap/index.js.map +1 -1
- package/WebGPU/GPUCanvasContext.d.ts +1 -1
- package/WebGPU/GPUCanvasContext.js +12 -2
- package/WebGPU/GPUCanvasContext.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +2 -2
- package/WebGPU/GPUDevice.js +4 -0
- package/WebGPU/GPUDevice.js.map +1 -1
- package/angular/esm2022/index.mjs +4 -4
- package/angular/fesm2022/nativescript-canvas-angular.mjs +4 -4
- package/package.json +1 -1
- 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/canvas_native.h +3 -3
- 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 +128 -128
- 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/canvas_native.h +3 -3
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +2 -2
- 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 +591 -591
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +488 -488
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +0 -1
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +3 -6
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +2 -4
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +4 -3
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.cpp +4 -3
|
@@ -282,7 +282,6 @@ void GPUCommandEncoderImpl::BeginRenderPass(const v8::FunctionCallbackInfo<v8::V
|
|
|
282
282
|
|
|
283
283
|
v8::Local<v8::Value> viewVal;
|
|
284
284
|
|
|
285
|
-
|
|
286
285
|
if (colorAttachment->Get(context, ConvertToV8String(isolate,
|
|
287
286
|
"view")).ToLocal(&viewVal)) {
|
|
288
287
|
auto type = GetNativeType(viewVal);
|
|
@@ -1294,8 +1294,6 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1294
1294
|
}
|
|
1295
1295
|
auto options = optionsVal.As<v8::Object>();
|
|
1296
1296
|
|
|
1297
|
-
GPULabel label;
|
|
1298
|
-
|
|
1299
1297
|
v8::Local<v8::Value> stencilValue;
|
|
1300
1298
|
options->Get(context, ConvertToV8String(isolate, "depthStencil")).ToLocal(
|
|
1301
1299
|
&stencilValue);
|
|
@@ -1707,9 +1705,9 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1707
1705
|
&labelVal);
|
|
1708
1706
|
|
|
1709
1707
|
|
|
1710
|
-
label = GPULabel(isolate, labelVal);
|
|
1708
|
+
auto label = GPULabel(isolate, labelVal);
|
|
1709
|
+
|
|
1711
1710
|
|
|
1712
|
-
|
|
1713
1711
|
descriptor.label = *label;
|
|
1714
1712
|
|
|
1715
1713
|
|
|
@@ -2628,7 +2626,7 @@ void GPUDeviceImpl::CreateRenderPipelineAsync(const v8::FunctionCallbackInfo<v8:
|
|
|
2628
2626
|
label = GPULabel(isolate, labelVal);
|
|
2629
2627
|
|
|
2630
2628
|
descriptor.label = *label;
|
|
2631
|
-
|
|
2629
|
+
|
|
2632
2630
|
|
|
2633
2631
|
|
|
2634
2632
|
v8::Local<v8::Value> layoutVal;
|
|
@@ -3547,7 +3545,6 @@ void GPUDeviceImpl::CreateTexture(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3547
3545
|
|
|
3548
3546
|
if (dimensionVal->IsString()) {
|
|
3549
3547
|
auto dimension = ConvertFromV8String(isolate, dimensionVal);
|
|
3550
|
-
|
|
3551
3548
|
// todo use enum
|
|
3552
3549
|
if (dimension == "1d") {
|
|
3553
3550
|
descriptor.dimension = CanvasTextureDimension::CanvasTextureDimensionD1;
|
|
@@ -259,7 +259,7 @@ void GPUQueueImpl::CopyExternalImageToTexture(const v8::FunctionCallbackInfo<v8:
|
|
|
259
259
|
|
|
260
260
|
|
|
261
261
|
CanvasExtent3d extent3D = ParseExtent3d(isolate, sizeVal);
|
|
262
|
-
|
|
262
|
+
|
|
263
263
|
if (imageAsset != nullptr){
|
|
264
264
|
CanvasImageCopyImageAsset source{
|
|
265
265
|
imageAsset,
|
|
@@ -273,7 +273,7 @@ void GPUQueueImpl::CopyExternalImageToTexture(const v8::FunctionCallbackInfo<v8:
|
|
|
273
273
|
&extent3D);
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
|
|
277
277
|
|
|
278
278
|
auto data = canvas_native_u8_buffer_get_bytes(buffer);
|
|
279
279
|
auto size = canvas_native_u8_buffer_get_length(buffer);
|
|
@@ -449,8 +449,6 @@ void GPUQueueImpl::WriteTexture(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
449
449
|
auto isolate = args.GetIsolate();
|
|
450
450
|
auto context = isolate->GetCurrentContext();
|
|
451
451
|
|
|
452
|
-
bool flipY = false;
|
|
453
|
-
|
|
454
452
|
|
|
455
453
|
auto destinationVal = args[0];
|
|
456
454
|
auto dataVal = args[1];
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#include "GPUBufferImpl.h"
|
|
9
9
|
#include "GPURenderBundleImpl.h"
|
|
10
10
|
#include "GPUBindGroupImpl.h"
|
|
11
|
+
#include "GPULabel.h"
|
|
11
12
|
|
|
12
13
|
GPURenderBundleEncoderImpl::GPURenderBundleEncoderImpl(const CanvasGPURenderBundleEncoder *encoder)
|
|
13
14
|
: encoder_(
|
|
@@ -287,7 +288,7 @@ void GPURenderBundleEncoderImpl::Finish(const v8::FunctionCallbackInfo<v8::Value
|
|
|
287
288
|
auto isolate = args.GetIsolate();
|
|
288
289
|
auto context = isolate->GetCurrentContext();
|
|
289
290
|
|
|
290
|
-
|
|
291
|
+
GPULabel label;
|
|
291
292
|
v8::Local<v8::Value> labelVal;
|
|
292
293
|
|
|
293
294
|
auto optionsVal = args[0];
|
|
@@ -296,11 +297,11 @@ void GPURenderBundleEncoderImpl::Finish(const v8::FunctionCallbackInfo<v8::Value
|
|
|
296
297
|
auto options = optionsVal.As<v8::Object>();
|
|
297
298
|
options->Get(context, ConvertToV8String(isolate, "label")).ToLocal(&labelVal);
|
|
298
299
|
|
|
299
|
-
label =
|
|
300
|
+
label = GPULabel(isolate, labelVal);
|
|
300
301
|
}
|
|
301
302
|
|
|
302
303
|
|
|
303
|
-
auto bundle = canvas_native_webgpu_render_bundle_encoder_finish(ptr->GetEncoder(), label
|
|
304
|
+
auto bundle = canvas_native_webgpu_render_bundle_encoder_finish(ptr->GetEncoder(), *label);
|
|
304
305
|
|
|
305
306
|
if (bundle != nullptr) {
|
|
306
307
|
auto ret = GPURenderBundleImpl::NewInstance(isolate, new GPURenderBundleImpl(bundle));
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
#include "GPUTextureImpl.h"
|
|
6
6
|
#include "Caches.h"
|
|
7
7
|
#include "GPUTextureViewImpl.h"
|
|
8
|
+
#include "GPULabel.h"
|
|
8
9
|
|
|
9
10
|
GPUTextureImpl::GPUTextureImpl(const CanvasGPUTexture *texture) : texture_(texture) {}
|
|
10
11
|
|
|
@@ -274,7 +275,7 @@ void GPUTextureImpl::CreateView(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
274
275
|
aspect, 0, -1, 0, -1
|
|
275
276
|
};
|
|
276
277
|
|
|
277
|
-
|
|
278
|
+
GPULabel label;
|
|
278
279
|
|
|
279
280
|
if (descVal->IsObject()) {
|
|
280
281
|
descriptor = new CanvasCreateTextureViewDescriptor{};
|
|
@@ -341,9 +342,9 @@ void GPUTextureImpl::CreateView(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
341
342
|
v8::Local<v8::Value> labelVal;
|
|
342
343
|
descObj->Get(context, ConvertToV8String(isolate, "label")).ToLocal(&labelVal);
|
|
343
344
|
|
|
344
|
-
label =
|
|
345
|
+
label = GPULabel(isolate, labelVal);
|
|
345
346
|
|
|
346
|
-
descriptor->label = label
|
|
347
|
+
descriptor->label = *label;
|
|
347
348
|
|
|
348
349
|
v8::Local<v8::Value> dimensionVal;
|
|
349
350
|
if (descObj->Get(context, ConvertToV8String(isolate, "dimension")).ToLocal(&dimensionVal)) {
|