BabylonJS/Babylon.js · error
createComputePipelineContext: This engine does not support c
Error message
createComputePipelineContext: This engine does not support compute shaders!
What it means
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.
Source
Thrown at packages/dev/core/src/Engines/Extensions/engine.computeShader.pure.ts:84
export type ComputeBindingList = { [key: string]: { type: ComputeBindingType; object: any; indexInGroupEntries?: number } };
let _Registered = false;
/**
* Register side effects for enginesExtensionsEngineComputeShader.
* Safe to call multiple times; only the first call has an effect.
*/
export function RegisterEnginesExtensionsEngineComputeShader(): void {
if (_Registered) {
return;
}
_Registered = true;
ThinEngine.prototype.createComputeEffect = function (baseName: IComputeShaderPath & { computeToken?: string }, options: IComputeEffectCreationOptions): ComputeEffect {
throw new Error("createComputeEffect: This engine does not support compute shaders!");
};
ThinEngine.prototype.createComputePipelineContext = function (): IComputePipelineContext {
throw new Error("createComputePipelineContext: This engine does not support compute shaders!");
};
ThinEngine.prototype.createComputeContext = function (): IComputeContext | undefined {
return undefined;
};
ThinEngine.prototype.computeDispatch = function (
effect: ComputeEffect,
context: IComputeContext,
bindings: ComputeBindingList,
x: number,
y?: number,
z?: number,
bindingsMapping?: ComputeBindingMapping
): void {
throw new Error("computeDispatch: This engine does not support compute shaders!");
};
View on GitHub (pinned to 0592b347b8)
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.
Example fix
// before
const ctx = engine.createComputePipelineContext();
// after
if (!engine.isWebGPU) {
throw new Error('Compute requires WebGPU engine');
}
const ctx = engine.createComputePipelineContext(); Defensive patterns
Strategy: validation
Validate before calling
if (!engine.isWebGPU) {
throw new Error('createComputePipelineContext requires WebGPU');
} Type guard
function isComputeEngine(e: AbstractEngine): e is WebGPUEngine {
return (e as any).isWebGPU === true;
} Try / catch
try {
const ctx = engine.createComputePipelineContext();
} catch (e) {
if (String((e as Error).message).includes('compute shaders')) {
handleNoCompute();
} else { throw e; }
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Same family as createComputeEffect failure: WebGPU unavailable at runtime, engine fallback to WebGL2, custom engine wrappers that bypass WebGPUEngine, or tests running against ThinEngine.
Related errors
- createComputeEffect: This engine does not support compute sh
- computeDispatch: This engine does not support compute shader
- computeDispatchIndirect: This engine does not support comput
- Atmosphere is not supported on WebGL ${engine.version}.
- Instanced arrays are required for MSDF text rendering.
AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30).
Data as JSON: /api/errors/193070bf07eb712c.
Report an issue: GitHub.