On Mon, 2009-11-30 at 18:56 +0100, Maarten Maathuis wrote: > - Drivers using wfb don't like unneeded cpu fallbacks, allow them to signal > this. > > Signed-off-by: Maarten Maathuis <[email protected]> > --- > exa/exa.h | 6 ++++++ > exa/exa_accel.c | 6 ++++-- > 2 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/exa/exa.h b/exa/exa.h > index 8c93d15..46552c7 100644 > --- a/exa/exa.h > +++ b/exa/exa.h > @@ -769,6 +769,12 @@ typedef struct _ExaDriver { > */ > #define EXA_MIXED_PIXMAPS (1 << 6) > > +/** > + * EXA_MIXED_PREFER_UTS indicates that cpu access is more costly than DFS, > + * which might follow UTS. > + */ > +#define EXA_MIXED_PREFER_UTS (1 << 7) > + > /** @} */ > > /* in exa.c */ > diff --git a/exa/exa_accel.c b/exa/exa_accel.c > index 1d88acb..b438b1a 100644 > --- a/exa/exa_accel.c > +++ b/exa/exa_accel.c > @@ -508,9 +508,11 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, > * > * Not taking this path for mixed pixmaps: It could only save one CPU > * copy between cached memory and risks causing a more expensive > - * DownloadFromScreen later on. > + * DownloadFromScreen later on. Some drivers may prefer a potential > + * DFS to a cpu fallback. > */ > - } else if (!(pExaScr->info->flags & EXA_MIXED_PIXMAPS)) { > + } else if (!(pExaScr->info->flags & EXA_MIXED_PIXMAPS) || > + (pExaScr->info->flags & EXA_MIXED_PREFER_UTS)) {
(Your indentation doesn't line up again...) I think PREFER_UTS is too specific. I'm working on similar changes e.g. in GetImage. Note that these changes are motivated by a rather special environment where direct PrepareAccess isn't possible and DownloadFromScreen is very expensive. Maybe the name of the new flag should reflect that, and the previous behaviour be restored when the flag isn't set. -- Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
