Commit 868d9b99 authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

vulkan: avoid validation errors.

There are many errors like:
Validation Error: [ UNASSIGNED-GeneralParameterError-ExtensionNotEnabled ]
Object 0: handle = 0x395107e6050, type = VK_OBJECT_TYPE_DEVICE; |
MessageID = 0xe92b452d | vkQueuePresentKHR() called even though the
VK_KHR_incremental_present extension was not enabled.

Suppose vulkan should ignore unsupported or not enabled structures in
structures chain, but vulkan validation reports it. It is annoying. So fix
it by not passing unsupported VkPresentRegionsKHR in VkPresentInfoKHR.

Bug: None
Change-Id: I7cfff50ccc3f42a08a5b0ade481e297f129f6e94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2305512
Auto-Submit: Peng Huang <penghuang@chromium.org>
Reviewed-by: default avatarVasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789948}
parent e968e9a2
...@@ -353,7 +353,7 @@ bool VulkanSwapChain::PresentBuffer(const gfx::Rect& rect) { ...@@ -353,7 +353,7 @@ bool VulkanSwapChain::PresentBuffer(const gfx::Rect& rect) {
VkPresentInfoKHR present_info = { VkPresentInfoKHR present_info = {
.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, .sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,
.pNext = &present_regions, .pNext = is_incremental_present_supported_ ? &present_regions : nullptr,
.waitSemaphoreCount = 1, .waitSemaphoreCount = 1,
.pWaitSemaphores = &end_write_semaphore_, .pWaitSemaphores = &end_write_semaphore_,
.swapchainCount = 1, .swapchainCount = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment