vulkan/wsi: Plumb present regions through the common code
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 24 Jan 2017 23:11:01 +0000 (15:11 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Apr 2017 20:51:08 +0000 (13:51 -0700)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_wsi.c
src/intel/vulkan/anv_wsi.c
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_x11.c

index d2b760e935662ec92147f7b030810340e0004659..8b66095b263f15652707a40165edb7774c11b0e8 100644 (file)
@@ -485,7 +485,8 @@ VkResult radv_QueuePresentKHR(
                fence->submitted = true;
 
                result = swapchain->queue_present(swapchain,
-                                                 pPresentInfo->pImageIndices[i]);
+                                                 pPresentInfo->pImageIndices[i],
+                                                 NULL);
                /* TODO: What if one of them returns OUT_OF_DATE? */
                if (result != VK_SUCCESS)
                        return result;
index 4236ee14909ebd571cc1209aa82d400a2ecde27e..45bf89634272675ef8c9f720d85117d24e304abb 100644 (file)
@@ -380,7 +380,8 @@ VkResult anv_QueuePresentKHR(
       anv_QueueSubmit(_queue, 0, NULL, swapchain->fences[0]);
 
       item_result = swapchain->queue_present(swapchain,
-                                             pPresentInfo->pImageIndices[i]);
+                                             pPresentInfo->pImageIndices[i],
+                                             NULL);
       /* TODO: What if one of them returns OUT_OF_DATE? */
       if (pPresentInfo->pResults != NULL)
          pPresentInfo->pResults[i] = item_result;
index 8227c1e4e914015a3b95105f780b4702d409562c..5e77518c0984fa3ffde8f4fff3f32a38becb0ae3 100644 (file)
@@ -69,7 +69,8 @@ struct wsi_swapchain {
                                   uint64_t timeout, VkSemaphore semaphore,
                                   uint32_t *image_index);
    VkResult (*queue_present)(struct wsi_swapchain *swap_chain,
-                             uint32_t image_index);
+                             uint32_t image_index,
+                             const VkPresentRegionKHR *damage);
    void (*get_image_and_linear)(struct wsi_swapchain *swapchain,
                                 int imageIndex,
                                 VkImage *image,
index 2e47183b9d247730fb4f83d96664781421b71f11..26a137c1a0d5c45b0862e442b7270d11df064fe4 100644 (file)
@@ -578,7 +578,8 @@ static const struct wl_callback_listener frame_listener = {
 
 static VkResult
 wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain,
-                               uint32_t image_index)
+                               uint32_t image_index,
+                               const VkPresentRegionKHR *damage)
 {
    struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain;
 
index 4afd606338597a419002ffb5312645b254d2ee49..c399aae5afdc3d91f8c3c89bb5df8f22ac4721f1 100644 (file)
@@ -860,7 +860,8 @@ x11_acquire_next_image(struct wsi_swapchain *anv_chain,
 
 static VkResult
 x11_queue_present(struct wsi_swapchain *anv_chain,
-                  uint32_t image_index)
+                  uint32_t image_index,
+                  const VkPresentRegionKHR *damage)
 {
    struct x11_swapchain *chain = (struct x11_swapchain *)anv_chain;