Skip to content

Commit 93573bc

Browse files
committed
[naga] Update Emit documentation.
Update the "`Expression` evaluation time" section in `naga::ir` to include `SubgroupBallotResult` and `SubgroupOperationResult` in the set of expressions that don't need to be covered by an `Emit` statement.
1 parent 4fe6176 commit 93573bc

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

naga/src/ir/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ Naga's rules for when `Expression`s are evaluated are as follows:
9191
[`RayQuery`] statement whose [`Proceed::result`] points to it is
9292
executed.
9393
94+
- A [`SubgroupBallotResult`] expression is evaluated when the
95+
[`SubgroupBallot`] statement whose [`result`][Statement::SubgroupBallot::result]
96+
field points to it is executed.
97+
98+
- A [`SubgroupOperationResult`] expression is evaluated when the
99+
[`SubgroupCollectiveOperation`] statement whose
100+
[`result`][Statement::SubgroupCollectiveOperation::result]
101+
field points to it is executed.
102+
94103
- All other expressions are evaluated when the (unique) [`Statement::Emit`]
95104
statement that covers them is executed.
96105
@@ -179,6 +188,8 @@ An override expression can be evaluated at pipeline creation time.
179188
180189
[`AtomicResult`]: Expression::AtomicResult
181190
[`RayQueryProceedResult`]: Expression::RayQueryProceedResult
191+
[`SubgroupBallotResult`]: Expression::SubgroupBallotResult
192+
[`SubgroupOperationResult`]: Expression::SubgroupOperationResult
182193
[`CallResult`]: Expression::CallResult
183194
[`Constant`]: Expression::Constant
184195
[`ZeroValue`]: Expression::ZeroValue
@@ -196,6 +207,8 @@ An override expression can be evaluated at pipeline creation time.
196207
[`Emit`]: Statement::Emit
197208
[`Store`]: Statement::Store
198209
[`RayQuery`]: Statement::RayQuery
210+
[`SubgroupBallot`]: Statement::SubgroupBallot
211+
[`SubgroupCollectiveOperation`]: Statement::SubgroupCollectiveOperation
199212
200213
[`Proceed::result`]: RayQueryFunction::Proceed::result
201214

0 commit comments

Comments
 (0)