Hey everyone,
I am having a problem when trying to enable webGPU in our platform.
I am doing this to initiate the engine.
const engine = !useWebGPU ? undefined : await Common.triAsync(async () => { const eng = new WebGPUEngine(canvas, { doNotHandleContextLost: true, doNotHandleTouchAction: true, deterministicLockstep: true, lockstepMaxSteps: 4, powerPreference: 'high-performance', }); await eng.initAsync(); return eng; }).getOrElseValue(undefined);
I get this error when running the code-
Cannot read properties of null (reading ‘getCurrentTexture’)
TypeError: Cannot read properties of null (reading ‘getCurrentTexture’)
at WebGPUEngine._startMainRenderPass (webpack-internal:///./node_modules/@babylonjs/core/Engines/webgpuEngine.js:2157:48)
at WebGPUEngine.clear (webpack-internal:///./node_modules/@babylonjs/core/Engines/webgpuEngine.js:996:22)
at Scene._clear (webpack-internal:///./node_modules/@babylonjs/core/scene.js:3670:26)
at Scene._clearFrameBuffer (webpack-internal:///./node_modules/@babylonjs/core/scene.js:3428:22)
at Scene.render (webpack-internal:///./node_modules/@babylonjs/core/scene.js:3802:14)
at eval (webpack-internal:///./src/Client.ts:590:25)
at WebGPUEngine._renderFrame (webpack-internal:///./node_modules/@babylonjs/core/Engines/engine.js:811:13)
at WebGPUEngine._renderLoop (webpack-internal:///./node_modules/@babylonjs/core/Engines/engine.js:838:26)
at _boundRenderFunction (webpack-internal:///./node_modules/@babylonjs/core/Engines/thinEngine.js:1251:52)
The error seems to happen when the render loop begins to run.
Any insights into what the issue could be would be very helpful.
Thanks!