diff --git a/wgsl/index.bs b/wgsl/index.bs index 3a2060fab9..79a396774c 100644 --- a/wgsl/index.bs +++ b/wgsl/index.bs @@ -694,14 +694,14 @@ A [=diagnostic=] has the following properties: * A [=diagnostic/triggering location=]. The severity of a diagnostic is one of the following, ordered from greatest to least: -: error +: error :: The diagnostic is an error. This corresponds to a [=shader-creation error=] or to a [=pipeline-creation error=]. -: warning +: warning :: The diagnostic describes an anomaly that merits the attention of the application developer, but is not an error. -: info +: info :: The diagnostic describes a notable condition that merits attention of the application developer, but is not an error or warning. -: off +: off :: The diagnostic is disabled. It will not be conveyed to the application. The name of a [=diagnostic/triggering rule=] is either: @@ -7121,7 +7121,7 @@ first a [=read access=] gets the old value, and then a [=write access=] stores t A compound assignment can rewritten as different WGSL code that uses a [=simple assignment=] instead. The idea is to use a pointer to hold the result of evaluating the reference once. -

For example, +

For example, when |e1| is *not* a reference to a component inside a vector, then
|e1|` += `|e2|; @@ -7131,9 +7131,8 @@ can be rewritten as `{ let p = &(`|e1|`); *p = *p + (`|e2|`); }`
where the identifier `p` is chosen to be different from all other identifiers in the program. -

- -

When +

+
When |e1| is a reference to a component inside a vector, the above technique needs to be modified because WGSL does not allow [[#address-of-expr|taking the address]] in that case. For example, if ev is a reference to a vector, the statement @@ -9718,7 +9717,7 @@ User-defined data can be passed as input to the start of a pipeline, passed between stages of a pipeline or output from the end of a pipeline. Each user-defined input datum and -user-defined output datum [=shader-creation error|must=]: +user-defined output datum [=shader-creation error|must=]: * be of [=numeric scalar=] type or [=numeric vector=] type. * be assigned an IO location. See [[#input-output-locations]]. @@ -10002,7 +10001,7 @@ is determined from the size of the corresponding {{GPUBufferBinding}}: * Let |EBS| be the [=effective buffer binding size=] for the {{GPUBufferBinding}} bound to the pipeline binding address corresponding to the storage buffer variable. -* Then NRuntime, i.e. +* Then NRuntime, i.e. the number of elements in the runtime-sized array, is the largest integer such that [=SizeOf=](|T|) ≤ |EBS|. @@ -10103,7 +10102,6 @@ The following table shows examples of [=NRuntime=] for the `point` member of the 102531[=truncate=]( ( 1025 - 16 ) ÷ 32) ) 103931[=truncate=]( ( 1039 - 16 ) ÷ 32) ) 104032[=truncate=]( ( 1040 - 16 ) ÷ 32) ) -
@@ -12479,7 +12477,7 @@ An [[!IEEE-754|IEEE-754]] binary floating point type approximates the [=extended * A 1-bit sign field. * A fixed-width exponent field. * A fixed-width trailing significand field. - * An integer-valued exponent bias related to interpretation of the [=ieee754/exponent field=]. + * An integer-valued exponent bias related to interpretation of the [=ieee754/exponent field=]. The finite range of a floating point type is the [=interval=] [|low|, |high|], where |low| is the lowest finite value in the type, and |high| is the highest finite value in the type.