gallium/hud: do not use texture-rect for font
authorErik Faye-Lund <kusmabite@gmail.com>
Fri, 22 Jul 2022 07:14:09 +0000 (09:14 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 25 Jul 2022 18:12:05 +0000 (18:12 +0000)
commitba2146f93fea07f60279984a42bc6346aede74c9
tree04c35f4b67dad52006fcdb2be0d459747197c58d
parent7ef76dec73b7742a5de7dba96a0408daed1306ea
gallium/hud: do not use texture-rect for font

RECT textures used to be required to be supported by drivers. But since
the state-tracker learned how to lower these to 2D textures, some
drivers no longer support them.

While we have lowering in place for this, lowering it involves some
needless overhead. So let's just use a 2D texture instead of a RECT
texture.

Because having two versions and switching between them is more
complicated than it needs to be, let's just always use a 2D texture.
Similarly, let's just always multiply the reciprocal here, so we don't
have to test for PIPE_CAP_TGSI_DIV first.

Cc: mesa-stable
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17707>
src/gallium/auxiliary/hud/font.c
src/gallium/auxiliary/hud/font.h
src/gallium/auxiliary/hud/hud_context.c