-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Description
Naga const evaluator does not correctly handle binary comparisons, divisions by zero, and short circuiting.
Examples
- Binary comparisons
const lhs = false;
const rhs = false;
const foo = lhs > rhs; // Expected validation error
Relevant CTS: webgpu:shader,validation,expression,binary,comparison:*
I'll fix this soon
- Divisions by zero
fn f() {
var v = 1;
v /= 0; // Expected validation error
}
Relevant CTS: webgpu:shader,validation,expression,binary,div_rem:*
- Short circuiting
const lhs = false;
const rhs = vec2(false, false);
const foo = lhs && rhs; // Expected validation error
Relevant CTS: webgpu:shader,validation,expression,binary,short_circuiting_and_or:*
- And, Or operations on bool (not short-circuiting)
const lhs = false;
const rhs = false;
const foo : bool = lhs | rhs; // Unexpected validation error
Relevant CTS: webgpu:shader,validation,expression,binary,and_or_xor:*
I'll fix this soon
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo