-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wgsl-in, glsl-in: Short circuit || and &&
- Loading branch information
1 parent
48e7938
commit 55c898d
Showing
19 changed files
with
1,414 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#version 460 core | ||
|
||
bool a() { return true; } | ||
bool b() { return true; } | ||
bool c() { return true; } | ||
bool d() { return true; } | ||
|
||
void main() { | ||
bool out1 = a() || b() || c(); | ||
bool out2 = a() && b() && c(); | ||
bool out3 = (a() || b()) && (c() || d()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
( | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
fn a() -> bool { return true; } | ||
fn b() -> bool { return true; } | ||
fn c() -> bool { return true; } | ||
fn d() -> bool { return true; } | ||
|
||
@compute @workgroup_size(1) | ||
fn main() { | ||
_ = a() || b() || c(); | ||
_ = a() && b() && c(); | ||
_ = (a() || b()) && (c() || d()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.