public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Adjust < pixman-0.36.0 float hacks
@ 2019-10-25 14:30 Ville Syrjala
  2019-10-25 14:30 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_fb: Declare format conversions explicitly Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Ville Syrjala @ 2019-10-25 14:30 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

From: Ville Syrjälä <ville.syrjala@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@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-27  9:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-25 14:30 [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Adjust < pixman-0.36.0 float hacks Ville Syrjala
2019-10-25 14:30 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_fb: Declare format conversions explicitly Ville Syrjala
2019-10-25 14:30 ` [igt-dev] [PATCH i-g-t 3/4] lib/igt_fb: Don't skip the entire subtest when cairo/pixman is too old Ville Syrjala
2019-10-25 14:30 ` [igt-dev] [PATCH i-g-t 4/4] lib/igt_fb: Pimp "no conversion specified" assert Ville Syrjala
2019-10-25 15:27   ` Chris Wilson
2019-10-25 15:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/4] lib/igt_fb: Adjust < pixman-0.36.0 float hacks Patchwork
2019-10-25 18:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/igt_fb: Adjust < pixman-0.36.0 float hacks (rev2) Patchwork
2019-10-27  9:37 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox