[Intel-gfx] [PATCH 4/4] uxa/glamor: Create glamor pixmap by default.

zhigang.gong at linux.intel.com zhigang.gong at linux.intel.com
Tue Dec 27 10:09:18 CET 2011


From: Zhigang Gong <zhigang.gong at linux.intel.com>

As a pure glamor pixmap has a local texture rather than
bind a pixmap to a external BO. This can avoid some
unecessary flush, and can achieve better performance.
The testing on my machine shows that aa10text/rgb10text
get about 20-30% performance improvement.

Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 src/intel_uxa.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index 9d74554..ca3220a 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -1026,6 +1026,11 @@ intel_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 	struct intel_pixmap *priv;
 	PixmapPtr pixmap, new_pixmap = NULL;
 
+	if (!(usage & INTEL_CREATE_PIXMAP_DRI2)) {
+		pixmap = intel_glamor_create_pixmap(screen, w, h, depth, usage);
+		if (pixmap)
+			return pixmap;
+	}
 	if (w > 32767 || h > 32767)
 		return NullPixmap;
 
-- 
1.7.4.4




More information about the Intel-gfx mailing list