react-native-wgpu 0.2.7 → 0.2.9

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.
Files changed (50) hide show
  1. package/cpp/dawn/native/MetalBackend.h +1 -0
  2. package/cpp/dawn/native/WebGPUBackend.h +15 -1
  3. package/cpp/dawn/webgpu_cpp_print.h +9 -0
  4. package/cpp/rnwgpu/api/GPUAdapter.cpp +0 -6
  5. package/cpp/rnwgpu/api/GPUAdapter.h +0 -3
  6. package/cpp/rnwgpu/api/GPUAdapterInfo.h +6 -1
  7. package/cpp/rnwgpu/api/GPUCommandEncoder.cpp +1 -1
  8. package/cpp/rnwgpu/api/GPUDevice.cpp +1 -1
  9. package/cpp/rnwgpu/api/descriptors/Unions.h +4 -4
  10. package/cpp/webgpu/webgpu.h +47 -50
  11. package/cpp/webgpu/webgpu_cpp.h +151 -100
  12. package/lib/commonjs/Canvas.js.map +1 -1
  13. package/lib/commonjs/hooks.js +4 -4
  14. package/lib/commonjs/hooks.js.map +1 -1
  15. package/lib/module/Canvas.js.map +1 -1
  16. package/lib/module/hooks.js +4 -4
  17. package/lib/module/hooks.js.map +1 -1
  18. package/lib/typescript/eslint.config.d.mts +3 -0
  19. package/lib/typescript/eslint.config.d.mts.map +1 -0
  20. package/lib/typescript/src/Canvas.d.ts.map +1 -1
  21. package/lib/typescript/src/__tests__/globalSetup.d.ts +0 -7
  22. package/lib/typescript/src/__tests__/globalSetup.d.ts.map +1 -1
  23. package/lib/typescript/src/__tests__/setup.d.ts +1 -0
  24. package/lib/typescript/src/__tests__/setup.d.ts.map +1 -1
  25. package/lib/typescript/src/hooks.d.ts.map +1 -1
  26. package/libs/android/arm64-v8a/libwebgpu_dawn.so +0 -0
  27. package/libs/android/armeabi-v7a/libwebgpu_dawn.so +0 -0
  28. package/libs/android/x86/libwebgpu_dawn.so +0 -0
  29. package/libs/android/x86_64/libwebgpu_dawn.so +0 -0
  30. package/libs/apple/arm64_iphoneos/libwebgpu_dawn.a +0 -0
  31. package/libs/apple/arm64_iphonesimulator/libwebgpu_dawn.a +0 -0
  32. package/libs/apple/arm64_xros/libwebgpu_dawn.a +0 -0
  33. package/libs/apple/arm64_xrsimulator/libwebgpu_dawn.a +0 -0
  34. package/libs/apple/iphonesimulator/libwebgpu_dawn.a +0 -0
  35. package/libs/apple/libwebgpu_dawn.xcframework/Info.plist +9 -9
  36. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64/libwebgpu_dawn.a +0 -0
  37. package/libs/apple/libwebgpu_dawn.xcframework/ios-arm64_x86_64-simulator/libwebgpu_dawn.a +0 -0
  38. package/libs/apple/libwebgpu_dawn.xcframework/macos-arm64_x86_64/libwebgpu_dawn.a +0 -0
  39. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64/libwebgpu_dawn.a +0 -0
  40. package/libs/apple/libwebgpu_dawn.xcframework/xros-arm64-simulator/libwebgpu_dawn.a +0 -0
  41. package/libs/apple/universal_macosx/libwebgpu_dawn.a +0 -0
  42. package/libs/apple/x86_64_iphonesimulator/libwebgpu_dawn.a +0 -0
  43. package/libs/dawn.json +39 -62
  44. package/package.json +14 -16
  45. package/src/Canvas.tsx +0 -1
  46. package/src/__tests__/GPU.spec.ts +3 -1
  47. package/src/__tests__/demos/Wireframe.spec.ts +2 -4
  48. package/src/__tests__/globalSetup.ts +0 -9
  49. package/src/__tests__/setup.ts +2 -2
  50. package/src/hooks.tsx +3 -2
