diff options
| author | Cort Stratton <cort@google.com> | 2017-05-01 15:36:05 -0700 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2017-05-02 09:34:45 -0700 |
| commit | 7057f6cbb5aeca675e67b1b6ff3deb13c9fc5081 (patch) | |
| tree | 7987248efaf68b22b055838bb3a77410d595af65 /layers/core_validation.cpp | |
| parent | 76a0eb01f742ccc4e799870983fdfd01dd402901 (diff) | |
| download | usermoji-7057f6cbb5aeca675e67b1b6ff3deb13c9fc5081.tar.xz | |
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.
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 12 |
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)) || |
