diff options
| author | Jon Ashburn <jon@lunarg.com> | 2015-04-15 18:03:47 -0600 |
|---|---|---|
| committer | Chia-I Wu <olv@lunarg.com> | 2015-04-16 17:48:21 +0800 |
| commit | 7dcbb0c5f94017d216e2b0c810a163c750df6440 (patch) | |
| tree | 3bd4feb6d4a9482b057c2f0321e50c600f5efab9 | |
| parent | ee60f9f82beb1c8beaf63c7eb2f03166afad0d45 (diff) | |
| download | usermoji-7dcbb0c5f94017d216e2b0c810a163c750df6440.tar.xz | |
misc: Remove validation level
bug 13686
| -rw-r--r-- | demos/cube.c | 1 | ||||
| -rw-r--r-- | demos/tri.c | 1 | ||||
| -rw-r--r-- | demos/vulkaninfo.c | 1 | ||||
| -rw-r--r-- | include/vkDbg.h | 15 | ||||
| -rw-r--r-- | include/vulkan.h | 15 | ||||
| -rw-r--r-- | layers/param_checker.cpp | 12 |
6 files changed, 15 insertions, 30 deletions
diff --git a/demos/cube.c b/demos/cube.c index c5250a9c..7c7eb825 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 671c1bbe..8d1302e2 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 01d77455..316a6602 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 fcfdf318..bf27d52f 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 a7a33f75..134a350c 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 94550745..b3da3b24 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; } |
