r600/fp64: fix integer->double conversion
authorDave Airlie <airlied@redhat.com>
Mon, 29 Jan 2018 00:55:15 +0000 (10:55 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 5 Feb 2018 22:21:48 +0000 (08:21 +1000)
commit35b430157776e8a87a1879dbc136f3cb3f599df1
tree51736cad32cee515d39e64a4efc871127fad93aa
parent0170ae1e2351d9ced0069f5cb48b58cabb23926b
r600/fp64: fix integer->double conversion

Doing a straight uint/int->fp32->fp64 conversion causes
some precision issues, Roland suggested splitting the
integer into two portions and doing two separate
int->fp32->fp64 conversions then adding the results.

This passes the tests in CTS and piglit.

[airlied: fix cypress conversion opcodes]
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c