llvmpipe: fix d32 unorm depth conversions.
authorDave Airlie <airlied@redhat.com>
Wed, 22 Apr 2020 00:05:59 +0000 (10:05 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 27 Apr 2020 02:35:24 +0000 (12:35 +1000)
commit1f071db43a676c17c1765434ed0abfcf3d659815
tree7cb800cb7fee31dbcefcf8c0d7f5d85e72ad4d0f
parentfe5a8e1ace61cead276d0293c595536b1b9e48c8
llvmpipe: fix d32 unorm depth conversions.

When the depth value was 1.0 and was being converted to Z32_UNORM
the conversion would scale it up to INT32_MAX + 1 which would
cause FPToSI to give incorrect results, changing it to use
FPToUI for the unsigned 32-bit case only fixes it.

Fixes:
GTF-GL45.gtf30.GL3Tests.depth_texture.depth_texture_fbo_clear

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
src/gallium/auxiliary/gallivm/lp_bld_conv.c