TS8050
Front-end code ENABLE_NAME
A file-level "enable <extension>"; directive that names an extension outside the vocabulary of the WGSL backend's capability profile. A misspelled name would otherwise be an ordinary string statement and silently enable nothing.
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""enable f61";
declare const data: storage<array<f32>, "read_write">
@compute([64])export function main(id: builtin<"global_invocation_id">): void { data[id.x] = data[id.x] * 2.}Compiled at build time against the pinned compiler, this program gets:
TS8050 error, line 2: Unknown WGSL extension "f61". Did you mean "f16"?
How to fix it
The same program, corrected. It compiles with no diagnostic.
"use typeshade""enable f16";
declare const data: storage<array<f32>, "read_write">
@compute([64])export function main(id: builtin<"global_invocation_id">): void { data[id.x] = data[id.x] * 2.}The rule this enforces
- Rule 10.1 Test
- A
"use typeshade"file must not spell a WGSLenableorrequiresstatement.
See also
Source
Where the compiler raises this code at commit af54ddad5, one line per file: