mesa-drm/tests/util
Geert Uytterhoeven 32a03fb32c util: fix pwetty on big-endian
Cairo always uses native byte order for rendering.

Hence if the byte order of the frame buffer differs from the byte order
of the CPU, the frame buffer contents need to be byteswapped twice: once
before rendering, to convert to native byte order, and a second time
after rendering, to restore the frame buffer format's byte order.

Note that byte swapping is not done for ARGB32 formats, as for these
formats, byte order only affects the order of the red, green, and blue
channels, which we do not care about here.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Wrap byteswap_buffer{16,32}() implementation inside #if HAVE_CAIRO
    to avoid defined-but-not-used compiler warnings,

v2:
  - RGB30 is untested.
2023-10-31 13:24:32 +00:00
..
Android.mk Android: fix building of modetest and proptest 2017-04-03 17:46:06 +01:00
common.h tests: Split helpers into library 2015-12-18 17:43:40 +00:00
format.c util: add missing big-endian RGB16 frame buffer formats 2023-10-31 13:24:32 +00:00
format.h util: store number of colors for indexed formats 2023-10-24 09:44:21 +02:00
kms.c tests/util: Add vkms driver 2023-02-10 05:22:52 +00:00
kms.h tests: use drmModeGetConnectorTypeName 2022-07-02 20:13:29 +00:00
Makefile.sources tests: Move name tables to libutil 2015-12-18 17:44:01 +00:00
meson.build Add meson build system 2018-01-12 09:40:48 -08:00
pattern.c util: fix pwetty on big-endian 2023-10-31 13:24:32 +00:00
pattern.h util: factor out and optimize C8 SMPTE color LUT 2023-10-24 09:44:04 +02:00