-
Notifications
You must be signed in to change notification settings - Fork 345
Closed
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specificationResolved - waiting for a change to the WGSL specification
Milestone
Description
The rule for analysing the uniformity of break if statements (here) currently throws away the value node V representing the uniformity of the expression. This leads the following shader to be incorrectly accepted as uniform under the analysis in the language spec, making it unsound:
@compute @workgroup_size(16)
fn main(@builtin(local_invocation_index) lid: u32) {
loop {
workgroupBarrier();
continuing {
break if lid < 0;
}
}
}
It seems that the rule for break if statements should add an edge from CF' to V to signify that the uniformity going forward depends on the uniformity of V. This appears to be the approach that tint takes which leads it to correctly identify this example as non-uniform.
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specificationResolved - waiting for a change to the WGSL specification
Type
Projects
Status
Done