package/libs/dawn.json CHANGED
@@ -381,7 +381,7 @@
381
381
  "buffer binding type": {
382
382
  "category": "enum",
383
383
  "values": [
384
- {"value": 0, "name": "binding not used"},
384
+ {"value": 0, "name": "binding not used", "jsrepr": "undefined"},
385
385
  {"value": 1, "name": "undefined", "jsrepr": "undefined", "valid": false},
386
386
  {"value": 2, "name": "uniform"},
387
387
  {"value": 3, "name": "storage"},
@@ -401,7 +401,7 @@
401
401
  "sampler binding type": {
402
402
  "category": "enum",
403
403
  "values": [
404
- {"value": 0, "name": "binding not used"},
404
+ {"value": 0, "name": "binding not used", "jsrepr": "undefined"},
405
405
  {"value": 1, "name": "undefined", "jsrepr": "undefined", "valid": false},
406
406
  {"value": 2, "name": "filtering"},
407
407
  {"value": 3, "name": "non filtering"},
@@ -428,7 +428,7 @@
428
428
  "texture sample type": {
429
429
  "category": "enum",
430
430
  "values": [
431
- {"value": 0, "name": "binding not used"},
431
+ {"value": 0, "name": "binding not used", "jsrepr": "undefined"},
432
432
  {"value": 1, "name": "undefined", "jsrepr": "undefined", "valid": false},
433
433
  {"value": 2, "name": "float"},
434
434
  {"value": 3, "name": "unfilterable float"},
@@ -505,7 +505,7 @@
505
505
  "storage texture access": {
506
506
  "category": "enum",
507
507
  "values": [
508
- {"value": 0, "name": "binding not used"},
508
+ {"value": 0, "name": "binding not used", "jsrepr": "undefined"},
509
509
  {"value": 1, "name": "undefined", "jsrepr": "undefined", "valid": false},
510
510
  {"value": 2, "name": "write only"},
511
511
  {"value": 3, "name": "read only"},
@@ -728,6 +728,7 @@
728
728
  },
729
729
  {
730
730
  "name": "get map state",
731
+ "no autolock": true,
731
732
  "returns": "buffer map state"
732
733
  },
733
734
  {
@@ -2139,6 +2140,15 @@
2139
2140
  {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"}
2140
2141
  ]
2141
2142
  },
2143
+ "shared texture memory metal end access state": {
2144
+ "category": "structure",
2145
+ "chained": "out",
2146
+ "chain roots": ["shared texture memory end access state"],
2147
+ "tags": ["dawn", "native"],
2148
+ "members": [
2149
+ {"name": "commands scheduled future", "type": "future"}
2150
+ ]
2151
+ },
2142
2152
  "shared texture memory vk image layout begin state": {
2143
2153
  "category": "structure",
2144
2154
  "chained": "in",
@@ -2440,8 +2450,9 @@
2440
2450
  {"value": 55, "name": "chromium experimental subgroup matrix", "tags": ["dawn"]},
2441
2451
  {"value": 56, "name": "shared fence EGL sync", "tags": ["dawn", "native"]},
2442
2452
  {"value": 57, "name": "dawn device allocator control", "tags": ["dawn"]},
2443
- {"value": 58, "name": "texture component swizzle", "tags": ["dawn"]},
2444
- {"value": 60, "name": "chromium experimental bindless", "tags": ["dawn"]}
2453
+ {"value": 58, "name": "texture component swizzle", "tags": ["dawn", "emscripten"]},
2454
+ {"value": 60, "name": "chromium experimental bindless", "tags": ["dawn"]},
2455
+ {"value": 61, "name": "adapter properties WGPU", "tags": ["dawn"]}
2445
2456
  ]
2446
2457
  },
2447
2458
  "filter mode": {
@@ -3167,11 +3178,6 @@
3167
3178
  {"name": "timestamp writes", "type": "pass timestamp writes", "annotation": "const*", "optional": true}
3168
3179
  ]
3169
3180
  },
3170
- "render pass descriptor max draw count": {
3171
- "category": "typedef",
3172
- "type": "render pass max draw count",
3173
- "tags": ["dawn"]
3174
- },
3175
3181
  "render pass max draw count": {
3176
3182
  "category": "structure",
3177
3183
  "chained": "in",
@@ -3623,11 +3629,6 @@
3623
3629
  {"name": "label", "type": "string view", "optional": true}
3624
3630
  ]
3625
3631
  },
3626
- "shader module SPIRV descriptor": {
3627
- "category": "typedef",
3628
- "type": "shader source SPIRV",
3629
- "tags": ["dawn"]
3630
- },
3631
3632
  "shader source SPIRV": {
3632
3633
  "category": "structure",
3633
3634
  "chained": "in",
@@ -3637,11 +3638,6 @@
3637
3638
  {"name": "code", "type": "uint32_t", "annotation": "const*", "length": "code size"}
3638
3639
  ]
3639
3640
  },
3640
- "shader module WGSL descriptor": {
3641
- "category": "typedef",
3642
- "type": "shader source WGSL",
3643
- "tags": ["dawn"]
3644
- },
3645
3641
  "shader source WGSL": {
3646
3642
  "category": "structure",
3647
3643
  "chained": "in",
@@ -3749,11 +3745,6 @@
3749
3745
  {"name": "label", "type": "string view", "optional": true}
3750
3746
  ]
3751
3747
  },
3752
- "surface descriptor from android native window": {
3753
- "category": "typedef",
3754
- "type": "surface source android native window",
3755
- "tags": ["art", "native", "dawn"]
3756
- },
3757
3748
  "surface source android native window": {
3758
3749
  "category": "structure",
3759
3750
  "chained": "in",
@@ -3772,11 +3763,6 @@
3772
3763
  {"name": "selector", "type": "string view"}
3773
3764
  ]
3774
3765
  },
3775
- "surface descriptor from metal layer": {
3776
- "category": "typedef",
3777
- "type": "surface source metal layer",
3778
- "tags": ["native", "dawn"]
3779
- },
3780
3766
  "surface source metal layer": {
3781
3767
  "category": "structure",
3782
3768
  "chained": "in",
@@ -3786,11 +3772,6 @@
3786
3772
  {"name": "layer", "type": "void", "annotation": "*"}
3787
3773
  ]
3788
3774
  },
