[Intel-gfx] [PATCH] Fall back to fb pixmaps for backing glyph pictures

Kristian Hoegsberg krh at bitplanet.net
Tue Jun 9 03:14:14 CEST 2009

From: Kristian Høgsberg <krh at redhat.com>

GEM pads pixmaps to 512 byte stride and backs them with a kernel side
buffer objects.  We typically don't render out of glyph pictures, so
we're incurring a lot of overhead per glyph by allocating a GEM pixmap
per glyph.  By looking at the usage hint, we can fall back to
fbCreatePixmap for pixmaps backing glyph pictures, which gives us
a nice tight malloced pixmap.  The fast path for text rendering is
compositing from the glyph cache pixmap to the destination, which
shouldn't be significantly affected.
 src/i830_exa.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/i830_exa.c b/src/i830_exa.c
index d0ada02..eb35014 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -598,6 +598,9 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
     if (w > 32767 || h > 32767)
 	return NullPixmap;
+	return fbCreatePixmap (screen, w, h, depth, usage);
     pixmap = fbCreatePixmap (screen, 0, 0, depth, usage);
     if (w && h)

More information about the Intel-gfx mailing list