Descriptiongpu, cmaa: avoid == for float in GLSL
According to the GLSL spec, GLSL float can represent exact integers between 0 and 2048.
However, some drivers might not respect the spec. So use uint for == operator.
In detail,
1. GLSL uses IEEE 754 float or half float.
https://www.opengl.org/wiki/Data_Type_(GLSL)#Scalars
2. IEEE 754 half float preserves integers between 0 and 2048 exactly represented.
https://en.wikipedia.org/wiki/Half-precision_floating-point_format#Precision_limitations_on_integer_values
BUG=535198
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/3b9374a3373f1f29f4f6a6762e1cddc9aec78549
Cr-Commit-Position: refs/heads/master@{#407466}
Patch Set 1 #
Messages
Total messages: 15 (10 generated)
|