{"record":{"id":"193070bf07eb712c","repo":"BabylonJS/Babylon.js","slug":"createcomputepipelinecontext-this-engine-does-not","errorCode":null,"errorMessage":"createComputePipelineContext: This engine does not support compute shaders!","messagePattern":"createComputePipelineContext: This engine does not support compute shaders!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/Engines/Extensions/engine.computeShader.pure.ts","lineNumber":84,"sourceCode":"export type ComputeBindingList = { [key: string]: { type: ComputeBindingType; object: any; indexInGroupEntries?: number } };\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for enginesExtensionsEngineComputeShader.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterEnginesExtensionsEngineComputeShader(): void {\r\n    if (_Registered) {\r\n        return;\r\n    }\r\n    _Registered = true;\r\n\r\n    ThinEngine.prototype.createComputeEffect = function (baseName: IComputeShaderPath & { computeToken?: string }, options: IComputeEffectCreationOptions): ComputeEffect {\r\n        throw new Error(\"createComputeEffect: This engine does not support compute shaders!\");\r\n    };\r\n\r\n    ThinEngine.prototype.createComputePipelineContext = function (): IComputePipelineContext {\r\n        throw new Error(\"createComputePipelineContext: This engine does not support compute shaders!\");\r\n    };\r\n\r\n    ThinEngine.prototype.createComputeContext = function (): IComputeContext | undefined {\r\n        return undefined;\r\n    };\r\n\r\n    ThinEngine.prototype.computeDispatch = function (\r\n        effect: ComputeEffect,\r\n        context: IComputeContext,\r\n        bindings: ComputeBindingList,\r\n        x: number,\r\n        y?: number,\r\n        z?: number,\r\n        bindingsMapping?: ComputeBindingMapping\r\n    ): void {\r\n        throw new Error(\"computeDispatch: This engine does not support compute shaders!\");\r\n    };\r\n\r","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/Engines/Extensions/engine.computeShader.pure.ts#L66-L102","documentation":"This is the second stub thrown by the compute-shader extension registered on engines without compute support. ThinEngine.prototype.createComputePipelineContext is replaced with a throwing stub so any attempt to build a GPU compute pipeline context on a non-compute engine fails loudly. Only WebGPU-style engines provide a real implementation.","triggerScenarios":"Calling engine.createComputePipelineContext() on a WebGL-based ThinEngine/Engine, typically indirectly through ComputeEffect creation, pipeline creation, or lower-level compute plumbing when the engine does not support compute shaders.","commonSituations":"Same family as createComputeEffect failure: WebGPU unavailable at runtime, engine fallback to WebGL2, custom engine wrappers that bypass WebGPUEngine, or tests running against ThinEngine.","solutions":["Use a WebGPU engine so the real createComputePipelineContext implementation is registered (EngineFactory.CreateAsync with webgpu).","Guard with engine.isWebGPU / supportComputeShaders capability check before touching compute pipeline APIs.","Refactor code to skip compute pipeline setup on non-compute engines and use a rendering-only fallback.","Verify the correct full-engine bundle is loaded so RegisterFullEngineExtensions registered the WebGPU compute path."],"exampleFix":"// before\nconst ctx = engine.createComputePipelineContext();\n// after\nif (!engine.isWebGPU) {\n    throw new Error('Compute requires WebGPU engine');\n}\nconst ctx = engine.createComputePipelineContext();","handlingStrategy":"validation","validationCode":"if (!engine.isWebGPU) {\n    throw new Error('createComputePipelineContext requires WebGPU');\n}","typeGuard":"function isComputeEngine(e: AbstractEngine): e is WebGPUEngine {\n    return (e as any).isWebGPU === true;\n}","tryCatchPattern":"try {\n    const ctx = engine.createComputePipelineContext();\n} catch (e) {\n    if (String((e as Error).message).includes('compute shaders')) {\n        handleNoCompute();\n    } else { throw e; }\n}","preventionTips":["Gate all compute pipeline setup behind a WebGPU capability check","Keep compute code isolated in a module that only loads on WebGPU engines","Verify the correct full-engine bundle registers WebGPU extensions","Add integration tests running under WebGL to catch accidental compute usage"],"tags":["webgpu","compute-shaders","engine-capability","pipeline"],"backgroundTag":"compute-shaders-not-supported","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}