pan/bi: Handle fsqrt like the DDK

There are 4 distinct cases of fsqrt:

1. FP16 on Bifrost

Here we may use lower to `x * rsqrt(x)` with a .left modifier on the
FMA_RSCALE.v2f16 used to carry out the multiplication, ensuring correct
handling of NaN and Inf.

2. FP32 on G71

Missing FRSQ.f32 instruction, do something simple since we don't even
probe the driver on G71...

3. FP32 on G72 and newer

We can do the same lowering as FP16 in theory. However, this may have
precision issues. The DDK uses extra FREXPM/FREXPE instructions in a
.sqrt mode for a range reduction. It's unknown if this is necessary for
OpenGL (ES), Vulkan, OpenCL, or some combination thereof.

4. FP16 on Valhall

We want to use the same strategy as on Bifrost, but Valhall removed the
FMA_RSCALE.v2f16 instruction. Instead we use an ordinary FMA.v2f16 for
the multiply and check the special case explicitly with CSEL.v2f32 ...
I'm not sure if this is right for infinity but the DDK does it so ¯\_(ツ)_/¯

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
70 jobs for valhall
latest
Status Name Job ID Coverage
  Container
manual debian/arm_build #12867552
aarch64 manual
manual debian/x86_build-base #12867550
manual
manual debian/x86_test-base #12867551
manual
manual fedora/x86_build #12867553
manual
manual windows_build_vs2019 #12867554
windows shell 1809 mesa manual
 
  Container 2
created debian/android_build #12867559
created debian/i386_build #12867556
created debian/ppc64el_build #12867557
created debian/s390x_build #12867558
created debian/x86_build #12867555
created debian/x86_test-gl #12867560
created debian/x86_test-vk #12867561
created kernel+rootfs_amd64 #12867562
created kernel+rootfs_arm64 #12867563
aarch64
created kernel+rootfs_armhf #12867564
aarch64
 
  Build X86 64
created debian-clang #12867571
created debian-clover #12867572
created debian-clover-testing #12867567
created debian-gallium #12867568
created debian-release #12867569
created debian-testing #12867565
created debian-testing-asan #12867566
created debian-vulkan #12867573
created fedora-release #12867570
 
  Build Misc
created debian-android #12867575
created debian-arm64 #12867577
aarch64
created debian-arm64-asan #12867578
aarch64
created debian-arm64-build-test #12867579
aarch64
created debian-armhf #12867576
aarch64
created debian/arm_test #12867574
created debian-i386 #12867580
created debian-mingw32-x86_64 #12867581
 
  Amd
created radv-navy_flounder-traces #12867583
amdgpu:codename:NAVY_FLOUNDER manual
created radv-navy_flounder-vkd3d-proton #12867582
amdgpu:codename:NAVY_FLOUNDER manual
created radv_polaris10_vkcts #12867585
polaris10 manual
created radv-raven-traces #12867584
amdgpu:codename:RAVEN manual
 
  Intel
created i915-g33-deqp #12867586
anholt-g33 manual
created i915-g33-piglit #12867587
anholt-g33 manual
created i915-g33-traces #12867588
anholt-g33 manual
created iris-apl-gl #12867589
mesa-ci-x86-64-lava-asus-C523NA-A20057-coral manual
created iris-glk-egl #12867594
mesa-ci-x86-64-lava-hp-x360-12b-n4000-octopus manual
created iris-glk-gl #12867593
mesa-ci-x86-64-lava-hp-x360-12b-n4000-octopus manual
created iris-glk-gles2 #12867590
mesa-ci-x86-64-lava-hp-x360-12b-n4000-octopus manual
created iris-glk-gles3 #12867591
mesa-ci-x86-64-lava-hp-x360-12b-n4000-octopus manual
created iris-glk-gles31 #12867592
mesa-ci-x86-64-lava-hp-x360-12b-n4000-octopus manual
created iris-glk-traces #12867595
mesa-ci-x86-64-lava-hp-x360-12b-n4000-octopus manual
created iris-kbl-traces #12867596
mesa-ci-x86-64-lava-hp-x360-14-G1-sona manual
 
  Arm
created panfrost-g52-gles31:arm64 #12867599
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
created panfrost-g52-gles3:arm64 1/2 #12867597
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
created panfrost-g52-gles3:arm64 2/2 #12867598
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
 
  Broadcom
created vc4-rpi3-piglit-quick_gl:armhf 1/4 #12867600
igalia-rpi3 manual
created vc4-rpi3-piglit-quick_gl:armhf 2/4 #12867601
igalia-rpi3 manual
created vc4-rpi3-piglit-quick_gl:armhf 3/4 #12867602
igalia-rpi3 manual
created vc4-rpi3-piglit-quick_gl:armhf 4/4 #12867603
igalia-rpi3 manual
created vc4-rpi3-piglit-quick_shader:armhf 1/2 #12867604
igalia-rpi3 manual
created vc4-rpi3-piglit-quick_shader:armhf 2/2 #12867605
igalia-rpi3 manual
 
  Freedreno
created a530_piglit_gl #12867606
google-freedreno-db820c manual
created a630_gles_asan #12867607
google-freedreno-cheza manual
created a630_vk_asan #12867610
google-freedreno-cheza manual
created a630_vk_full 1/2 #12867608
google-freedreno-cheza manual
created a630_vk_full 2/2 #12867609
google-freedreno-cheza manual
 
  Software Renderer
created softpipe-asan-gles31 #12867613
created softpipe-deqp 1/2 #12867611
created softpipe-deqp 2/2 #12867612
 
  Layered Backends
created virgl-on-gles 1/6 #12867614
kvm manual
created virgl-on-gles 2/6 #12867615
kvm manual
created virgl-on-gles 3/6 #12867616
kvm manual
created virgl-on-gles 4/6 #12867617
kvm manual
created virgl-on-gles 5/6 #12867618
kvm manual
created virgl-on-gles 6/6 #12867619
kvm manual