TS8050
프런트엔드 코드 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).
레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.
발생 조건
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.
예제
"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.}빌드할 때 고정된 컴파일러로 이 프로그램을 컴파일하면 다음 진단이 나옵니다.
TS8050 error, 2행: Unknown WGSL extension "f61". Did you mean "f16"?
고치는 법
같은 프로그램을 고친 모습입니다. 진단 없이 컴파일됩니다.
"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.}이 코드가 적용하는 규칙
- 규칙 10.1 테스트
- A
"use typeshade"file must not spell a WGSLenableorrequiresstatement.
함께 보기
소스
커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.