layers: Remove enum_validate_helper from PV

A single call was used, replaced with an internal generated function
call and removed the old include. Added note with validation error
ID.

Change-Id: Ied88daf5bab003269c44ef2bef8b2eb81a9e9094
diff --git a/layers/parameter_validation.cpp b/layers/parameter_validation.cpp
index b3c70e3..4b1870e 100644
--- a/layers/parameter_validation.cpp
+++ b/layers/parameter_validation.cpp
@@ -41,7 +41,6 @@
 #include "vulkan/vk_layer.h"
 #include "vk_layer_config.h"
 #include "vk_dispatch_table_helper.h"
-#include "vk_enum_validate_helper.h"
 #include "vk_struct_validate_helper.h"
 
 #include "vk_layer_table.h"
@@ -3869,15 +3868,10 @@
                         "Cannot set inherited occlusionQueryEnable in vkBeginCommandBuffer() when device does not support "
                         "inheritedQueries.");
         }
-
-        if ((dev_data->physical_device_features.inheritedQueries != VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE) &&
-            (!validate_VkQueryControlFlagBits(VkQueryControlFlagBits(pInfo->queryFlags)))) {
-            skip |=
-                log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
-                        reinterpret_cast<uint64_t>(commandBuffer), __LINE__, DEVICE_FEATURE, LayerName,
-                        "Cannot enable in occlusion queries in vkBeginCommandBuffer() and set queryFlags to %d which is not a "
-                        "valid combination of VkQueryControlFlagBits.",
-                        pInfo->queryFlags);
+        // VALIDATION_ERROR_00117 check
+        if ((dev_data->physical_device_features.inheritedQueries != VK_FALSE) && (pInfo->occlusionQueryEnable != VK_FALSE)) {
+            skip |= validate_flags(dev_data->report_data, "vkBeginCommandBuffer", "pBeginInfo->pInheritanceInfo->queryFlags",
+                                   "VkQueryControlFlagBits", AllVkQueryControlFlagBits, pInfo->queryFlags, false);
         }
     }
     return skip;