etnaviv: switch to S_FIXED(..) macro
authorChristian Gmeiner <cgmeiner@igalia.com>
Thu, 27 Jul 2023 13:12:59 +0000 (15:12 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 14 Aug 2023 14:10:15 +0000 (14:10 +0000)
commit83d7e327f91dc96c24f28bea9b41e696bd0fef99
tree3cec21b809547a78d82e79f4e5f401697633909a
parent8bce68edf553c079ed8451ecf24dd2831f409c25
etnaviv: switch to S_FIXED(..) macro

In different traces for different GPU models I see the same pattern:
    0x00c80000, /*   [00A00] PA.VIEWPORT_SCALE_X = 200.000000 */
    0xff880000, /*   [00A04] PA.VIEWPORT_SCALE_Y = -120.000000 */

etna_f32_to_fixp16(..) handles the negative case differently then blob. In the
concrete example -120 gets converted to 0xff880001. Switch to S_FIXED(..) to
simplify our code and to get the same results as blob.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
src/gallium/drivers/etnaviv/etnaviv_util.h