@diagnostic
Attribute
Sets the severity of a WGSL diagnostic rule for the whole module, as in @diagnostic("off", "derivative_uniformity") on an entry.
The signature and the sentence under each name are the compiler's own text at commit 26de7be8.
Syntax
declare function diagnostic(severity: string, rule: string): (target: Function, context?: unknown) => voidParameters
-
severitystring -
rulestring
The declaration also names what the TypeScript decorator runtime hands a decorator, target and context. A call passes neither.
Description
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.