[Mesa-dev] [PATCH 4/5] vulkan/wsi/wayland: Pass damage through to the compositor

Jason Ekstrand jason at jlekstrand.net
Mon Apr 3 14:45:53 UTC 2017


On Mon, Apr 3, 2017 at 1:54 AM, Daniel Stone <daniel at fooishbar.org> wrote:

> Hi Jason,
>
> On 1 April 2017 at 06:37, Jason Ekstrand <jason at jlekstrand.net> wrote:
> > @@ -594,7 +595,19 @@ wsi_wl_swapchain_queue_present(struct
> wsi_swapchain *wsi_chain,
> >
> >     assert(image_index < chain->base.image_count);
> >     wl_surface_attach(chain->surface, chain->images[image_index].buffer,
> 0, 0);
> > -   wl_surface_damage(chain->surface, 0, 0, INT32_MAX, INT32_MAX);
> > +
> > +   if (chain->surface_version >= 4 && damage &&
> > +       damage->pRectangles && damage->rectangleCount > 0) {
> > +      for (unsigned i = 0; i < damage->rectangleCount; i++) {
> > +         const VkRectLayerKHR *rect = &damage->pRectangles[i];
> > +         assert(rect->layer == 0);
> > +         wl_surface_damage(chain->surface,
> > +                           rect->offset.x, rect->offset.y,
> > +                           rect->extent.width, rect->extent.height);
>
> Very scrupulous version check, but you forgot to actually use
> wl_surface_damage_buffer. ;)
>

Gah!!!  I'll get that fixed.  Assuming that change, now that you've looked
at it all, would you mind reviewing at least this patch?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170403/7adaa9cb/attachment.html>


More information about the mesa-dev mailing list