3789
- "surface descriptor from windows HWND": {
3790
- "category": "typedef",
3791
- "type": "surface source windows HWND",
3792
- "tags": ["native", "dawn"]
3793
- },
3794
3775
  "surface source windows HWND": {
3795
3776
  "category": "structure",
3796
3777
  "chained": "in",
@@ -3801,11 +3782,6 @@
3801
3782
  {"name": "hwnd", "type": "void", "annotation": "*"}
3802
3783
  ]
3803
3784
  },
3804
- "surface descriptor from xcb window": {
3805
- "category": "typedef",
3806
- "type": "surface source XCB window",
3807
- "tags": ["native", "dawn"]
3808
- },
3809
3785
  "surface source XCB window": {
3810
3786
  "category": "structure",
3811
3787
  "chained": "in",
@@ -3816,11 +3792,6 @@
3816
3792
  {"name": "window", "type": "uint32_t"}
3817
3793
  ]
3818
3794
  },
3819
- "surface descriptor from xlib window": {
3820
- "category": "typedef",
3821
- "type": "surface source xlib window",
3822
- "tags": ["native", "dawn"]
3823
- },
3824
3795
  "surface source xlib window": {
3825
3796
  "category": "structure",
3826
3797
  "chained": "in",
@@ -3831,11 +3802,6 @@
3831
3802
  {"name": "window", "type": "uint64_t"}
3832
3803
  ]
3833
3804
  },
