diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-10-06 11:59:54 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2015-10-06 15:42:00 -0600 |
| commit | 9e3c22007e77b419d6cdc6852eaa0f5a56453e73 (patch) | |
| tree | 323fcef2d48b0fe9af24cde585c986fa6835a805 /layers/device_limits.cpp | |
| parent | 164dc7a28df71616c6ee3376ff370bc2b3e5e0a1 (diff) | |
| download | usermoji-9e3c22007e77b419d6cdc6852eaa0f5a56453e73.tar.xz | |
layers: Fix DeviceLimits error return codes
Diffstat (limited to 'layers/device_limits.cpp')
| -rw-r--r-- | layers/device_limits.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/layers/device_limits.cpp b/layers/device_limits.cpp index b6025103..af9c6e9e 100644 --- a/layers/device_limits.cpp +++ b/layers/device_limits.cpp @@ -463,7 +463,7 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateCommandBuffer(VkDevice device, const VkCm VkResult result = get_dispatch_table(device_limits_device_table_map, device)->CreateCommandBuffer(device, pCreateInfo, pCmdBuffer); return result; } - + VK_LAYER_EXPORT void VKAPI vkDestroyCommandBuffer(VkDevice device, VkCmdBuffer commandBuffer) { @@ -506,24 +506,24 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateImage( layer_data *phy_dev_data = get_my_data_ptr(get_dispatch_key(physicalDevice), layer_data_map); if (!phy_dev_data->physicalDeviceProperties) { - skipCall = log_msg(phy_dev_data->report_data, VK_DBG_REPORT_WARN_BIT, VK_OBJECT_TYPE_IMAGE, (uint64_t)pImage, 0, - DEVLIMITS_MUST_QUERY_PROPERTIES, "DL", - "CreateImage called before querying device properties "); + skipCall |= log_msg(phy_dev_data->report_data, VK_DBG_REPORT_WARN_BIT, VK_OBJECT_TYPE_IMAGE, (uint64_t)pImage, 0, + DEVLIMITS_MUST_QUERY_PROPERTIES, "DL", + "CreateImage called before querying device properties "); } - + uint32_t imageGranularity = phy_dev_data->physicalDeviceProperties->limits.bufferImageGranularity; imageGranularity = imageGranularity == 1 ? 0 : imageGranularity; if ((pCreateInfo->extent.depth > ImageFormatProperties.maxExtent.depth) || (pCreateInfo->extent.width > ImageFormatProperties.maxExtent.width) || (pCreateInfo->extent.height > ImageFormatProperties.maxExtent.height)) { - skipCall = log_msg(phy_dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_IMAGE, (uint64_t)pImage, 0, - DEVLIMITS_LIMITS_VIOLATION, "DL", - "CreateImage extents exceed allowable limits for format: " - "Width = %d Height = %d Depth = %d: Limits for Width = %d Height = %d Depth = %d for format %s.", - pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth, - ImageFormatProperties.maxExtent.width, ImageFormatProperties.maxExtent.height, ImageFormatProperties.maxExtent.depth, - string_VkFormat(pCreateInfo->format)); + skipCall |= log_msg(phy_dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_IMAGE, (uint64_t)pImage, 0, + DEVLIMITS_LIMITS_VIOLATION, "DL", + "CreateImage extents exceed allowable limits for format: " + "Width = %d Height = %d Depth = %d: Limits for Width = %d Height = %d Depth = %d for format %s.", + pCreateInfo->extent.width, pCreateInfo->extent.height, pCreateInfo->extent.depth, + ImageFormatProperties.maxExtent.width, ImageFormatProperties.maxExtent.height, ImageFormatProperties.maxExtent.depth, + string_VkFormat(pCreateInfo->format)); } @@ -536,11 +536,11 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateImage( (uint64_t)imageGranularity ) & ~(uint64_t)imageGranularity; if (totalSize > ImageFormatProperties.maxResourceSize) { - skipCall = log_msg(phy_dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_IMAGE, (uint64_t)pImage, 0, - DEVLIMITS_LIMITS_VIOLATION, "DL", - "CreateImage resource size exceeds allowable maximum " - "Image resource size = %#" PRIxLEAST64 ", maximum resource size = %#" PRIxLEAST64 " ", - totalSize, ImageFormatProperties.maxResourceSize); + skipCall |= log_msg(phy_dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_IMAGE, (uint64_t)pImage, 0, + DEVLIMITS_LIMITS_VIOLATION, "DL", + "CreateImage resource size exceeds allowable maximum " + "Image resource size = %#" PRIxLEAST64 ", maximum resource size = %#" PRIxLEAST64 " ", + totalSize, ImageFormatProperties.maxResourceSize); } if (VK_FALSE == skipCall) { result = get_dispatch_table(device_limits_device_table_map, device)->CreateImage(device, pCreateInfo, pImage); |
