[snip]
> @@ -372,10 +372,22 @@ dri3_handle_present_event(struct loader_dri3_drawable 
> *draw,
>           switch (ce->mode) {
>           case XCB_PRESENT_COMPLETE_MODE_FLIP:
>              draw->flipping = true;
> +            for (int b = 0; b < sizeof(draw->buffers) / 
> sizeof(draw->buffers[0]); b++) {
> +               if (draw->buffers[b])
> +                  draw->buffers[b]->realloc_suboptimal = true;
> +            }
>              break;
>           case XCB_PRESENT_COMPLETE_MODE_COPY:
>              draw->flipping = false;
>              break;
> +#if XCB_PRESENT_MAJOR_VERSION > 1 || (XCB_PRESENT_MAJOR_VERSION == 1 && 
> XCB_PRESENT_MINOR_VERSION >= 1)
> +         case XCB_PRESENT_COMPLETE_MODE_SUBOPTIMAL_COPY:
> +            draw->flipping = false;
> +            for (int b = 0; b < sizeof(draw->buffers) / 
> sizeof(draw->buffers[0]); b++) {
> +               if (draw->buffers[b])
> +                  draw->buffers[b]->suboptimal = true;
> +            }
> +#endif

Probably worth using "ARRAY_SIZE(draw->buffers)"; ARRAY_SIZE is in util/macros.h
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to