You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"test:manual": "xvfb-maybe -- electron --enable-unsafe-webgpu --enable-features=Vulkan --use-vulkan=swiftshader --use-webgpu-adapter=swiftshader --no-sandbox test/ci/main_manual.js",
46
46
"test:ci": "xvfb-maybe -- electron --enable-unsafe-webgpu --enable-features=Vulkan --use-vulkan=swiftshader --use-webgpu-adapter=swiftshader --no-sandbox test/ci/main.js",
47
47
"docs": "npm run docs:core && npm run docs:physics && npm run docs:physics-rapier && npm run docs:media && npm run docs:stats && npm run docs:particle && npm run docs:graphic",
expect(e.message).toEqual('GPU resource already bound to a different Engine3D. Each GPU-bearing resource may only be used by one engine. Clone the CPU data to share across engines.');
238
+
240
239
}
241
-
expect(threw).toEqual(true);
242
240
});
243
241
244
-
awaittest('Plan B: each engine with its own independent scene graph renders fine',async()=>{
245
-
// Under Plan B, users create per-engine Geometry/Material/Texture and
246
-
// render them independently. Built-in materials accept an optional
247
-
// `Context3D` arg so default-textures bind to the right device. Geometry
248
-
// buffers bind to their engine's Context3D at first render.
249
-
consthostA2=newObject3D();
250
-
hostA2.name='planBHostA';
251
-
hostA2.transform.y=25;
252
-
constmrA2=hostA2.addComponent(MeshRenderer);
253
-
mrA2.geometry=newSphereGeometry(10,16,16);
254
-
constmatA2=newLitMaterial(engineA.context3D);
255
-
matA2.baseColor=newColor(1,0.6,0.2,1);
256
-
mrA2.material=matA2;
257
-
viewA.scene.addChild(hostA2);
258
-
259
-
consthostB2=newObject3D();
260
-
hostB2.name='planBHostB';
261
-
hostB2.transform.y=-25;
262
-
constmrB2=hostB2.addComponent(MeshRenderer);
263
-
mrB2.geometry=newSphereGeometry(10,16,16);
264
-
constmatB2=newLitMaterial(engineB.context3D);
265
-
matB2.baseColor=newColor(0.2,0.4,1,1);
266
-
mrB2.material=matB2;
267
-
viewB.scene.addChild(hostB2);
268
-
269
-
conststartA=engineA.frameCount;
270
-
conststartB=engineB.frameCount;
271
-
for(leti=0;i<20;i++)awaitdelay(50);
272
-
constdeltaA=engineA.frameCount-startA;
273
-
constdeltaB=engineB.frameCount-startB;
274
-
275
-
console.log('[multi] Plan B engineA advanced',deltaA,'engineB advanced',deltaB);
242
+
// disposal GPU process will crash on Linux + SwiftShader.
0 commit comments