From: Eric Anholt Subject: UXA clipping reduction Date: Wed, 1 Jun 2011 00:02:53 -0700 Message-ID: <1306911776-18301-1-git-send-email-eric@anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id C26AD9E7D2 for ; Wed, 1 Jun 2011 11:28:32 -0700 (PDT) Received: from pollan.anholt.net (annarchy.freedesktop.org [127.0.0.1]) by annarchy.freedesktop.org (Postfix) with ESMTP id ADC9913004F for ; Wed, 1 Jun 2011 11:28:32 -0700 (PDT) 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: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org There's this odd pattern in some UXA code that appears to have been carried over from fbfillrect.c where for each thing to be filled we: 1) clip against the clip extents 2) trivial reject 3) clip that against each box of the clip 4) reject per box 5) draw. I don't see a justification for this complexity, in terms of how I expect cliprects to be (generally 1 rectangle) or in terms of how I expect rendering to be (generally within cliprects if there are any). And, we see from the history of uxa-accel.c, we've screwed up this clipping up before. So, I propose instead, we: 1) Clip against each box of the clip 2) Reject per box 3) draw. Here are the patches. No performance testing included, but one known bug is deleted (which I actually hope we land the small submitted fix for first, I'm just hoping to get a name/commit message on it).