public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mario Kleiner <mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Chris Wilson
	<chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>,
	xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Maarten Lankhorst
	<maarten.lankhorst-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [xf86-video-nouveau] dri2: Enable BufferAge support
Date: Sat, 09 May 2015 06:41:55 +0200	[thread overview]
Message-ID: <554D9013.40904@gmail.com> (raw)
In-Reply-To: <1421665245-5994-7-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>



On 01/19/2015 12:00 PM, Chris Wilson wrote:
> For enable BufferAge support, we just have to be not using the
> DRI2Buffer->flags field for any purpose (i.e. it is always expected to
> be 0, as it is now) and to be sure to swap the flags field whenever we
> exchange buffers. As nouveau does not exactly support TripleBuffer, we
> don't have to worry about setting the copying the flags field when
> injecting the third buffer.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
> Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
> ---
>   src/nouveau_dri2.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
> index e3445b2..428ef92 100644
> --- a/src/nouveau_dri2.c
> +++ b/src/nouveau_dri2.c
> @@ -711,6 +711,7 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame,
>   		}
>
>   		SWAP(s->dst->name, s->src->name);
> +		SWAP(s->dst->flags, s->src->flags);
>   		SWAP(nouveau_pixmap(dst_pix)->bo, nouveau_pixmap(src_pix)->bo);
>
>   		DamageRegionProcessPending(draw);
> @@ -1003,6 +1004,12 @@ nouveau_dri2_init(ScreenPtr pScreen)
>   	dri2.DestroyBuffer2 = nouveau_dri2_destroy_buffer2;
>   	dri2.CopyRegion2 = nouveau_dri2_copy_region2;
>   #endif
> +
> +#if DRI2INFOREC_VERSION >= 10
> +	dri2.version = 10;
> +	dri2.bufferAge = 1;
> +#endif
> +
>   	return DRI2ScreenInit(pScreen, &dri2);
>   }
>
>

Seems ok to me.

Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

-mario
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

  parent reply	other threads:[~2015-05-09  4:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 11:00 Implement GLX_EXT_buffer_age for DRI2 Chris Wilson
     [not found] ` <1421665245-5994-1-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-01-19 11:00   ` [dri2proto] Declare DRI2ParamXHasBufferAge Chris Wilson
     [not found]     ` <1421665245-5994-2-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-01-20 20:53       ` [Mesa-dev] " Ian Romanick
2015-06-16 12:25         ` Martin Peres
2015-01-19 11:00   ` [xorg 1/3] dri2: Allow GetBuffers to match any format Chris Wilson
2015-01-20 20:49     ` [Mesa-dev] " Ian Romanick
2015-06-16 13:11       ` Martin Peres
2015-01-19 11:00   ` [xorg 2/3] dri2: Pass swap-interval=0 ScheduleSwap requests to the ddx Chris Wilson
2015-02-18 19:57     ` Fredrik Höglund
2015-01-19 11:00   ` [xorg 3/3] dri2: Reuse unused flags in GetBuffers protocol to pass last SBC Chris Wilson
2015-01-19 14:14     ` Chris Wilson
2015-01-19 14:29       ` [PATCH v2] " Chris Wilson
2015-01-20 21:55         ` Ian Romanick
2015-01-19 11:00   ` [xf86-video-ati] dri2: Enable BufferAge support Chris Wilson
2015-01-20 16:47     ` Alex Deucher
2015-01-19 11:00   ` [xf86-video-nouveau] " Chris Wilson
     [not found]     ` <1421665245-5994-7-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-05-09  4:41       ` Mario Kleiner [this message]
2015-01-19 11:00   ` [mesa 7/9] glx/dri2: Add DRI2GetParam() Chris Wilson
     [not found]     ` <1421665245-5994-8-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-01-20 19:11       ` [Mesa-dev] " Ian Romanick
2015-01-19 11:00   ` [mesa 8/9] glx/dri2: Move the wait after SwapBuffers into the next GetBuffers Chris Wilson
2015-01-20 20:03     ` Ian Romanick
2015-01-19 11:00   ` [mesa 9/9] glx/dri2: Implement getBufferAge Chris Wilson
2015-01-20 20:35     ` Ian Romanick
     [not found]       ` <54BEBBF9.8010104-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org>
2015-01-20 20:49         ` [Mesa-dev] " Ian Romanick
2015-01-20 21:49 ` Implement GLX_EXT_buffer_age for DRI2 Dave Airlie
2015-02-18 18:40   ` [Mesa-dev] " Daniel Stone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554D9013.40904@gmail.com \
    --to=mario.kleiner.de-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=maarten.lankhorst-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org \
    --cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox