On 2018-02-15 04:57 PM, Daniel Stone wrote:
> From: Louis-Francis Ratté-Boulianne <l...@collabora.com>
> 
> If PresentCompleteNotify event says the pixmap was presented
> with mode PresentCompleteModeSuboptimalCopy, it means the pixmap
> could possibly have been flipped instead if allocated with a
> different format/modifier.
> 
> Signed-off-by: Louis-Francis Ratté-Boulianne <l...@collabora.com>
> Reviewed-by: Daniel Stone <dani...@collabora.com>
> Signed-off-by: Daniel Stone <dani...@collabora.com>

[...]

> @@ -885,6 +901,11 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable 
> *draw,
>        if (!loader_dri3_have_image_blit(draw) && draw->cur_blit_source != -1)
>           options |= XCB_PRESENT_OPTION_COPY;
>  
> +#if XCB_PRESENT_MAJOR_VERSION > 1 || (XCB_PRESENT_MAJOR_VERSION == 1 && 
> XCB_PRESENT_MINOR_VERSION >= 1)
> +      if (draw->multiplanes_available)
> +         options  |= XCB_PRESENT_OPTION_SUBOPTIMAL;
> +#endif

This should check directly that the Present extension supports
PresentOptionSuboptimal, rather than checking the DRI3 extension
capabilities (what draw->multiplanes_available reflects).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to