summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Yiwei Zhang <zzyiwei@google.com> 2019-07-30 22:31:41 -0700
committer Yiwei Zhang <zzyiwei@google.com> 2019-07-31 17:09:42 -0700
commitb1b0b011ba0884964219f6d2421f99efa6f9ed42 (patch)
tree613f0b6e58bbbea9188c175dcc2d7c28291592ca /vulkan/libvulkan/api.cpp
parent42e353bc6f15ad9822fcc236ae3a58d811d83a29 (diff)
vkjson: correctly handle std::numeric_limits<float>::infinity()
Java JSON library can't handle infinity value. So if vkjson reports infinity limit, we need to manually clamp the value within the Java JSON value range. Up-casting float infinity will be equal to double infinity, and we need to make sure the text representation is not going out of range between the cppjson to Java json converison, so we have to clamp to a safe min/max range of double. Bug: 134453786 Test: adb shell cmd gpu vkjson Change-Id: I498fbcdb76ec55d6443ca202af191d6fb12fec12
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions