[igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Adjust < pixman-0.36.0 float hacks
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Oct 25 14:30:47 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Define PIXMAN_rgba_float the same way newer pixman releases do it.
This allows us to compile the code against an old pixman version
while still running it against a more recent release. A similar hack
is already used for cairo.
Suggested-by: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
lib/igt_fb.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6b674c1bcd02..87228cca7936 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -81,7 +81,15 @@
#endif
#if PIXMAN_VERSION < PIXMAN_VERSION_ENCODE(0, 36, 0)
-#define PIXMAN_rgba_float PIXMAN_invalid
+#define PIXMAN_FORMAT_BYTE(bpp,type,a,r,g,b) \
+ (((bpp >> 3) << 24) | \
+ (3 << 22) | ((type) << 16) | \
+ ((a >> 3) << 12) | \
+ ((r >> 3) << 8) | \
+ ((g >> 3) << 4) | \
+ ((b >> 3)))
+#define PIXMAN_TYPE_RGBA_FLOAT 11
+#define PIXMAN_rgba_float PIXMAN_FORMAT_BYTE(128, PIXMAN_TYPE_RGBA_FLOAT,32,32,32,32)
#endif
/* drm fourcc/cairo format maps */
--
2.21.0
More information about the igt-dev
mailing list