gallivm/sample: always square rho before fast log2

The fast log2 works better if rho is squared, i.e.

fast_log2(sqrt(2)) == 0.4
0.5 * fast_log2(2) == 0.5

so just square rho, and always divide by 2 afterwards.

Fixes:
GTF-GL45.gtf30.GL3Tests.sgis_texture_lod.sgis_texture_lod_basic_lod_selection

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5820>
3 files changed