summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCort Stratton <cort@google.com>2017-05-01 15:36:05 -0700
committerChris Forbes <chrisf@ijw.co.nz>2017-05-02 09:34:45 -0700
commit583b0c41dfd0876d0481920f2e6d8d87433bc1d7 (patch)
tree92d2166f80160241406baf562d49b9f99afd7fea
parent1b52022446fb65466dfcee491393670ac12aaa33 (diff)
layers: Remove check for imageExtent == currentExtent
The condition tested in this check is only valid on platforms where the swapchain dimensions must match the surface dimensions (e.g. Windows, Xlib). In such cases, the surface *must* report minExtent == maxExtent == currentExtent, and this check would already be handled by the code directly above the deleted check. Platforms like Android allow the swapchain's imageExtent to be anywhere within the surface minExtent/maxExtent range; if this does not match the surface dimensions, it will be scaled accordingly.
-rw-r--r--layers/core_validation.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 2b23ca8c..5e3b4644 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -10257,18 +10257,6 @@ static bool PreCallValidateCreateSwapchainKHR(layer_data *dev_data, const char *
validation_error_map[VALIDATION_ERROR_02334]))
return true;
}
- if ((capabilities.currentExtent.width != kSurfaceSizeFromSwapchain) &&
- ((pCreateInfo->imageExtent.width != capabilities.currentExtent.width) ||
- (pCreateInfo->imageExtent.height != capabilities.currentExtent.height))) {
- if (log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT,
- reinterpret_cast<uint64_t>(dev_data->device), __LINE__, VALIDATION_ERROR_02334, "DS",
- "%s called with imageExtent = (%d,%d), which is not equal to the currentExtent = (%d,%d) returned by "
- "vkGetPhysicalDeviceSurfaceCapabilitiesKHR(). %s",
- func_name, pCreateInfo->imageExtent.width, pCreateInfo->imageExtent.height,
- capabilities.currentExtent.width, capabilities.currentExtent.height,
- validation_error_map[VALIDATION_ERROR_02334]))
- return true;
- }
// pCreateInfo->preTransform should have exactly one bit set, and that bit must also be set in
// VkSurfaceCapabilitiesKHR::supportedTransforms.
if (!pCreateInfo->preTransform || (pCreateInfo->preTransform & (pCreateInfo->preTransform - 1)) ||