vulkan/wsi: Plumb present regions through the common code

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Jason Ekstrand 2017-01-24 15:11:01 -08:00
parent 3598a2907c
commit f82b6c6272
5 changed files with 10 additions and 5 deletions

View 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;

View 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;

View 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,

View 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;

View 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;