glsl: Fix round64 conversion function
authorSagar Ghuge <sagar.ghuge@intel.com>
Mon, 24 Jun 2019 22:10:53 +0000 (15:10 -0700)
committerSagar Ghuge <sagar.ghuge@intel.com>
Tue, 25 Jun 2019 22:19:10 +0000 (15:19 -0700)
commit06807e1948f1bced9806b00908c892f1e3c3db5b
treee9d4d9f93d9acc8d177bf122e1d88a6a4ccbc0f2
parente8f4c9f56c068411389ea87ae4c2a772b77d273e
glsl: Fix round64 conversion function

Fix round64 function to handle round to nearest even cases specially
with positive and negative numbers with fraction part 0.5.

v2: 1) Simplify unused bits (Elie Tournier)

Fixes:
   KHR-GL45.gpu_shader_fp64.builtin.round_dvec2
   KHR-GL45.gpu_shader_fp64.builtin.round_dvec3
   KHR-GL45.gpu_shader_fp64.builtin.round_dvec4
   KHR-GL45.gpu_shader_fp64.builtin.roundeven_double
   KHR-GL45.gpu_shader_fp64.builtin.roundeven_dvec2
   KHR-GL45.gpu_shader_fp64.builtin.roundeven_dvec3
   KHR-GL45.gpu_shader_fp64.builtin.roundeven_dvec4

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
src/compiler/glsl/float64.glsl