TS8015
Front-end code BACKEND
A backend that refused to emit a module the front end accepted. The message is the backend's own.
The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.
The registry text and every compiler message on these pages are the compiler's own English.
Example
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([64])export function double(@builtin("global_invocation_id") id: vec3u): void { data[id.x] = data[id.x] * 2.}
@fragmentexport function main(@location(0) uv: vec2): vec4 { return vec4(uv, 0., 1.)}Compiled at build time against the pinned compiler, this program gets:
TS8015 warning, line 1: Backend emit failed: backend 'glsl-es300' cannot emit this module — missing capabilities: storageBuffer, compute
How to fix it
The same program, corrected. It compiles with no diagnostic.
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([64])export function double(@builtin("global_invocation_id") id: vec3u): void { data[id.x] = data[id.x] * 2.}The rules this enforces
- Rule 6.6 Test
- An entry point’s inputs and outputs are explicit parameters and return values; every parameter and every field of an entry I/O struct must carry
@builtin("...")or@location(n), and the builtin name must be one WGSL defines for that stage and direction. - Rule 12.3 Test
- Severity must follow the target’s role: a program WGSL refuses must be an error; a shortfall of GLSL ES 3.00 on a module with a render entry must be a warning that leaves
wgslin place; a compute-only module’s GLSL shortfall must be no diagnostic at all.
See also
Source
Where the compiler raises this code at commit 26de7be8, one line per file: