-
Use VK_TRUE/VK_FALSE consistently · 85035be3Nicolas Capens authored
The spec states that "Applications must not pass any other values than VK_TRUE or VK_FALSE into a Vulkan implementation where a VkBool32 is expected." So we should avoid the use of C++ true/false and literal 0/1 when dealing with VkBool32 values. Note that we test for 'condition != VK_FALSE' to evaluate whether the condition should be interpreted as true. This is both more efficient than testing for 'condition == VK_TRUE' and follows the principle of least surprise in the event an application does provide another value. Bug: b/134584057 Change-Id: I219172a2c538b0f0cb3f173ffd905adb8814b932 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32408 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Chris Forbes <chrisforbes@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
85035be3
×