@diagnostic
어트리뷰트
Sets the severity of a WGSL diagnostic rule for the whole module, as in @diagnostic("off", "derivative_uniformity") on an entry.
이름마다 붙은 시그니처와 설명은 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
declare function diagnostic(severity: string, rule: string): (target: Function, context?: unknown) => void매개변수
-
severitystring -
rulestring
선언에는 TypeScript 데코레이터 런타임이 넘겨주는 target과 context도 적혀 있습니다. 호출에서는 둘 다 쓰지 않습니다.
설명
Written on the entry, emitted as the module-scope diagnostic(off, derivative_uniformity);, because WGSL's function attribute does not reach the functions the entry calls. One rule is analysed here: derivative_uniformity.