Download raw body.
rasops32: fix fonts on byte swapped framebuffers
On Wed, Oct 7, 2026 at 8:29 AM Crystal Kolipe <kolipe.c@exoticsilicon.com> wrote: > > On Wed, Oct 07, 2026 at 06:34:02AM -0600, tbullock@comlore.com wrote: > > This patch fixes font rendering on 32 bit byte swapped framebuffers. > > The function uses a union to write two 32 bit pixels together as one > > 64 bit value. With sparc64's byte swapped access, that reverses the > > positions of the two pixels. > > Wouldn't it be far simpler and give better performance to just create a > pixel-swapped font variation in memory the first time this function is called > and use that with the existing blitting code on subsequent calls? > > I did almost exactly that to implement italics and other font variants in > rasops32.c. Honestly I have.a lot of emotional thoughts when I saw the original union implementation in this function. It feels like someone was being needlessly clever and it is also completely unsurprising that there are endian adjacent problems when someone starts throwing unions around. -- Ted Bullock <tbullock@comlore.com>
rasops32: fix fonts on byte swapped framebuffers