@nativescript/canvas 2.0.0-webgpu.10 → 2.0.0-webgpu.11
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/WebGPU/GPUQueue.js +8 -0
- package/WebGPU/GPUQueue.js.map +1 -1
- package/WebGPU/GPURenderBundleEncoder.d.ts +3 -2
- package/WebGPU/GPURenderBundleEncoder.js +4 -3
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -1
- 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/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 +110 -110
- 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/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 +580 -580
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +559 -559
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +12 -9
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +1 -1
|
@@ -190,12 +190,16 @@ void GPURenderBundleEncoderImpl::DrawIndexed(const v8::FunctionCallbackInfo<v8::
|
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
auto indexCountVal = args[0];
|
|
193
|
-
auto
|
|
194
|
-
auto
|
|
195
|
-
auto
|
|
193
|
+
auto instanceCountVal = args[1];
|
|
194
|
+
auto firstIndexVal = args[2];
|
|
195
|
+
auto baseVertexVal = args[3];
|
|
196
|
+
auto firstInstanceVal = args[4];
|
|
196
197
|
|
|
197
198
|
if (indexCountVal->IsUint32()) {
|
|
198
199
|
|
|
200
|
+
if (instanceCountVal->IsUint32()) {
|
|
201
|
+
instanceCount = instanceCountVal.As<v8::Uint32>()->Value();
|
|
202
|
+
}
|
|
199
203
|
|
|
200
204
|
if (firstIndexVal->IsUint32()) {
|
|
201
205
|
firstIndex = firstIndexVal.As<v8::Uint32>()->Value();
|
|
@@ -370,7 +374,7 @@ void GPURenderBundleEncoderImpl::SetBindGroup(const v8::FunctionCallbackInfo<v8:
|
|
|
370
374
|
auto index = indexVal->Uint32Value(context).FromJust();
|
|
371
375
|
auto bindGroup = GPUBindGroupImpl::GetPointer(bindGroupVal.As<v8::Object>());
|
|
372
376
|
|
|
373
|
-
if (dynamicOffsets->
|
|
377
|
+
if (dynamicOffsets->IsUint32Array()) {
|
|
374
378
|
auto buf = dynamicOffsets.As<v8::Uint32Array>();
|
|
375
379
|
auto buffer = buf->Buffer();
|
|
376
380
|
auto store = buffer->GetBackingStore();
|
|
@@ -399,7 +403,6 @@ void GPURenderBundleEncoderImpl::SetIndexBuffer(const v8::FunctionCallbackInfo<v
|
|
|
399
403
|
}
|
|
400
404
|
|
|
401
405
|
auto isolate = args.GetIsolate();
|
|
402
|
-
auto context = isolate->GetCurrentContext();
|
|
403
406
|
|
|
404
407
|
auto bufferVal = args[0];
|
|
405
408
|
auto indexFormatVal = args[1];
|
|
@@ -410,7 +413,7 @@ void GPURenderBundleEncoderImpl::SetIndexBuffer(const v8::FunctionCallbackInfo<v
|
|
|
410
413
|
|
|
411
414
|
auto type = GetNativeType(bufferVal);
|
|
412
415
|
|
|
413
|
-
if (type == NativeType::
|
|
416
|
+
if (type == NativeType::GPUBuffer) {
|
|
414
417
|
auto buffer = GPUBufferImpl::GetPointer(bufferVal.As<v8::Object>());
|
|
415
418
|
auto indexFormat = ConvertFromV8String(isolate, indexFormatVal);
|
|
416
419
|
if (offsetVal->IsNumber()) {
|
|
@@ -446,7 +449,7 @@ void GPURenderBundleEncoderImpl::SetPipeline(const v8::FunctionCallbackInfo<v8::
|
|
|
446
449
|
}
|
|
447
450
|
|
|
448
451
|
auto pipelineVal = args[0];
|
|
449
|
-
if
|
|
452
|
+
if(GetNativeType(pipelineVal) == NativeType::GPURenderPipeline){
|
|
450
453
|
auto pipeline = GPURenderPipelineImpl::GetPointer(pipelineVal.As<v8::Object>());
|
|
451
454
|
if (pipeline != nullptr) {
|
|
452
455
|
canvas_native_webgpu_render_bundle_encoder_set_pipeline(ptr->GetEncoder(),
|
|
@@ -470,11 +473,11 @@ void GPURenderBundleEncoderImpl::SetVertexBuffer(const v8::FunctionCallbackInfo<
|
|
|
470
473
|
|
|
471
474
|
if (slotVal->IsUint32() && bufferVal->IsObject()) {
|
|
472
475
|
auto slot = slotVal.As<v8::Uint32>()->Value();
|
|
473
|
-
|
|
474
|
-
if (buffer == nullptr) {
|
|
476
|
+
if (GetNativeType(bufferVal) != NativeType::GPUBuffer) {
|
|
475
477
|
// todo throw ??
|
|
476
478
|
return;
|
|
477
479
|
}
|
|
480
|
+
auto buffer = GPUBufferImpl::GetPointer(bufferVal.As<v8::Object>());
|
|
478
481
|
|
|
479
482
|
if (offsetVal->IsNumber()) {
|
|
480
483
|
offset = (int64_t) offsetVal.As<v8::Number>()->Value();
|
|
@@ -354,7 +354,7 @@ void GPURenderPassEncoderImpl::ExecuteBundles(const v8::FunctionCallbackInfo<v8:
|
|
|
354
354
|
std::vector<const CanvasGPURenderBundle *> bundles;
|
|
355
355
|
for (int i = 0; i < len; i++) {
|
|
356
356
|
v8::Local<v8::Value> bundleVal;
|
|
357
|
-
bundlesArray->Get(context, i).ToLocal(&
|
|
357
|
+
bundlesArray->Get(context, i).ToLocal(&bundleVal);
|
|
358
358
|
auto type = GetNativeType(bundleVal);
|
|
359
359
|
if (type == NativeType::GPURenderBundle) {
|
|
360
360
|
auto bundle = GPURenderBundleImpl::GetPointer(bundleVal.As<v8::Object>());
|