[Mesa-dev] [PATCH 11/11] egl/x11: Re-allocate buffers if format is suboptimal
Michel Dänzer
michel at daenzer.net
Thu Feb 15 16:14:07 UTC 2018
On 2018-02-15 04:57 PM, Daniel Stone wrote:
> From: Louis-Francis Ratté-Boulianne <lfrb at 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 <lfrb at collabora.com>
> Reviewed-by: Daniel Stone <daniels at collabora.com>
> Signed-off-by: Daniel Stone <daniels at 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
More information about the mesa-dev
mailing list