@nativescript/canvas 2.0.0-webgpu.33 → 2.0.0-webgpu.35
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/index.android.js +12 -2
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.ios.d.ts +7 -1
- package/Canvas/index.ios.js +63 -19
- package/Canvas/index.ios.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.js +1 -1
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/GPUDevice.js +17 -18
- package/WebGPU/GPUDevice.js.map +1 -1
- package/angular/esm2022/index.mjs +4 -4
- package/angular/fesm2022/nativescript-canvas-angular.mjs +4 -4
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/index.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/CanvasNative.framework/Headers/CanvasNative-Swift.h +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2 -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 +7997 -7178
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +5 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +5 -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 +681 -671
- 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 +4 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2 -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 +7997 -7178
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +5 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +5 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +7997 -7178
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +5 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +5 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +24 -24
- 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 +683 -673
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +736 -726
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +11 -12
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +42 -37
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +33 -33
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +26 -23
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +26 -23
- package/utils.d.ts +1 -1
|
@@ -233,7 +233,7 @@ void CanvasJSIModule::Create2DContext(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
233
233
|
auto context = isolate->GetCurrentContext();
|
|
234
234
|
auto ptr = args[0].As<v8::BigInt>()->Int64Value();
|
|
235
235
|
|
|
236
|
-
auto context_2d = static_cast<CanvasRenderingContext2D *>((void *)ptr);
|
|
236
|
+
auto context_2d = static_cast<CanvasRenderingContext2D *>((void *) ptr);
|
|
237
237
|
|
|
238
238
|
auto ret = CanvasRenderingContext2DImpl::NewInstance(isolate, new CanvasRenderingContext2DImpl(
|
|
239
239
|
context_2d));
|
|
@@ -358,7 +358,7 @@ void CanvasJSIModule::CreateImageBitmap(const v8::FunctionCallbackInfo<v8::Value
|
|
|
358
358
|
isolate, ta);
|
|
359
359
|
|
|
360
360
|
auto callback = new AsyncCallback(isolate, cbFunc, [](bool done, void *data) {
|
|
361
|
-
if(data == nullptr){return;}
|
|
361
|
+
if (data == nullptr) { return; }
|
|
362
362
|
auto async_data = static_cast<AsyncCallback *>(data);
|
|
363
363
|
auto func = async_data->inner_.get();
|
|
364
364
|
if (func != nullptr && func->isolate_ != nullptr) {
|
|
@@ -598,7 +598,7 @@ void CanvasJSIModule::Create2DContextWithPointer(const v8::FunctionCallbackInfo<
|
|
|
598
598
|
|
|
599
599
|
struct FileData {
|
|
600
600
|
char *error_;
|
|
601
|
-
U8Buffer*
|
|
601
|
+
U8Buffer *data;
|
|
602
602
|
|
|
603
603
|
~FileData() {
|
|
604
604
|
if (error_ != nullptr) {
|
|
@@ -615,7 +615,7 @@ void CanvasJSIModule::ReadFile(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
615
615
|
|
|
616
616
|
|
|
617
617
|
auto callback = new AsyncCallback(isolate, cbFunc, [](bool done, void *data) {
|
|
618
|
-
if(data == nullptr){return;}
|
|
618
|
+
if (data == nullptr) { return; }
|
|
619
619
|
auto async_data = static_cast<AsyncCallback *>(data);
|
|
620
620
|
auto func = async_data->inner_.get();
|
|
621
621
|
if (func != nullptr && func->isolate_ != nullptr) {
|
|
@@ -624,12 +624,12 @@ void CanvasJSIModule::ReadFile(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
624
624
|
v8::Isolate::Scope isolate_scope(isolate);
|
|
625
625
|
v8::HandleScope handle_scope(isolate);
|
|
626
626
|
v8::Local<v8::Function> callback = func->callback_.Get(
|
|
627
|
-
|
|
627
|
+
isolate);
|
|
628
628
|
v8::Local<v8::Context> context = callback->GetCreationContextChecked();
|
|
629
629
|
v8::Context::Scope context_scope(context);
|
|
630
630
|
|
|
631
631
|
if (func->data != nullptr) {
|
|
632
|
-
auto file_data = static_cast<FileData*>(func->data);
|
|
632
|
+
auto file_data = static_cast<FileData *>(func->data);
|
|
633
633
|
|
|
634
634
|
v8::Local<v8::Value> args[2];
|
|
635
635
|
|
|
@@ -701,11 +701,11 @@ void CanvasJSIModule::ReadFile(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
701
701
|
|
|
702
702
|
if (!canvas_native_helper_read_file_has_error(ret)) {
|
|
703
703
|
auto buf = canvas_native_helper_read_file_take_data(ret);
|
|
704
|
-
callback->inner_->data = new FileData
|
|
704
|
+
callback->inner_->data = new FileData{nullptr, buf};
|
|
705
705
|
done = true;
|
|
706
706
|
} else {
|
|
707
707
|
auto error = canvas_native_helper_read_file_get_error(ret);
|
|
708
|
-
callback->inner_->data = new FileData
|
|
708
|
+
callback->inner_->data = new FileData{const_cast<char *>(error), nullptr};
|
|
709
709
|
}
|
|
710
710
|
canvas_native_helper_release(ret);
|
|
711
711
|
callback->execute(done);
|
|
@@ -714,7 +714,6 @@ void CanvasJSIModule::ReadFile(const v8::FunctionCallbackInfo<v8::Value> &args)
|
|
|
714
714
|
thread.detach();
|
|
715
715
|
|
|
716
716
|
|
|
717
|
-
|
|
718
717
|
}
|
|
719
718
|
|
|
720
719
|
void CanvasJSIModule::CreateWebGLContext(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -734,7 +733,7 @@ void CanvasJSIModule::CreateWebGLContext(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
734
733
|
auto count = args.Length();
|
|
735
734
|
if (count == 6) {
|
|
736
735
|
auto ctx = args[1].As<v8::BigInt>()->Int64Value();
|
|
737
|
-
auto webgl =
|
|
736
|
+
auto webgl = (WebGLState *) ctx;
|
|
738
737
|
|
|
739
738
|
auto renderingContext = WebGLRenderingContext::NewInstance(isolate,
|
|
740
739
|
new WebGLRenderingContext(
|
|
@@ -817,8 +816,8 @@ void CanvasJSIModule::CreateWebGL2Context(const v8::FunctionCallbackInfo<v8::Val
|
|
|
817
816
|
|
|
818
817
|
auto count = args.Length();
|
|
819
818
|
if (count == 6) {
|
|
820
|
-
auto ctx = args[
|
|
821
|
-
auto webgl =
|
|
819
|
+
auto ctx = args[1].As<v8::BigInt>()->Int64Value();
|
|
820
|
+
auto webgl = (WebGLState *) ctx;
|
|
822
821
|
auto renderingContext = WebGL2RenderingContext::NewInstance(isolate,
|
|
823
822
|
new WebGL2RenderingContext(
|
|
824
823
|
webgl,
|
|
@@ -141,8 +141,8 @@ WebGLRenderingContextBase::~WebGLRenderingContextBase() {
|
|
|
141
141
|
if (_raf != nullptr) {
|
|
142
142
|
canvas_native_raf_stop(
|
|
143
143
|
_raf->GetRaf());
|
|
144
|
+
canvas_native_raf_release(_raf->GetRaf());
|
|
144
145
|
}
|
|
145
|
-
canvas_native_raf_release(_raf->GetRaf());
|
|
146
146
|
this->raf_ = nullptr;
|
|
147
147
|
canvas_native_webgl_state_destroy(this->GetState());
|
|
148
148
|
this->state_ = nullptr;
|
|
@@ -17,7 +17,7 @@ const CanvasGPUComputePassEncoder *GPUComputePassEncoderImpl::GetComputePass() {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
void GPUComputePassEncoderImpl::Init(v8::Local
|
|
20
|
+
void GPUComputePassEncoderImpl::Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate) {
|
|
21
21
|
v8::Locker locker(isolate);
|
|
22
22
|
v8::Isolate::Scope isolate_scope(isolate);
|
|
23
23
|
v8::HandleScope handle_scope(isolate);
|
|
@@ -31,7 +31,7 @@ void GPUComputePassEncoderImpl::Init(v8::Local <v8::Object> canvasModule, v8::Is
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
GPUComputePassEncoderImpl *
|
|
34
|
-
GPUComputePassEncoderImpl::GetPointer(const v8::Local
|
|
34
|
+
GPUComputePassEncoderImpl::GetPointer(const v8::Local<v8::Object> &object) {
|
|
35
35
|
auto ptr = object->GetAlignedPointerFromInternalField(0);
|
|
36
36
|
if (ptr == nullptr) {
|
|
37
37
|
return nullptr;
|
|
@@ -39,14 +39,14 @@ GPUComputePassEncoderImpl::GetPointer(const v8::Local <v8::Object> &object) {
|
|
|
39
39
|
return static_cast<GPUComputePassEncoderImpl *>(ptr);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
v8::Local
|
|
42
|
+
v8::Local<v8::FunctionTemplate> GPUComputePassEncoderImpl::GetCtor(v8::Isolate *isolate) {
|
|
43
43
|
auto cache = Caches::Get(isolate);
|
|
44
44
|
auto ctor = cache->GPUComputePassEncoderTmpl.get();
|
|
45
45
|
if (ctor != nullptr) {
|
|
46
46
|
return ctor->Get(isolate);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
v8::Local
|
|
49
|
+
v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate);
|
|
50
50
|
ctorTmpl->InstanceTemplate()->SetInternalFieldCount(2);
|
|
51
51
|
ctorTmpl->SetClassName(ConvertToV8String(isolate, "GPUComputePassEncoder"));
|
|
52
52
|
|
|
@@ -92,14 +92,14 @@ v8::Local <v8::FunctionTemplate> GPUComputePassEncoderImpl::GetCtor(v8::Isolate
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
cache->GPUComputePassEncoderTmpl =
|
|
95
|
-
std::make_unique<v8::Persistent
|
|
96
|
-
|
|
95
|
+
std::make_unique<v8::Persistent<v8::FunctionTemplate>>
|
|
96
|
+
(isolate, ctorTmpl);
|
|
97
97
|
return ctorTmpl;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
void
|
|
101
|
-
GPUComputePassEncoderImpl::GetLabel(v8::Local
|
|
102
|
-
const v8::PropertyCallbackInfo
|
|
101
|
+
GPUComputePassEncoderImpl::GetLabel(v8::Local<v8::Name> name,
|
|
102
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
103
103
|
auto ptr = GetPointer(info.This());
|
|
104
104
|
if (ptr != nullptr) {
|
|
105
105
|
auto label = canvas_native_webgpu_compute_pass_encoder_get_label(ptr->computePass_);
|
|
@@ -119,7 +119,7 @@ GPUComputePassEncoderImpl::GetLabel(v8::Local <v8::Name> name,
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
void
|
|
122
|
-
GPUComputePassEncoderImpl::DispatchWorkgroups(const v8::FunctionCallbackInfo
|
|
122
|
+
GPUComputePassEncoderImpl::DispatchWorkgroups(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
123
123
|
auto *ptr = GetPointer(args.This());
|
|
124
124
|
if (ptr == nullptr) {
|
|
125
125
|
return;
|
|
@@ -154,7 +154,7 @@ GPUComputePassEncoderImpl::DispatchWorkgroups(const v8::FunctionCallbackInfo <v8
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
void GPUComputePassEncoderImpl::DispatchWorkgroupsIndirect(
|
|
157
|
-
const v8::FunctionCallbackInfo
|
|
157
|
+
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
158
158
|
auto *ptr = GetPointer(args.This());
|
|
159
159
|
if (ptr == nullptr) {
|
|
160
160
|
return;
|
|
@@ -178,7 +178,7 @@ void GPUComputePassEncoderImpl::DispatchWorkgroupsIndirect(
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
|
|
181
|
-
void GPUComputePassEncoderImpl::End(const v8::FunctionCallbackInfo
|
|
181
|
+
void GPUComputePassEncoderImpl::End(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
182
182
|
auto *ptr = GetPointer(args.This());
|
|
183
183
|
if (ptr == nullptr) {
|
|
184
184
|
return;
|
|
@@ -188,7 +188,7 @@ void GPUComputePassEncoderImpl::End(const v8::FunctionCallbackInfo <v8::Value> &
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
void
|
|
191
|
-
GPUComputePassEncoderImpl::InsertDebugMarker(const v8::FunctionCallbackInfo
|
|
191
|
+
GPUComputePassEncoderImpl::InsertDebugMarker(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
192
192
|
auto *ptr = GetPointer(args.This());
|
|
193
193
|
if (ptr == nullptr) {
|
|
194
194
|
return;
|
|
@@ -204,7 +204,7 @@ GPUComputePassEncoderImpl::InsertDebugMarker(const v8::FunctionCallbackInfo <v8:
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
void GPUComputePassEncoderImpl::PopDebugGroup(const v8::FunctionCallbackInfo
|
|
207
|
+
void GPUComputePassEncoderImpl::PopDebugGroup(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
208
208
|
auto *ptr = GetPointer(args.This());
|
|
209
209
|
if (ptr == nullptr) {
|
|
210
210
|
return;
|
|
@@ -213,7 +213,7 @@ void GPUComputePassEncoderImpl::PopDebugGroup(const v8::FunctionCallbackInfo <v8
|
|
|
213
213
|
canvas_native_webgpu_compute_pass_encoder_pop_debug_group(ptr->GetComputePass());
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
void GPUComputePassEncoderImpl::PushDebugGroup(const v8::FunctionCallbackInfo
|
|
216
|
+
void GPUComputePassEncoderImpl::PushDebugGroup(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
217
217
|
auto *ptr = GetPointer(args.This());
|
|
218
218
|
if (ptr == nullptr) {
|
|
219
219
|
return;
|
|
@@ -229,7 +229,7 @@ void GPUComputePassEncoderImpl::PushDebugGroup(const v8::FunctionCallbackInfo <v
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
void GPUComputePassEncoderImpl::SetBindGroup(const v8::FunctionCallbackInfo
|
|
232
|
+
void GPUComputePassEncoderImpl::SetBindGroup(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
233
233
|
auto *ptr = GetPointer(args.This());
|
|
234
234
|
if (ptr == nullptr) {
|
|
235
235
|
return;
|
|
@@ -244,34 +244,39 @@ void GPUComputePassEncoderImpl::SetBindGroup(const v8::FunctionCallbackInfo <v8:
|
|
|
244
244
|
auto dynamicOffsetsStart = args[3];
|
|
245
245
|
auto dynamicOffsetsLength = args[4];
|
|
246
246
|
|
|
247
|
+
const CanvasGPUBindGroup *bindGroup = nullptr;
|
|
248
|
+
|
|
247
249
|
auto type = GetNativeType(bindGroupVal);
|
|
248
250
|
|
|
249
251
|
if (type == NativeType::GPUBindGroup) {
|
|
250
|
-
auto
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
252
|
+
auto group = GPUBindGroupImpl::GetPointer(bindGroupVal.As<v8::Object>());
|
|
253
|
+
bindGroup = group->GetBindGroup();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
auto index = indexVal->Uint32Value(context).FromJust();
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
if (dynamicOffsets->IsUint8Array()) {
|
|
260
|
+
auto buf = dynamicOffsets.As<v8::Uint32Array>();
|
|
261
|
+
auto buffer = buf->Buffer();
|
|
262
|
+
auto store = buffer->GetBackingStore();
|
|
263
|
+
auto offset = buf->ByteOffset();
|
|
264
|
+
auto data = static_cast<uint8_t *>(buffer->GetBackingStore()->Data()) + offset;
|
|
265
|
+
auto size = buf->Length();
|
|
266
|
+
auto start = (size_t) dynamicOffsetsStart->NumberValue(context).FromJust();
|
|
267
|
+
auto offset_length = (size_t) dynamicOffsetsLength->NumberValue(context).FromJust();
|
|
268
|
+
canvas_native_webgpu_compute_pass_encoder_set_bind_group(ptr->GetComputePass(), index,
|
|
269
|
+
bindGroup,
|
|
270
|
+
static_cast<const uint32_t *>(static_cast<void *>(data)),
|
|
271
|
+
size, start, offset_length);
|
|
272
|
+
} else {
|
|
273
|
+
canvas_native_webgpu_compute_pass_encoder_set_bind_group(ptr->GetComputePass(), index,
|
|
274
|
+
bindGroup,
|
|
275
|
+
nullptr, 0, 0, 0);
|
|
271
276
|
}
|
|
272
277
|
}
|
|
273
278
|
|
|
274
|
-
void GPUComputePassEncoderImpl::SetPipeline(const v8::FunctionCallbackInfo
|
|
279
|
+
void GPUComputePassEncoderImpl::SetPipeline(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
275
280
|
auto *ptr = GetPointer(args.This());
|
|
276
281
|
if (ptr == nullptr) {
|
|
277
282
|
return;
|
|
@@ -1295,12 +1295,12 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1295
1295
|
auto options = optionsVal.As<v8::Object>();
|
|
1296
1296
|
|
|
1297
1297
|
v8::Local<v8::Value> stencilValue;
|
|
1298
|
-
options->Get(context, ConvertToV8String(isolate, "depthStencil")).ToLocal(
|
|
1298
|
+
auto hasDepthStencil = options->Get(context, ConvertToV8String(isolate, "depthStencil")).ToLocal(
|
|
1299
1299
|
&stencilValue);
|
|
1300
1300
|
|
|
1301
1301
|
CanvasDepthStencilState *stencil = nullptr;
|
|
1302
1302
|
|
|
1303
|
-
if (
|
|
1303
|
+
if (hasDepthStencil && stencilValue->IsObject()) {
|
|
1304
1304
|
auto stencilObj = stencilValue.As<v8::Object>();
|
|
1305
1305
|
stencil = new CanvasDepthStencilState{};
|
|
1306
1306
|
stencil->depth_bias = 0;
|
|
@@ -1491,14 +1491,14 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1491
1491
|
|
|
1492
1492
|
|
|
1493
1493
|
v8::Local<v8::Value> fragmentValue;
|
|
1494
|
-
options->Get(context, ConvertToV8String(isolate, "fragment")).ToLocal(
|
|
1494
|
+
auto hasFragment = options->Get(context, ConvertToV8String(isolate, "fragment")).ToLocal(
|
|
1495
1495
|
&fragmentValue);
|
|
1496
1496
|
|
|
1497
1497
|
CanvasFragmentState *fragment = nullptr;
|
|
1498
1498
|
|
|
1499
1499
|
std::vector<CanvasColorTargetState> targets;
|
|
1500
1500
|
|
|
1501
|
-
if (
|
|
1501
|
+
if (hasFragment && fragmentValue->IsObject()) {
|
|
1502
1502
|
auto fragmentValueObj = fragmentValue.As<v8::Object>();
|
|
1503
1503
|
fragment = new CanvasFragmentState{};
|
|
1504
1504
|
|
|
@@ -1532,9 +1532,9 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1532
1532
|
|
|
1533
1533
|
v8::Local<v8::Value> writeMaskVal;
|
|
1534
1534
|
|
|
1535
|
-
state->Get(context, ConvertToV8String(isolate, "writeMask")).ToLocal(&writeMaskVal);
|
|
1535
|
+
auto hasWriteMask = state->Get(context, ConvertToV8String(isolate, "writeMask")).ToLocal(&writeMaskVal);
|
|
1536
1536
|
|
|
1537
|
-
if (
|
|
1537
|
+
if (hasWriteMask && writeMaskVal->IsUint32()) {
|
|
1538
1538
|
writeMask = writeMaskVal->Uint32Value(context).FromJust();
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
@@ -1544,9 +1544,9 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1544
1544
|
|
|
1545
1545
|
v8::Local<v8::Value> blendVal;
|
|
1546
1546
|
|
|
1547
|
-
state->Get(context, ConvertToV8String(isolate, "blend")).ToLocal(&blendVal);
|
|
1547
|
+
auto hasBlend = state->Get(context, ConvertToV8String(isolate, "blend")).ToLocal(&blendVal);
|
|
1548
1548
|
|
|
1549
|
-
if (
|
|
1549
|
+
if (hasBlend && blendVal->IsObject()) {
|
|
1550
1550
|
auto blendObj = blendVal.As<v8::Object>();
|
|
1551
1551
|
auto alpha = blendObj->Get(context, ConvertToV8String(isolate,
|
|
1552
1552
|
"alpha")).ToLocalChecked().As<v8::Object>();
|
|
@@ -1638,10 +1638,10 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1638
1638
|
}
|
|
1639
1639
|
|
|
1640
1640
|
v8::Local<v8::Value> constantsVal;
|
|
1641
|
-
fragmentValueObj->Get(context, ConvertToV8String(isolate, "constants")).ToLocal(
|
|
1641
|
+
auto hasConstants = fragmentValueObj->Get(context, ConvertToV8String(isolate, "constants")).ToLocal(
|
|
1642
1642
|
&constantsVal);
|
|
1643
1643
|
|
|
1644
|
-
if (
|
|
1644
|
+
if (hasConstants && constantsVal->IsMap()) {
|
|
1645
1645
|
auto constants = constantsVal.As<v8::Map>();
|
|
1646
1646
|
auto keyValues = constants->AsArray();
|
|
1647
1647
|
auto length = keyValues->Length();
|
|
@@ -1675,11 +1675,11 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1675
1675
|
|
|
1676
1676
|
|
|
1677
1677
|
v8::Local<v8::Value> entryPoint;
|
|
1678
|
-
fragmentValueObj->Get(context, ConvertToV8String(isolate, "entryPoint")).ToLocal(
|
|
1678
|
+
auto hasEntryPoint = fragmentValueObj->Get(context, ConvertToV8String(isolate, "entryPoint")).ToLocal(
|
|
1679
1679
|
&entryPoint);
|
|
1680
1680
|
|
|
1681
1681
|
|
|
1682
|
-
if (
|
|
1682
|
+
if (hasEntryPoint && entryPoint->IsString()) {
|
|
1683
1683
|
auto ep = v8::String::Utf8Value(isolate, entryPoint);
|
|
1684
1684
|
char *entry_point = (char *) malloc(ep.length());
|
|
1685
1685
|
std::strcpy(entry_point, *ep);
|
|
@@ -1707,7 +1707,6 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1707
1707
|
|
|
1708
1708
|
auto label = GPULabel(isolate, labelVal);
|
|
1709
1709
|
|
|
1710
|
-
|
|
1711
1710
|
descriptor.label = *label;
|
|
1712
1711
|
|
|
1713
1712
|
|
|
@@ -1738,13 +1737,13 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1738
1737
|
|
|
1739
1738
|
|
|
1740
1739
|
v8::Local<v8::Value> multisampleValue;
|
|
1741
|
-
options->Get(context, ConvertToV8String(isolate, "multisample")).ToLocal(
|
|
1740
|
+
auto hasMultisample = options->Get(context, ConvertToV8String(isolate, "multisample")).ToLocal(
|
|
1742
1741
|
&multisampleValue);
|
|
1743
1742
|
|
|
1744
1743
|
|
|
1745
1744
|
CanvasMultisampleState *multisample = nullptr;
|
|
1746
1745
|
|
|
1747
|
-
if (
|
|
1746
|
+
if (hasMultisample && multisampleValue->IsObject()) {
|
|
1748
1747
|
auto multisampleObj = multisampleValue.As<v8::Object>();
|
|
1749
1748
|
multisample = new CanvasMultisampleState{};
|
|
1750
1749
|
multisample->alpha_to_coverage_enabled = false;
|
|
@@ -1755,25 +1754,25 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1755
1754
|
v8::Local<v8::Value> count;
|
|
1756
1755
|
v8::Local<v8::Value> mask;
|
|
1757
1756
|
|
|
1758
|
-
multisampleObj->Get(context, ConvertToV8String(isolate, "alphaToCoverageEnabled")).
|
|
1757
|
+
auto hasAlphaToCoverageEnabled = multisampleObj->Get(context, ConvertToV8String(isolate, "alphaToCoverageEnabled")).
|
|
1759
1758
|
ToLocal(&alphaToCoverageEnabled);
|
|
1760
1759
|
|
|
1761
|
-
if (
|
|
1760
|
+
if (hasAlphaToCoverageEnabled && alphaToCoverageEnabled->IsBoolean()) {
|
|
1762
1761
|
multisample->alpha_to_coverage_enabled = alphaToCoverageEnabled->BooleanValue(
|
|
1763
1762
|
isolate);
|
|
1764
1763
|
}
|
|
1765
1764
|
|
|
1766
|
-
multisampleObj->Get(context, ConvertToV8String(isolate, "count")).
|
|
1765
|
+
auto hasCount = multisampleObj->Get(context, ConvertToV8String(isolate, "count")).
|
|
1767
1766
|
ToLocal(&count);
|
|
1768
1767
|
|
|
1769
|
-
if (
|
|
1768
|
+
if (hasCount && count->IsUint32()) {
|
|
1770
1769
|
multisample->count = count.As<v8::Uint32>()->Value();
|
|
1771
1770
|
}
|
|
1772
1771
|
|
|
1773
|
-
multisampleObj->Get(context, ConvertToV8String(isolate, "mask")).
|
|
1772
|
+
auto hasMask = multisampleObj->Get(context, ConvertToV8String(isolate, "mask")).
|
|
1774
1773
|
ToLocal(&mask);
|
|
1775
1774
|
|
|
1776
|
-
if (
|
|
1775
|
+
if (hasMask && mask->IsNumber()) {
|
|
1777
1776
|
// todo verify mask
|
|
1778
1777
|
auto maskValue = mask.As<v8::Number>()->Value();
|
|
1779
1778
|
multisample->mask = (uint64_t) maskValue;
|
|
@@ -1786,13 +1785,13 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1786
1785
|
|
|
1787
1786
|
|
|
1788
1787
|
v8::Local<v8::Value> primitiveValue;
|
|
1789
|
-
options->Get(context, ConvertToV8String(isolate, "primitive")).ToLocal(
|
|
1788
|
+
auto hasPrimitive = options->Get(context, ConvertToV8String(isolate, "primitive")).ToLocal(
|
|
1790
1789
|
&primitiveValue);
|
|
1791
1790
|
|
|
1792
1791
|
|
|
1793
1792
|
CanvasPrimitiveState *primitive = nullptr;
|
|
1794
1793
|
|
|
1795
|
-
if (
|
|
1794
|
+
if (hasPrimitive && primitiveValue->IsObject()) {
|
|
1796
1795
|
auto primitiveObj = primitiveValue.As<v8::Object>();
|
|
1797
1796
|
primitive = new CanvasPrimitiveState{};
|
|
1798
1797
|
|
|
@@ -1968,7 +1967,7 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1968
1967
|
|
|
1969
1968
|
|
|
1970
1969
|
v8::Local<v8::Value> vertexValue;
|
|
1971
|
-
|
|
1970
|
+
auto hasVertex = options->Get(context, ConvertToV8String(isolate, "vertex")).ToLocal(
|
|
1972
1971
|
&vertexValue);
|
|
1973
1972
|
|
|
1974
1973
|
|
|
@@ -1978,7 +1977,7 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1978
1977
|
|
|
1979
1978
|
std::vector<std::vector<CanvasVertexAttribute>> attributes;
|
|
1980
1979
|
|
|
1981
|
-
if (
|
|
1980
|
+
if (hasVertex && vertexValue->IsObject()) {
|
|
1982
1981
|
auto vertexObj = vertexValue.As<v8::Object>();
|
|
1983
1982
|
vertex = new CanvasVertexState{};
|
|
1984
1983
|
|
|
@@ -1990,9 +1989,9 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
1990
1989
|
vertex->module = module->GetShaderModule();
|
|
1991
1990
|
|
|
1992
1991
|
v8::Local<v8::Value> constantsVal;
|
|
1993
|
-
vertexObj->Get(context, ConvertToV8String(isolate, "constants")).ToLocal(&constantsVal);
|
|
1992
|
+
auto hasConstants = vertexObj->Get(context, ConvertToV8String(isolate, "constants")).ToLocal(&constantsVal);
|
|
1994
1993
|
|
|
1995
|
-
if (
|
|
1994
|
+
if (hasConstants && constantsVal->IsMap()) {
|
|
1996
1995
|
auto constants = constantsVal.As<v8::Map>();
|
|
1997
1996
|
auto keyValues = constants->AsArray();
|
|
1998
1997
|
auto len = keyValues->Length();
|
|
@@ -2027,10 +2026,10 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2027
2026
|
}
|
|
2028
2027
|
|
|
2029
2028
|
v8::Local<v8::Value> buffersVal;
|
|
2030
|
-
vertexObj->Get(context, ConvertToV8String(isolate, "buffers")).ToLocal(&buffersVal);
|
|
2029
|
+
auto hasBuffers = vertexObj->Get(context, ConvertToV8String(isolate, "buffers")).ToLocal(&buffersVal);
|
|
2031
2030
|
|
|
2032
2031
|
uint64_t stride = 0;
|
|
2033
|
-
if (
|
|
2032
|
+
if (hasBuffers && buffersVal->IsArray()) {
|
|
2034
2033
|
auto buffers = buffersVal.As<v8::Array>();
|
|
2035
2034
|
auto len = buffers->Length();
|
|
2036
2035
|
|
|
@@ -2039,10 +2038,10 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2039
2038
|
|
|
2040
2039
|
v8::Local<v8::Value> arrayStride;
|
|
2041
2040
|
|
|
2042
|
-
buffer->Get(context, ConvertToV8String(isolate, "arrayStride")).ToLocal(
|
|
2041
|
+
auto hasArrayStride = buffer->Get(context, ConvertToV8String(isolate, "arrayStride")).ToLocal(
|
|
2043
2042
|
&arrayStride);
|
|
2044
2043
|
|
|
2045
|
-
if (
|
|
2044
|
+
if (hasArrayStride && arrayStride->IsNumber()) {
|
|
2046
2045
|
stride = (uint64_t) arrayStride.As<v8::Number>()->Value();
|
|
2047
2046
|
}
|
|
2048
2047
|
|
|
@@ -2050,10 +2049,10 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2050
2049
|
|
|
2051
2050
|
v8::Local<v8::Value> attributesValue;
|
|
2052
2051
|
|
|
2053
|
-
buffer->Get(context, ConvertToV8String(isolate, "attributes")).ToLocal(
|
|
2052
|
+
auto hasAttributes = buffer->Get(context, ConvertToV8String(isolate, "attributes")).ToLocal(
|
|
2054
2053
|
&attributesValue);
|
|
2055
2054
|
|
|
2056
|
-
if (
|
|
2055
|
+
if (hasAttributes && attributesValue->IsArray()) {
|
|
2057
2056
|
auto attributes_array = attributesValue.As<v8::Array>();
|
|
2058
2057
|
auto attributes_len = attributes_array->Length();
|
|
2059
2058
|
|
|
@@ -2144,6 +2143,7 @@ void GPUDeviceImpl::CreateRenderPipeline(const v8::FunctionCallbackInfo<v8::Valu
|
|
|
2144
2143
|
}
|
|
2145
2144
|
|
|
2146
2145
|
|
|
2146
|
+
|
|
2147
2147
|
auto pipeline = canvas_native_webgpu_device_create_render_pipeline(ptr->GetGPUDevice(),
|
|
2148
2148
|
&descriptor);
|
|
2149
2149
|
|
|
@@ -118,7 +118,7 @@ v8::Local<v8::FunctionTemplate> GPURenderBundleEncoderImpl::GetCtor(v8::Isolate
|
|
|
118
118
|
|
|
119
119
|
void
|
|
120
120
|
GPURenderBundleEncoderImpl::GetLabel(v8::Local<v8::Name> name,
|
|
121
|
-
|
|
121
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
122
122
|
auto ptr = GetPointer(info.This());
|
|
123
123
|
if (ptr != nullptr) {
|
|
124
124
|
auto label = canvas_native_webgpu_render_bundle_encoder_get_label(ptr->encoder_);
|
|
@@ -369,30 +369,33 @@ void GPURenderBundleEncoderImpl::SetBindGroup(const v8::FunctionCallbackInfo<v8:
|
|
|
369
369
|
auto dynamicOffsetsStart = args[3];
|
|
370
370
|
auto dynamicOffsetsLength = args[4];
|
|
371
371
|
|
|
372
|
+
const CanvasGPUBindGroup *bindGroup = nullptr;
|
|
372
373
|
auto type = GetNativeType(bindGroupVal);
|
|
373
374
|
|
|
375
|
+
auto index = indexVal->Uint32Value(context).FromJust();
|
|
376
|
+
|
|
374
377
|
if (type == NativeType::GPUBindGroup) {
|
|
375
|
-
auto
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
378
|
+
auto group = GPUBindGroupImpl::GetPointer(bindGroupVal.As<v8::Object>());
|
|
379
|
+
bindGroup = group->GetBindGroup();
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (dynamicOffsets->IsUint32Array()) {
|
|
383
|
+
auto buf = dynamicOffsets.As<v8::Uint32Array>();
|
|
384
|
+
auto buffer = buf->Buffer();
|
|
385
|
+
auto store = buffer->GetBackingStore();
|
|
386
|
+
auto offset = buf->ByteOffset();
|
|
387
|
+
auto data = static_cast<uint8_t *>(buffer->GetBackingStore()->Data()) + offset;
|
|
388
|
+
auto size = buf->Length();
|
|
389
|
+
auto start = (size_t) dynamicOffsetsStart->NumberValue(context).FromJust();
|
|
390
|
+
auto offset_length = (size_t) dynamicOffsetsLength->NumberValue(context).FromJust();
|
|
391
|
+
canvas_native_webgpu_render_bundle_encoder_set_bind_group(ptr->GetEncoder(), index,
|
|
392
|
+
bindGroup,
|
|
393
|
+
static_cast<const uint32_t *>(static_cast<void *>(data)),
|
|
394
|
+
size, start, offset_length);
|
|
395
|
+
} else {
|
|
396
|
+
canvas_native_webgpu_render_bundle_encoder_set_bind_group(ptr->GetEncoder(), index,
|
|
397
|
+
bindGroup,
|
|
398
|
+
nullptr, 0, 0, 0);
|
|
396
399
|
}
|
|
397
400
|
|
|
398
401
|
}
|
|
@@ -450,7 +453,7 @@ void GPURenderBundleEncoderImpl::SetPipeline(const v8::FunctionCallbackInfo<v8::
|
|
|
450
453
|
}
|
|
451
454
|
|
|
452
455
|
auto pipelineVal = args[0];
|
|
453
|
-
if(GetNativeType(pipelineVal) == NativeType::GPURenderPipeline){
|
|
456
|
+
if (GetNativeType(pipelineVal) == NativeType::GPURenderPipeline) {
|
|
454
457
|
auto pipeline = GPURenderPipelineImpl::GetPointer(pipelineVal.As<v8::Object>());
|
|
455
458
|
if (pipeline != nullptr) {
|
|
456
459
|
canvas_native_webgpu_render_bundle_encoder_set_pipeline(ptr->GetEncoder(),
|
|
@@ -428,30 +428,34 @@ void GPURenderPassEncoderImpl::SetBindGroup(const v8::FunctionCallbackInfo<v8::V
|
|
|
428
428
|
auto dynamicOffsetsStart = args[3];
|
|
429
429
|
auto dynamicOffsetsLength = args[4];
|
|
430
430
|
|
|
431
|
+
const CanvasGPUBindGroup *bindGroup = nullptr;
|
|
432
|
+
|
|
431
433
|
auto type = GetNativeType(bindGroupVal);
|
|
432
434
|
|
|
435
|
+
auto index = indexVal->Uint32Value(context).FromJust();
|
|
436
|
+
|
|
433
437
|
if (type == NativeType::GPUBindGroup) {
|
|
434
|
-
auto
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
438
|
+
auto group = GPUBindGroupImpl::GetPointer(bindGroupVal.As<v8::Object>());
|
|
439
|
+
bindGroup = group->GetBindGroup();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
if (dynamicOffsets->IsUint32Array()) {
|
|
443
|
+
auto buf = dynamicOffsets.As<v8::Uint32Array>();
|
|
444
|
+
auto buffer = buf->Buffer();
|
|
445
|
+
auto store = buffer->GetBackingStore();
|
|
446
|
+
auto offset = buf->ByteOffset();
|
|
447
|
+
auto data = static_cast<uint8_t *>(buffer->GetBackingStore()->Data()) + offset;
|
|
448
|
+
auto size = buf->Length();
|
|
449
|
+
auto start = (size_t) dynamicOffsetsStart->NumberValue(context).FromJust();
|
|
450
|
+
auto offset_length = (size_t) dynamicOffsetsLength->NumberValue(context).FromJust();
|
|
451
|
+
canvas_native_webgpu_render_pass_encoder_set_bind_group(ptr->GetPass(), index,
|
|
452
|
+
bindGroup,
|
|
453
|
+
static_cast<const uint32_t *>(static_cast<void *>(data)),
|
|
454
|
+
size, start, offset_length);
|
|
455
|
+
} else {
|
|
456
|
+
canvas_native_webgpu_render_pass_encoder_set_bind_group(ptr->GetPass(), index,
|
|
457
|
+
bindGroup,
|
|
458
|
+
nullptr, 0, 0, 0);
|
|
455
459
|
}
|
|
456
460
|
}
|
|
457
461
|
|
|
@@ -596,8 +600,7 @@ void GPURenderPassEncoderImpl::SetVertexBuffer(const v8::FunctionCallbackInfo<v8
|
|
|
596
600
|
if (type == NativeType::GPUBuffer) {
|
|
597
601
|
auto context = isolate->GetCurrentContext();
|
|
598
602
|
auto slot = slotVal->ToUint32(context).ToLocalChecked();
|
|
599
|
-
|
|
600
|
-
|
|
603
|
+
|
|
601
604
|
|
|
602
605
|
auto buffer = GPUBufferImpl::GetPointer(bufferVal.As<v8::Object>());
|
|
603
606
|
|