Handle negative float to uint conversion robustly
Converting a negative float to uint is undefined in the GLSL ES 3.00.6
spec.
However, it improves portability if we don't trigger undefined results
in C++ in this case. To do this, we cast negative floats first to
signed integer before casting them to unsigned integer.
We also issue a warning about an undefined conversion in case a
negative float was converted to uint.
BUG=chromium:835868
TEST=angle_unittests
Change-Id: I9835a739ec80699d420a4f91a3bfa112c9a13604
Reviewed-on: https://chromium-review.googlesource.com/1026681Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Showing
Please
register
or
sign in
to comment