From: zhigang.gong@linux.intel.com Subject: [PATCH 4/4] uxa/glamor: Create glamor pixmap by default. Date: Tue, 27 Dec 2011 17:09:18 +0800 Message-ID: <1324976958-31411-5-git-send-email-zhigang.gong@linux.intel.com> References: <1324976958-31411-1-git-send-email-zhigang.gong@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id A03039EFDC for ; Tue, 27 Dec 2011 01:23:47 -0800 (PST) In-Reply-To: <1324976958-31411-1-git-send-email-zhigang.gong@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: chris@chris-wilson.co.uk Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Zhigang Gong 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 --- 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