TS8050
Front-end code ENABLE_NAME
A file-level "enable <extension>"; directive (§50) naming an extension outside the vocabulary the WGSL backend's capability profile carries a directive for (clip_distances, dual_source_blending, f16, primitive_index, subgroups).
The registry text and every compiler message on these pages are the compiler's own English.
When it fires
A file-level "enable <extension>"; directive (§50) naming an extension outside the vocabulary the WGSL backend's capability profile carries a directive for (clip_distances, dual_source_blending, f16, primitive_index, subgroups). A misspelled name would otherwise be an ordinary string expression statement and silently enable nothing.
Example
"use typeshade""enable f61";
declare const data: storage<array<f32>, "read_write">
@compute([64])export function main(@builtin("global_invocation_id") id: vec3u): 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(@builtin("global_invocation_id") id: vec3u): 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 26de7be8, one line per file: