[PATCH xserver] dri2: sort DRI2InfoPtr::version checking in ascending order
Alex Deucher
alexdeucher at gmail.com
Thu Aug 3 18:58:52 UTC 2017
On Thu, Aug 3, 2017 at 2:43 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Makes it easer to follow if 8 is between 7 and 9 ;-)
Agreed :)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> hw/xfree86/dri2/dri2.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index f9f9859e1..75abc18ac 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -1538,6 +1538,7 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
> ds->CreateBuffer = info->CreateBuffer;
> ds->DestroyBuffer = info->DestroyBuffer;
> ds->CopyRegion = info->CopyRegion;
> + cur_minor = 1;
>
> if (info->version >= 4) {
> ds->ScheduleSwap = info->ScheduleSwap;
> @@ -1545,13 +1546,7 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
> ds->GetMSC = info->GetMSC;
> cur_minor = 3;
> }
> - else {
> - cur_minor = 1;
> - }
>
> - if (info->version >= 8) {
> - ds->AuthMagic = info->AuthMagic2;
> - }
> if (info->version >= 5) {
> ds->LegacyAuthMagic = info->AuthMagic;
> }
> @@ -1566,6 +1561,10 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
> cur_minor = 4;
> }
>
> + if (info->version >= 8) {
> + ds->AuthMagic = info->AuthMagic2;
> + }
> +
> if (info->version >= 9) {
> ds->CreateBuffer2 = info->CreateBuffer2;
> if (info->CreateBuffer2 && pScreen->isGPU) {
> --
> 2.13.3
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list