You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Detectable errors will generate diagnostics.
- Most diagnostics are not filterable. They can only be so
if triggered by one of a few enumerated filterable triggering rules.
- Fix the description of where diagnostics go if processing during
shader-creaiton or pipeline-creation.
Once a [=diagnostic=] is [=triggered=], WGSL provides filtering mechanisms to discard the diagnostic, or to modify its severity.
544
+
Once a [=diagnostic=] with a filterable [=diagnostic/triggering rule=] is [=triggered=], WGSL provides mechanisms to discard the diagnostic, or to modify its severity.
540
545
541
546
A <dfn noexport>diagnostic filter</dfn> *DF* has three parameters:
542
547
* *AR*: a range of source text known as the <dfn noexport>affected range</dfn>
@@ -556,6 +561,8 @@ A range diagnostic filter is specified as a `@diagnostic` [=attribute=] immediat
556
561
* When specified as one of the attributes immediately preceding a [=syntax/call_phrase=],
557
562
the [=affected range=] is the entire phrase (e.g. including the function call arguments).
558
563
564
+
Issue: [#3689](https://github.com/gpuweb/gpuweb/issues/3689) Refine range diagnostic filters: where they can be applied, and associated affected ranges.
565
+
559
566
<div class='example wgsl global-scope' heading='Range diagnostic filter on texture sampling'>
560
567
<xmp highlight='rust'>
561
568
var<private> d: f32;
@@ -575,7 +582,7 @@ A range diagnostic filter is specified as a `@diagnostic` [=attribute=] immediat
575
582
</div>
576
583
577
584
A <dfn noexport>global diagnostic filter</dfn> is a diagnostic filter whose [=affected range=] is the whole WGSL program.
578
-
It is a [=directive=], thus appearing before any module-scope declarations.
585
+
It is a [=directive=], thus appearing before any [=module-scope=] declarations.
579
586
It is spelled like the attribute form, but without the leading `@` (U+0040) codepoint, and with a terminating semicolon.
580
587
581
588
<div class='example wgsl global-scope' heading='Global diagnostic filter for derivative uniformity'>
0 commit comments