[Mesa-stable] [PATCH 3/3] glx/dri3: Request non-vsynced Present for swapinterval zero.

Frank Binns frank.binns at imgtec.com
Mon Dec 1 02:13:19 PST 2014


On 30/11/14 11:51, Mario Kleiner wrote:
> On 11/25/2014 09:31 AM, Frank Binns wrote:
>> Hi,
>>
>> I sent exactly the same patch back in April. Despite getting a review-by
>> it was never merged. See:
>>
>> http://lists.freedesktop.org/archives/mesa-dev/2014-April/058347.html
>> http://lists.freedesktop.org/archives/mesa-dev/2014-May/060432.html
>>
>> Thanks
>> Frank
>>
>
> Indeed, exactly the same patch - minus white-space differences -
> already reviewed. So i guess i can add your additional signed-off-by
> and chris wilsons reviewed-by to this one?
>
> I have a few more patches coming for this series, which fix two more
> mesa bugs related to dri3/present...
>
> thanks,
> -mario

That's fine by me.

Thanks
Frank

>
>> On 25/11/14 03:00, Mario Kleiner wrote:
>>> Restores proper immediate tearing swap behaviour for
>>> OpenGL bufferswap under DRI3/Present.
>>>
>>> Cc: "10.3 10.4" <mesa-stable at lists.freedesktop.org>
>>> Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
>>> ---
>>>   src/glx/dri3_glx.c | 6 +++++-
>>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
>>> index 5796491..c53be1b 100644
>>> --- a/src/glx/dri3_glx.c
>>> +++ b/src/glx/dri3_glx.c
>>> @@ -1518,6 +1518,7 @@ dri3_swap_buffers(__GLXDRIdrawable *pdraw,
>>> int64_t target_msc, int64_t divisor,
>>>      xcb_connection_t *c = XGetXCBConnection(dpy);
>>>      struct dri3_buffer *back;
>>>      int64_t ret = 0;
>>> +   uint32_t options = XCB_PRESENT_OPTION_NONE;
>>>        unsigned flags = __DRI2_FLUSH_DRAWABLE;
>>>      if (flush)
>>> @@ -1557,6 +1558,9 @@ dri3_swap_buffers(__GLXDRIdrawable *pdraw,
>>> int64_t target_msc, int64_t divisor,
>>>         if (target_msc == 0)
>>>            target_msc = priv->msc + priv->swap_interval *
>>> (priv->send_sbc - priv->recv_sbc);
>>>   +      if (priv->swap_interval == 0)
>>> +          options |= XCB_PRESENT_OPTION_ASYNC;
>>> +
>>>         back->busy = 1;
>>>         back->last_swap = priv->send_sbc;
>>>         xcb_present_pixmap(c,
>>> @@ -1570,7 +1574,7 @@ dri3_swap_buffers(__GLXDRIdrawable *pdraw,
>>> int64_t target_msc, int64_t divisor,
>>>                            None, /* target_crtc */
>>>                            None,
>>>                            back->sync_fence,
>>> -                         XCB_PRESENT_OPTION_NONE,
>>> +                         options,
>>>                            target_msc,
>>>                            divisor,
>>>                            remainder, 0, NULL);
>>
>



More information about the mesa-stable mailing list