layers:Add VUIDs for VK_KHR_incremental_present
authorTobin Ehlis <tobine@google.com>
Fri, 2 Mar 2018 14:43:50 +0000 (07:43 -0700)
committerTobin Ehlis <tobine@google.com>
Fri, 2 Mar 2018 18:11:39 +0000 (11:11 -0700)
Ran across this old TODO when cleaning up branches. Add in the
appropriate VUIDs, update DB, and kill TODO comment.

layers/core_validation.cpp
layers/vk_validation_error_database.txt

index d88ef47..c00c91f 100644 (file)
@@ -10590,32 +10590,34 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInf
                 VkPresentRegionKHR region = present_regions->pRegions[i];
                 for (uint32_t j = 0; j < region.rectangleCount; ++j) {
                     VkRectLayerKHR rect = region.pRectangles[j];
-                    // TODO: Need to update these errors to their unique error ids when available
                     if ((rect.offset.x + rect.extent.width) > swapchain_data->createInfo.imageExtent.width) {
                         skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
                                         VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]),
-                                        __LINE__, DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS",
+                                        __LINE__, VALIDATION_ERROR_11e009da, "DS",
                                         "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, "
                                         "pRegion[%i].pRectangles[%i], the sum of offset.x (%i) and extent.width (%i) is greater "
-                                        "than the corresponding swapchain's imageExtent.width (%i).",
-                                        i, j, rect.offset.x, rect.extent.width, swapchain_data->createInfo.imageExtent.width);
+                                        "than the corresponding swapchain's imageExtent.width (%i). %s",
+                                        i, j, rect.offset.x, rect.extent.width, swapchain_data->createInfo.imageExtent.width,
+                                        validation_error_map[VALIDATION_ERROR_11e009da]);
                     }
                     if ((rect.offset.y + rect.extent.height) > swapchain_data->createInfo.imageExtent.height) {
                         skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
                                         VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT, HandleToUint64(pPresentInfo->pSwapchains[i]),
-                                        __LINE__, DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS",
+                                        __LINE__, VALIDATION_ERROR_11e009da, "DS",
                                         "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, "
                                         "pRegion[%i].pRectangles[%i], the sum of offset.y (%i) and extent.height (%i) is greater "
-                                        "than the corresponding swapchain's imageExtent.height (%i).",
-                                        i, j, rect.offset.y, rect.extent.height, swapchain_data->createInfo.imageExtent.height);
+                                        "than the corresponding swapchain's imageExtent.height (%i). %s",
+                                        i, j, rect.offset.y, rect.extent.height, swapchain_data->createInfo.imageExtent.height,
+                                        validation_error_map[VALIDATION_ERROR_11e009da]);
                     }
                     if (rect.layer > swapchain_data->createInfo.imageArrayLayers) {
                         skip |= log_msg(
                             dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT,
-                            HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, DRAWSTATE_SWAPCHAIN_INVALID_IMAGE, "DS",
+                            HandleToUint64(pPresentInfo->pSwapchains[i]), __LINE__, VALIDATION_ERROR_11e009dc, "DS",
                             "vkQueuePresentKHR(): For VkPresentRegionKHR down pNext chain, pRegion[%i].pRectangles[%i], the layer "
-                            "(%i) is greater than the corresponding swapchain's imageArrayLayers (%i).",
-                            i, j, rect.layer, swapchain_data->createInfo.imageArrayLayers);
+                            "(%i) is greater than the corresponding swapchain's imageArrayLayers (%i). %s",
+                            i, j, rect.layer, swapchain_data->createInfo.imageArrayLayers,
+                            validation_error_map[VALIDATION_ERROR_11e009dc]);
                     }
                 }
             }
index 23a056b..d71ef06 100644 (file)
@@ -1303,8 +1303,8 @@ VALIDATION_ERROR_11c09005~^~Y~^~Unknown~^~vkCreateQueryPool~^~VUID-VkQueryPoolCr
 VALIDATION_ERROR_11c1c40d~^~Y~^~Unknown~^~vkCreateQueryPool~^~VUID-VkQueryPoolCreateInfo-pNext-pNext~^~core~^~The spec valid usage text states 'pNext must be NULL' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueryPoolCreateInfo-pNext-pNext)~^~implicit, TBD in parameter validation layer.
 VALIDATION_ERROR_11c29a01~^~Y~^~Unknown~^~vkCreateQueryPool~^~VUID-VkQueryPoolCreateInfo-queryType-parameter~^~core~^~The spec valid usage text states 'queryType must be a valid VkQueryType value' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueryPoolCreateInfo-queryType-parameter)~^~implicit
 VALIDATION_ERROR_11c2b00b~^~Y~^~Unknown~^~vkCreateQueryPool~^~VUID-VkQueryPoolCreateInfo-sType-sType~^~core~^~The spec valid usage text states 'sType must be VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkQueryPoolCreateInfo-sType-sType)~^~implicit, TBD in parameter validation layer.
-VALIDATION_ERROR_11e009da~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkRectLayerKHR-offset-01261~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)~^~The spec valid usage text states 'The sum of offset and extent must be no greater than the imageExtent member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRectLayerKHR-offset-01261)~^~
-VALIDATION_ERROR_11e009dc~^~N~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkRectLayerKHR-layer-01262~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)~^~The spec valid usage text states 'layer must be less than imageArrayLayers member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRectLayerKHR-layer-01262)~^~
+VALIDATION_ERROR_11e009da~^~Y~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkRectLayerKHR-offset-01261~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)~^~The spec valid usage text states 'The sum of offset and extent must be no greater than the imageExtent member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRectLayerKHR-offset-01261)~^~
+VALIDATION_ERROR_11e009dc~^~Y~^~Unknown~^~vkQueuePresentKHR~^~VUID-VkRectLayerKHR-layer-01262~^~(VK_KHR_surface)+(VK_KHR_swapchain)+(VK_KHR_incremental_present)~^~The spec valid usage text states 'layer must be less than imageArrayLayers member of the VkSwapchainCreateInfoKHR structure given to vkCreateSwapchainKHR.' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VUID-VkRectLayerKHR-layer-01262)~^~
 VALIDATION_ERROR_12000009~^~Y~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkRenderPassBeginInfo-commonparent~^~core~^~The spec valid usage text states 'Both of framebuffer, and renderPass must have been created, allocated, or retrieved from the same VkDevice' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-commonparent)~^~implicit
 VALIDATION_ERROR_1200070c~^~Y~^~RenderPassClearOpMismatch~^~vkCmdBeginRenderPass~^~VUID-VkRenderPassBeginInfo-clearValueCount-00902~^~core~^~The spec valid usage text states 'clearValueCount must be greater than the largest attachment index in renderPass that specifies a loadOp (or stencilLoadOp, if the attachment has a depth/stencil format) of VK_ATTACHMENT_LOAD_OP_CLEAR' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-clearValueCount-00902)~^~
 VALIDATION_ERROR_1200070e~^~N~^~Unknown~^~vkCmdBeginRenderPass~^~VUID-VkRenderPassBeginInfo-clearValueCount-00903~^~core~^~The spec valid usage text states 'If clearValueCount is not 0, pClearValues must be a valid pointer to an array of clearValueCount valid VkClearValue unions' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkRenderPassBeginInfo-clearValueCount-00903)~^~