Skip to content

Commit

Permalink
Allow textures and samplers in phony assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dneto0 committed Oct 6, 2021
1 parent a1603b5 commit 34dfcd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wgsl/index.bs
Expand Up @@ -4910,7 +4910,7 @@ The right-hand side is evaluated, and then ignored.
</thead>
<tr algorithm="phony-assignment">
<td>|e|: |T|,<br>
|T| is [=constructible=], or a [=pointer type=]
|T| is [=constructible=], a [=pointer type=], a [=texture=] type, or a [=sampler=] type
<td class="nowrap">_ = |e|
<td>Evaluates |e|.

Expand All @@ -4924,7 +4924,7 @@ A phony-assignment is useful for:
* [=statically accessed|Statically accessing=] a variable, thus establishing it as a part of
the [=resource interface of a shader|shader's resource interface=].

Note: A variable's store type may not be constructible, e.g. it contains an atomic type, or a runtime-sized array.
Note: A buffer variable's store type may not be constructible, e.g. it contains an atomic type, or a runtime-sized array.
In these cases, use a pointer to the variable's contents instead.

<div class='example wgsl global-scope' heading='Using phony-assignment to throw away an un-needed function result'>
Expand Down Expand Up @@ -4960,8 +4960,8 @@ A phony-assignment is useful for:
// Declare that buf, t, and s are part of the shader interface, without
// using them for anything.
_ = &buf;
_ = &t;
_ = &s;
_ = t;
_ = s;
return vec4<f32>();
}
</xmp>
Expand Down

0 comments on commit 34dfcd2

Please sign in to comment.