[Mesa-dev] [PATCH 11/11] egl/x11: Re-allocate buffers if format is suboptimal
Daniel Stone
daniel at fooishbar.org
Thu Feb 15 16:17:29 UTC 2018
Hi Michel,
On 15 February 2018 at 16:14, Michel Dänzer <michel at daenzer.net> wrote:
> On 2018-02-15 04:57 PM, Daniel Stone wrote:
>> @@ -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).
True, but it does:
dri2_dpy->multibuffers_available =
(dri2_dpy->dri3_major_version > 1 ||
(dri2_dpy->dri3_major_version == 1 &&
dri2_dpy->dri3_minor_version >= 1)) &&
+ (dri2_dpy->present_major_version > 1 ||
(dri2_dpy->present_major_version == 1 &&
+
dri2_dpy->present_minor_version >= 1)) &&
(dri2_dpy->image && dri2_dpy->image->base.version >= 15);
If you'd prefer a present_suboptimal_available rather than lumping the
two together, that would be pretty easy to do.
Cheers,
Daniel
More information about the mesa-dev
mailing list