3834
- "surface descriptor from wayland surface": {
3835
- "category": "typedef",
3836
- "type": "surface source wayland surface",
3837
- "tags": ["native", "dawn"]
3838
- },
3839
3805
  "surface source wayland surface": {
3840
3806
  "category": "structure",
3841
3807
  "chained": "in",
@@ -3996,14 +3962,16 @@
3996
3962
  {"value": 68, "name": "render pass descriptor resolve rect", "tags": ["dawn"]},
3997
3963
  {"value": 69, "name": "request adapter WebGPU backend options", "tags": ["dawn", "native"]},
3998
3964
  {"value": 70, "name": "dawn fake device initialize error for testing", "tags": ["dawn"]},
3999
- {"value": 71, "name": "texture component swizzle descriptor", "tags": ["dawn"]},
3965
+ {"value": 71, "name": "texture component swizzle descriptor", "tags": ["dawn", "emscripten"]},
4000
3966
  {"value": 72, "name": "shared texture memory D3D11 begin state", "tags": ["dawn", "native"]},
4001
3967
  {"value": 73, "name": "dawn consume adapter descriptor", "tags": ["dawn"]},
4002
3968
  {"value": 74, "name": "bind group layout dynamic binding array", "tags": ["dawn"]},
4003
3969
  {"value": 75, "name": "dynamic binding array limits", "tags": ["dawn"]},
4004
3970
  {"value": 76, "name": "bind group dynamic binding array", "tags": ["dawn"]},
4005
3971
  {"value": 77, "name": "texel buffer binding entry", "tags": ["dawn"]},
4006
- {"value": 78, "name": "texel buffer binding layout", "tags": ["dawn"]}
3972
+ {"value": 78, "name": "texel buffer binding layout", "tags": ["dawn"]},
3973
+ {"value": 79, "name": "shared texture memory metal end access state", "tags": ["dawn", "native"]},
3974
+ {"value": 80, "name": "adapter properties WGPU", "tags": ["dawn"]}
4007
3975
  ]
4008
3976
  },
4009
3977
  "texture": {
@@ -4314,7 +4282,7 @@
4314
4282
  },
