From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: Adjust < pixman-0.36.0 float hacks
Date: Fri, 25 Oct 2019 17:30:47 +0300 [thread overview]
Message-ID: <20191025143050.18205-1-ville.syrjala@linux.intel.com> (raw)
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
next reply other threads:[~2019-10-25 14:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 14:30 Ville Syrjala [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191025143050.18205-1-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox