[Mesa-dev] [PATCH 4/5] vulkan/wsi/wayland: Pass damage through to the compositor
Daniel Stone
daniel at fooishbar.org
Mon Apr 3 08:54:08 UTC 2017
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. ;)
Cheers,
Daniel
More information about the mesa-dev
mailing list