mesa-drm/tests/util
Geert Uytterhoeven 8cb6d837cc util: fix 32 bpp patterns on big-endian
DRM formats are defined to be little-endian, unless the
DRM_FORMAT_BIG_ENDIAN flag is set.  Hence writes of multi-byte pixel
values need to take endianness into account.

Introduce a swap32() helper to byteswap 32-bit values, and a
cpu_to_le32() helper to convert 32-bit values from CPU-endian to
little-endian, and use the latter in the various pattern fill functions
for 32-bit formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Use new HAVE_BIG_ENDIAN symbol,

v3:
  - Increase indentation after definition of cpu_to_le32(),

v2:
  - Add Acked-by,
  - Add swap32() intermediate helper,
  - Add __ARM_BIG_ENDIAN and __s390__.
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 modetest: add support for DRM_FORMAT_NV{15,20,30} 2023-10-30 12:25:09 +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 32 bpp patterns 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