4315
4283
  "texture component swizzle descriptor": {
4316
4284
  "category": "structure",
4317
- "tags": ["dawn"],
4285
+ "tags": ["dawn", "emscripten"],
4318
4286
  "chained": "in",
4319
4287
  "chain roots": ["texture view descriptor"],
4320
4288
  "members": [
@@ -4358,7 +4326,7 @@
4358
4326
  },
4359
4327
  "texture component swizzle": {
4360
4328
  "category": "structure",
4361
- "tags": ["dawn"],
4329
+ "tags": ["dawn", "emscripten"],
4362
4330
  "extensible": false,
4363
4331
  "members": [
4364
4332
  {"name": "r", "type": "component swizzle", "default": "r"},
@@ -4369,15 +4337,15 @@
4369
4337
  },
4370
4338
  "component swizzle": {
4371
4339
  "category": "enum",
4372
- "tags": ["dawn"],
4340
+ "tags": ["dawn", "emscripten"],
4373
4341
  "values": [
4374
4342
  {"value": 0, "name": "undefined", "jsrepr": "undefined"},
4375
- {"value": 1, "name": "zero"},
4376
- {"value": 2, "name": "one"},
4377
- {"value": 3, "name": "r"},
4378
- {"value": 4, "name": "g"},
4379
- {"value": 5, "name": "b"},
4380
- {"value": 6, "name": "a"}
4343
+ {"value": 1, "name": "zero", "jsrepr": "'0'"},
4344
+ {"value": 2, "name": "one", "jsrepr": "'1'"},
4345
+ {"value": 3, "name": "r", "jsrepr": "'r'"},
4346
+ {"value": 4, "name": "g", "jsrepr": "'g'"},
4347
+ {"value": 5, "name": "b", "jsrepr": "'b'"},
4348
+ {"value": 6, "name": "a", "jsrepr": "'a'"}
4381
4349
  ]
4382
4350
  },
4383
4351
  "y cb cr vk descriptor": {
@@ -4647,6 +4615,15 @@
4647
4615
  {"name": "driver version", "type": "uint32_t"}
4648
4616
  ]
4649
4617
  },
4618
+ "adapter properties WGPU": {
4619
+ "category": "structure",
4620
+ "chained": "out",
4621
+ "chain roots": ["adapter info"],
4622
+ "tags": ["dawn"],
4623
+ "members": [
4624
+ {"name": "backend type", "type": "backend type"}
4625
+ ]
4626
+ },
4650
4627
  "dawn buffer descriptor error info from wire client": {
4651
4628
  "category": "structure",
4652
4629
  "chained": "in",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wgpu",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "React Native WebGPU",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -20,21 +20,21 @@
20
20
  "*.podspec"
21
21
  ],
22
22
  "scripts": {
23
- "test": "jest -i",
24
- "test:ref": "REFERENCE=true yarn test -i",
23
+ "test": "NODE_OPTIONS='--experimental-require-module' jest -i",
24
+ "test:ref": "REFERENCE=true NODE_OPTIONS='--experimental-require-module' jest -i",
25
25
  "lint": "eslint . --ext .ts,.tsx --max-warnings 0 --cache --fix",
26
26
  "tsc": "tsc --noEmit",
27
27
  "build": "bob build",
28
- "build-dawn": "ts-node scripts/build/dawn.ts",
28
+ "build-dawn": "tsx scripts/build/dawn.ts",
29
29
  "clean-dawn": "rimraf ./libs && rimraf ../../externals/dawn/out",
30
30
  "clang-format": "yarn clang-format-ios && yarn clang-format-android && yarn clang-format-common",
31
31
  "clang-format-ios": "find apple/ -iname \"*.h\" -o -iname \"*.mm\" -o -iname \"*.cpp\" | xargs clang-format -i",
32
32
  "clang-format-android": "find android/cpp/ -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.cpp\" | xargs clang-format -i",
33
33
  "clang-format-common": "find cpp/rnwgpu -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.cpp\" | xargs clang-format -i",
34
34
  "cpplint": "cpplint --linelength=230 --filter=-legal/copyright,-whitespace/indent,-whitespace/comments,-whitespace/ending_newline,-build/include_order,-runtime/references,-readability/todo,-whitespace/blank_line,-whitespace/todo,-runtime/int,-build/c++11,-whitespace/parens --exclude=example --exclude=android/.cxx --exclude=cpp/webgpu --exclude=cpp/dawn --exclude=ios --exclude=android/build --exclude=node_modules --recursive .",
35
- "download-artifacts": "ts-node scripts/build/download-artifacts.ts && yarn copy-artifacts",
36
- "copy-artifacts": "ts-node scripts/build/copy-artifacts.ts",
37
- "codegen": "ts-node scripts/codegen/codegen.ts && yarn clang-format"
35
+ "download-artifacts": "tsx scripts/build/download-artifacts.ts && yarn copy-artifacts",
36
+ "copy-artifacts": "tsx scripts/build/copy-artifacts.ts",
37
+ "codegen": "tsx scripts/codegen/codegen.ts && yarn clang-format"
38
38
  },
39
39
  "keywords": [
40
40
  "react-native",
@@ -63,14 +63,12 @@
63
63
  "@types/react": "^18.2.44",
64
64
  "@types/seedrandom": "^3.0.8",
65
65
  "@types/ws": "^8.5.10",
66
- "@typescript-eslint/eslint-plugin": "^8.4.0",
67
- "@typescript-eslint/parser": "^8.4.0",
68
- "@webgpu/types": "0.1.51",
66
+ "@webgpu/types": "0.1.65",
69
67
  "clang-format": "^1.8.0",
70
68
  "del-cli": "^5.1.0",
71
- "eslint": "8",
72
- "eslint-config-react-native-wcandillon": "^3.10.2",
73
- "eslint-plugin-import": "2.27.5",
69
+ "eslint": "9.35.0",
70
+ "eslint-config-react-native-wcandillon": "4.0.1",
71
+ "eslint-plugin-import": "2.32.0",
74
72
  "eslint-plugin-jest": "^28.8.2",
75
73
  "eslint-plugin-prettier": "^5.2.1",
76
74
  "jest": "^29.7.0",
@@ -78,7 +76,7 @@
78
76
  "pixelmatch": "5.3.0",
79
77
  "pngjs": "^7.0.0",
80
78
  "prettier": "^3.0.3",
81
- "puppeteer": "22",
79
+ "puppeteer": "24.24.1",
82
80
  "react": "19.1.0",
83
81
  "react-native": "0.81.4",
84
82
  "react-native-builder-bob": "^0.23.2",
@@ -86,7 +84,7 @@
86
84
  "seedrandom": "^3.0.5",
87
85
  "teapot": "^1.0.0",
88
86
  "ts-morph": "^22.0.0",
89
- "ts-node": "^10.9.2",
87
+ "tsx": "^4.20.5",
90
88
  "typescript": "^5.2.2",
91
89
  "wgpu-matrix": "^3.0.2",
92
90
  "ws": "^8.18.0",
@@ -123,4 +121,4 @@
123
121
  }
124
122
  }
