aboutsummaryrefslogtreecommitdiff
path: root/layers/param_checker.cpp
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2015-10-31 00:31:16 +0800
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-11-03 15:24:50 -0700
commitd0a64d5438a7355df2918c5311ea1c320530234a (patch)
tree5db013ced21545f808afa14b209b4011de30c304 /layers/param_checker.cpp
parentf3e0e508162907f01d1796155e7cf6f75569e1bb (diff)
downloadusermoji-d0a64d5438a7355df2918c5311ea1c320530234a.tar.xz
bug 15045: vkGetPhysicalDeviceImageFormatProperties for unsupported formats (WIP)
Change the return type of vkGetPhysicalDeviceImageFormatProperties. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15045
Diffstat (limited to 'layers/param_checker.cpp')
-rw-r--r--layers/param_checker.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp
index dfb1f446..44f57e6f 100644
--- a/layers/param_checker.cpp
+++ b/layers/param_checker.cpp
@@ -1865,7 +1865,8 @@ bool PostGetPhysicalDeviceImageFormatProperties(
VkImageTiling tiling,
VkImageUsageFlags usage,
VkImageCreateFlags flags,
- VkImageFormatProperties* pImageFormatProperties)
+ VkImageFormatProperties* pImageFormatProperties,
+ VkResult result)
{
if(format < VK_FORMAT_BEGIN_RANGE ||
@@ -1897,10 +1898,17 @@ bool PostGetPhysicalDeviceImageFormatProperties(
{
}
+ if(result < VK_SUCCESS)
+ {
+ std::string reason = "vkGetPhysicalDeviceImageFormatProperties parameter, VkResult result, is " + EnumeratorString(result);
+ log_msg(mdd(physicalDevice), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK", reason.c_str());
+ return false;
+ }
+
return true;
}
-VK_LAYER_EXPORT void VKAPI vkGetPhysicalDeviceImageFormatProperties(
+VK_LAYER_EXPORT VkResult VKAPI vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
@@ -1909,9 +1917,11 @@ VK_LAYER_EXPORT void VKAPI vkGetPhysicalDeviceImageFormatProperties(
VkImageCreateFlags flags,
VkImageFormatProperties* pImageFormatProperties)
{
- get_dispatch_table(pc_instance_table_map, physicalDevice)->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
+ VkResult result = get_dispatch_table(pc_instance_table_map, physicalDevice)->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
- PostGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
+ PostGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties, result);
+
+ return result;
}
bool PostGetPhysicalDeviceProperties(