[Mesa-dev] [PATCH 3/5] vulkan/wsi: Plumb present regions through the common code

Jason Ekstrand jason at jlekstrand.net
Sat Apr 1 05:37:28 UTC 2017


---
 src/amd/vulkan/radv_wsi.c           | 3 ++-
 src/intel/vulkan/anv_wsi.c          | 3 ++-
 src/vulkan/wsi/wsi_common.h         | 3 ++-
 src/vulkan/wsi/wsi_common_wayland.c | 3 ++-
 src/vulkan/wsi/wsi_common_x11.c     | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
index d2b760e..8b66095 100644
--- a/src/amd/vulkan/radv_wsi.c
+++ b/src/amd/vulkan/radv_wsi.c
@@ -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;
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 4236ee1..45bf896 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -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;
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h
index 8227c1e..5e77518 100644
--- a/src/vulkan/wsi/wsi_common.h
+++ b/src/vulkan/wsi/wsi_common.h
@@ -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,
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index 2e47183..26a137c 100644
--- a/src/vulkan/wsi/wsi_common_wayland.c
+++ b/src/vulkan/wsi/wsi_common_wayland.c
@@ -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;
 
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 4afd606..c399aae 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -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;
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list