mesa: Fix _mesa_float_to_unorm() on 32-bit systems.

This fixes the following CTS test on 32-bit systems:
GTF-GL46.gtf30.GL3Tests.packed_depth_stencil.packed_depth_stencil_init

It does glGetTexImage of a 16-bit SNORM image, requesting 32-bit UNORM
data.  In get_tex_rgba_uncompressed, we round trip through float to
handle image transfer ops for clamping.  _mesa_format_convert does:

   _mesa_float_to_unorm(0.571428597f, 32)

which translated to:

   _mesa_lroundevenf(0.571428597f * 0xffffffffu)

which produced different results on 64-bit and 32-bit systems:

   64-bit: result = 0x92492500
   32-bit: result = 0x80000000

This is because the size of "long" varies between the two systems, and
0x92492500 is too large to fit in a signed 32-bit integer.  To fix this,
we switch to the new _mesa_i64roundevenf function which always does the
64-bit operation.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104395
Fixes: 594fc0f8 ("mesa: Replace F_TO_I() with _mesa_lroundevenf().")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
22 jobs for !1761 with roundevenfix in 3 minutes (queued for 1 minute and 29 seconds)
detached
Status Job ID Name Coverage
  Containers Build
passed #542536
debian

00:00:29

 
  Build+Test
failed #542545
meson-arm64

00:00:08

failed #542544
meson-armhf

00:00:07

failed #542538
meson-clang

00:00:11

failed #542542
meson-clover

00:00:07

failed #542546
meson-i386

00:00:14

failed #542541
meson-main

00:00:17

failed #542537
meson-swr-glvnd

00:01:08

failed #542543
meson-vulkan

00:00:07

failed #542548
scons-llvm

00:00:08

failed #542547
scons-nollvm

00:00:09

failed #542539
scons-swr

00:00:10

failed #542540
scons-win64

00:00:10

 
  Test
skipped #542549
test-llvmpipe-gles2 1/4
skipped #542550
test-llvmpipe-gles2 2/4
skipped #542551
test-llvmpipe-gles2 3/4
skipped #542552
test-llvmpipe-gles2 4/4
skipped #542553
test-softpipe-gles2 1/4
skipped #542554
test-softpipe-gles2 2/4
skipped #542555
test-softpipe-gles2 3/4
skipped #542556
test-softpipe-gles2 4/4
skipped #542557
test-softpipe-gles3-limited
 
Name Stage Failure
failed
scons-llvm Build+Test
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
scons-nollvm Build+Test
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-i386 Build+Test
Running on runner-sGiTXgBC-project-181-concurrent-0 via gst-gitlab-htz-runner2...
Fetching changes...
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: artifacts: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-arm64 Build+Test
Running on runner-sGiTXgBC-project-181-concurrent-0 via gst-gitlab-htz-runner2...
Fetching changes...
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: artifacts: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-armhf Build+Test
Running on runner-sGiTXgBC-project-181-concurrent-0 via gst-gitlab-htz-runner2...
Fetching changes...
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: artifacts: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-vulkan Build+Test
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-clover Build+Test
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-main Build+Test
Running on runner-81280d8f-project-181-concurrent-0 via fdo-gitlab-gce-runner3...
Fetching changes...
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: artifacts: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-swr-glvnd Build+Test
 * [new tag]         vtx-0-2-24112003           -> vtx-0-2-24112003
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
scons-win64 Build+Test
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
scons-swr Build+Test
Reinitialized existing Git repository in /builds/kwg/mesa/.git/
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
meson-clang Build+Test
 - [deleted]                 (none)     -> origin/roundevenfix
Checking out e18cd545 as roundevenfix...
fatal: reference is not a tree: e18cd5452aa4434fb22105eb939843381771b91c
Uploading artifacts...
WARNING: _build/meson-logs/*.txt: no matching files
WARNING: build/*/config.log: no matching files
WARNING: shader-db: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1