125
123
  }
126
- }
124
+ }
package/src/Canvas.tsx CHANGED
@@ -19,7 +19,6 @@ function generateContextId() {
19
19
  }
20
20
 
21
21
  declare global {
22
- // eslint-disable-next-line no-var
23
22
  var RNWebGPU: {
24
23
  gpu: GPU;
25
24
  fabric: boolean;
@@ -74,7 +74,9 @@ describe("Adapter", () => {
74
74
  });
75
75
  it("isFallback", async () => {
76
76
  const result = await client.eval(({ gpu }) => {
77
- return gpu.requestAdapter().then((adapter) => adapter!.isFallbackAdapter);
77
+ return gpu
78
+ .requestAdapter()
79
+ .then((adapter) => adapter && adapter.info.isFallbackAdapter);
78
80
  });
79
81
  expect(result).toBe(false);
80
82
  });
@@ -6,8 +6,6 @@ import {
6
6
  } from "../components/Wireframe/Shaders";
7
7
  import { client } from "../setup";
8
8
 
9
- type TypedArrayView = Float32Array | Uint32Array;
10
-
11
9
  type Model = {
12
10
  vertexBuffer: GPUBuffer;
13
11
  indexBuffer: GPUBuffer;
@@ -65,14 +63,14 @@ describe("Wireframe", () => {
65
63
  function createBufferWithData(
66
64
  // eslint-disable-next-line @typescript-eslint/no-shadow
67
65
  device: GPUDevice,
68
- data: TypedArrayView,
66
+ data: Float32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>,
69
67
  usage: GPUBufferUsageFlags,
70
68
  ) {
71
69
  const buffer = device.createBuffer({
72
70
  size: data.byteLength,
73
71
  usage,
74
72
  });
75
- device.queue.writeBuffer(buffer, 0, data);
73
+ device.queue.writeBuffer(buffer, 0, data.buffer);
76
74
  return buffer;
77
75
  }
78
76
 
@@ -1,16 +1,7 @@
1
- /* eslint-disable no-var */
2
- import type { Server, WebSocket } from "ws";
3
1
  import { WebSocketServer } from "ws";
4
2
 
5
3
  import { REFERENCE } from "./config";
6
4
 
7
- declare global {
8
- var testServer: Server;
9
- var testClient: WebSocket;
10
- var testOS: "ios" | "android" | "web" | "node";
11
- var testArch: "paper" | "fabric";
12
- }
13
-
14
5
  const isOS = (os: string): os is "android" | "ios" | "web" => {
15
6
  return ["ios", "android", "web"].indexOf(os) !== -1;
16
7
  };
@@ -1,6 +1,5 @@
1
- /* eslint-disable max-len */
2
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /* eslint-disable no-var */
2
+
4
3
  import fs from "fs";
5
4
  import path from "path";
6
5
 
@@ -25,6 +24,7 @@ declare global {
25
24
  var testServer: Server;
26
25
  var testClient: WebSocket;
27
26
  var testOS: TestOS;
27
+ var testArch: "paper" | "fabric";
28
28
  }
29
29
 
30
30
  interface GPUTestingContext {
package/src/hooks.tsx CHANGED
@@ -6,9 +6,10 @@ import type { RNCanvasContext, CanvasRef, NativeCanvas } from "./Canvas";
6
6
  type Unsubscribe = () => void;
7
7
 
8
8
  export const warnIfNotHardwareAccelerated = (adapter: GPUAdapter) => {
9
- if (adapter.isFallbackAdapter) {
9
+ // Check if adapter is a fallback adapter using the new GPUAdapterInfo API
10
+ // Note: isFallbackAdapter was moved from GPUAdapter to GPUAdapterInfo in Chrome 140
11
+ if (adapter.info && adapter.info.isFallbackAdapter) {
10
12
  console.warn(
11
- // eslint-disable-next-line max-len
12
13
  "GPUAdapter is not hardware accelerated. This is common on Android emulators. Rendering will be slow. Some features may be unavailable.",
13
14
  );
14
15
  }