[Mesa-dev] [PATCH] gallium/xorg st/nv50/i915: add PIPE_BIND_CURSOR

Marcin Slusarz marcin.slusarz at gmail.com
Sun May 8 15:33:50 PDT 2011


On Tue, May 03, 2011 at 12:06:33PM +0200, Daniel Vetter wrote:
> On Mon, May 2, 2011 at 8:40 PM, Marcin Slusarz <marcin.slusarz at gmail.com> wrote:
> > On Mon, May 02, 2011 at 03:11:00PM +0200, Daniel Vetter wrote:
> >> On Mon, May 2, 2011 at 2:56 PM, Benjamin Franzke
> >> <benjaminfranzke at googlemail.com> wrote:
> >> > I think in i915g the CURSOR flag should be used in i9x5_scanout_layout
> >> > for the "special case for cursors" as well, instead of only checking
> >> > only pt->width0 == 64 && pt->height0 == 64.
> >>
> >> Oops, so much for actually re-checking the code. On the other hand, that
> >> part is broken, it needs a
> >>    tex->tiling = I915_TILE_NONE;
> >> and perhaps some check that width == height == 64 indeed holds. Then
> >> move it out as the first if clause and it'd start to make sense ...
> >
> > Could you fix it in separate patch?
> 
> Jakob has said (on irc) that he intends to again play with xorg-i915g ...

Christoph commited generic and nv50 part (Thanks again!).
i915 part below.

---
From: Marcin Slusarz <marcin.slusarz at gmail.com>
Subject: [PATCH] i915: use PIPE_BIND_CURSOR

---
 src/gallium/drivers/i915/i915_resource_texture.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index e05b059..97ac012 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -825,11 +825,7 @@ i915_texture_create(struct pipe_screen *screen,
    }
 
    /* for scanouts and cursors, cursors arn't scanouts */
-
-   /* XXX: use a custom flag for cursors, don't rely on magically
-    * guessing that this is Xorg asking for a cursor
-    */
-   if ((template->bind & PIPE_BIND_SCANOUT) && template->width0 != 64)
+   if ((template->bind & PIPE_BIND_SCANOUT) && !(template->bind & PIPE_BIND_CURSOR))
       buf_usage = I915_NEW_SCANOUT;
    else
       buf_usage = I915_NEW_TEXTURE;
-- 
1.7.4.1


More information about the mesa-dev mailing list