From 7dcbb0c5f94017d216e2b0c810a163c750df6440 Mon Sep 17 00:00:00 2001 From: Jon Ashburn Date: Wed, 15 Apr 2015 18:03:47 -0600 Subject: [PATCH] misc: Remove validation level bug 13686 --- demos/cube.c | 1 - demos/tri.c | 1 - demos/vulkaninfo.c | 1 - include/vkDbg.h | 15 +++++++++++++++ include/vulkan.h | 15 --------------- layers/param_checker.cpp | 12 ------------ 6 files changed, 15 insertions(+), 30 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index c5250a9..7c7eb82 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1758,7 +1758,6 @@ static void demo_init_vk(struct demo *demo) .pRequestedQueues = &queue, .extensionCount = 1, .ppEnabledExtensionNames = ext_names, - .maxValidationLevel = VK_VALIDATION_LEVEL_END_RANGE, .flags = VK_DEVICE_CREATE_VALIDATION_BIT, }; VkResult err; diff --git a/demos/tri.c b/demos/tri.c index 671c1bb..8d1302e 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -1279,7 +1279,6 @@ static void demo_init_vk(struct demo *demo) .pRequestedQueues = &queue, .extensionCount = 1, .ppEnabledExtensionNames = ext_names, - .maxValidationLevel = VK_VALIDATION_LEVEL_END_RANGE, .flags = VK_DEVICE_CREATE_VALIDATION_BIT, }; VkResult err; diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c index 01d7745..316a660 100644 --- a/demos/vulkaninfo.c +++ b/demos/vulkaninfo.c @@ -339,7 +339,6 @@ static void app_dev_init(struct app_dev *dev, struct app_gpu *gpu) .pRequestedQueues = NULL, .extensionCount = 0, .ppEnabledExtensionNames = NULL, - .maxValidationLevel = VK_VALIDATION_LEVEL_END_RANGE, .flags = VK_DEVICE_CREATE_VALIDATION_BIT, }; VkResult err; diff --git a/include/vkDbg.h b/include/vkDbg.h index fcfdf31..bf27d52 100644 --- a/include/vkDbg.h +++ b/include/vkDbg.h @@ -8,6 +8,21 @@ extern "C" { #endif // __cplusplus +typedef enum VkValidationLevel_ +{ + VK_VALIDATION_LEVEL_0 = 0x00000000, + VK_VALIDATION_LEVEL_1 = 0x00000001, + VK_VALIDATION_LEVEL_2 = 0x00000002, + VK_VALIDATION_LEVEL_3 = 0x00000003, + VK_VALIDATION_LEVEL_4 = 0x00000004, + + VK_VALIDATION_LEVEL_BEGIN_RANGE = VK_VALIDATION_LEVEL_0, + VK_VALIDATION_LEVEL_END_RANGE = VK_VALIDATION_LEVEL_4, + VK_NUM_VALIDATION_LEVEL = (VK_VALIDATION_LEVEL_END_RANGE - VK_VALIDATION_LEVEL_BEGIN_RANGE + 1), + + VK_MAX_ENUM(VkValidationLevel) +} VkValidationLevel; + typedef enum _VK_DBG_MSG_TYPE { VK_DBG_MSG_UNKNOWN = 0x0, diff --git a/include/vulkan.h b/include/vulkan.h index a7a33f7..134a350 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -716,20 +716,6 @@ typedef enum VkObjectInfoType_ VK_MAX_ENUM(VkObjectInfoType) } VkObjectInfoType; -typedef enum VkValidationLevel_ -{ - VK_VALIDATION_LEVEL_0 = 0x00000000, - VK_VALIDATION_LEVEL_1 = 0x00000001, - VK_VALIDATION_LEVEL_2 = 0x00000002, - VK_VALIDATION_LEVEL_3 = 0x00000003, - VK_VALIDATION_LEVEL_4 = 0x00000004, - - VK_VALIDATION_LEVEL_BEGIN_RANGE = VK_VALIDATION_LEVEL_0, - VK_VALIDATION_LEVEL_END_RANGE = VK_VALIDATION_LEVEL_4, - VK_NUM_VALIDATION_LEVEL = (VK_VALIDATION_LEVEL_END_RANGE - VK_VALIDATION_LEVEL_BEGIN_RANGE + 1), - - VK_MAX_ENUM(VkValidationLevel) -} VkValidationLevel; // ------------------------------------------------------------------------------------------------ // Error and return codes @@ -1422,7 +1408,6 @@ typedef struct VkDeviceCreateInfo_ const VkDeviceQueueCreateInfo* pRequestedQueues; uint32_t extensionCount; const char*const* ppEnabledExtensionNames; - VkValidationLevel maxValidationLevel; VkFlags flags; // VkDeviceCreateFlags } VkDeviceCreateInfo; diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index 9455074..b3da3b2 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -213,13 +213,6 @@ void PreCreateDevice(VkPhysicalGpu gpu, const VkDeviceCreateInfo* pCreateInfo) } } - if(!validate_VkValidationLevel(pCreateInfo->maxValidationLevel)) - { - char const str[] = "vkCreateDevice parameter, VkValidationLevel pCreateInfo->maxValidationLevel, is "\ - "unrecognized (precondition)."; - layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str); - return; - } } void PostCreateDevice(VkResult result, VkDevice* pDevice) @@ -1871,11 +1864,6 @@ VK_LAYER_EXPORT void VKAPI vkCmdEndRenderPass(VkCmdBuffer cmdBuffer, VkRenderPas VK_LAYER_EXPORT VkResult VKAPI vkDbgSetValidationLevel(VkDevice device, VkValidationLevel validationLevel) { - char str[1024]; - if (!validate_VkValidationLevel(validationLevel)) { - sprintf(str, "Parameter validationLevel to function DbgSetValidationLevel has invalid value of %i.", (int)validationLevel); - layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str); - } VkResult result = nextTable.DbgSetValidationLevel(device, validationLevel); return result; } -- 2.7.4