Vulkan: SPIR-V Gen: Support short-circuiting && and ||
When short-circuiting is necessary (because the right-hand side has side
effects), the following code is generated in SPIR-V:
// For left && right:
result = left
if (left)
result = right
// For left || right:
result = left
if (!left)
result = right
Bug: angleproject:4889
Change-Id: Id87b56dc4a1463ed781852a23d2ba6eb2015d700
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2953366
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Tim Van Patten <timvp@google.com>
Showing
Please
register
or
sign in
to comment