aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-12-09 10:39:26 +1300
committerChris Forbes <chrisforbes@google.com>2016-12-14 15:25:29 +1300
commita6eb629273ca43dfadc2295a8c18b5b46761028c (patch)
treea1846c422031b1997272e619f22b7afc3dcc88a6 /layers/core_validation.cpp
parent7857f328126220842fc0f8dadff167f007ce55de (diff)
downloadusermoji-a6eb629273ca43dfadc2295a8c18b5b46761028c.tar.xz
layers: Track whether a swapchain has been replaced
If a swapchain is used as VkSwapchainCreateInfoKHR::oldSwapchain, then it is replaced. This occurs even if the new swapchain creation fails. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 6992041a..7d79e2c6 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -11984,6 +11984,9 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc
}
// Spec requires that even if CreateSwapchainKHR fails, oldSwapchain behaves as replaced.
+ if (old_swapchain_state) {
+ old_swapchain_state->replaced = true;
+ }
surface_state->old_swapchain = old_swapchain_state;
return result;