bug 14868: Replace VkTimestampType with VkPipelineStageFlagBits (WIP)

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14868
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 6439db3..492895f 100755
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -3217,7 +3217,7 @@
                            startQuery, queryCount, destBuffer, destOffset, stride, flags);
 }
 
-VK_LAYER_EXPORT void VKAPI vkCmdWriteTimestamp(VkCmdBuffer cmdBuffer, VkTimestampType timestampType, VkBuffer destBuffer, VkDeviceSize destOffset)
+VK_LAYER_EXPORT void VKAPI vkCmdWriteTimestamp(VkCmdBuffer cmdBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer destBuffer, VkDeviceSize destOffset)
 {
     VkBool32 skipCall = VK_FALSE;
     layer_data* dev_data = get_my_data_ptr(get_dispatch_key(cmdBuffer), layer_data_map);
@@ -3231,7 +3231,7 @@
         }
     }
     if (VK_FALSE == skipCall)
-        dev_data->device_dispatch_table->CmdWriteTimestamp(cmdBuffer, timestampType, destBuffer, destOffset);
+        dev_data->device_dispatch_table->CmdWriteTimestamp(cmdBuffer, pipelineStage, destBuffer, destOffset);
 }
 
 VK_LAYER_EXPORT VkResult VKAPI vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer)
diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp
index d0d9655..5317f76 100644
--- a/layers/param_checker.cpp
+++ b/layers/param_checker.cpp
@@ -6435,33 +6435,25 @@
 
 bool PostCmdWriteTimestamp(
     VkCmdBuffer cmdBuffer,
-    VkTimestampType timestampType,
+    VkPipelineStageFlagBits pipelineStage,
     VkBuffer destBuffer,
     VkDeviceSize destOffset)
 {
 
-    if(timestampType < VK_TIMESTAMP_TYPE_BEGIN_RANGE ||
-        timestampType > VK_TIMESTAMP_TYPE_END_RANGE)
-    {
-        log_msg(mdd(cmdBuffer), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK",
-        "vkCmdWriteTimestamp parameter, VkTimestampType timestampType, is an unrecognized enumerator");
-        return false;
-    }
-
-
+    ValidateEnumerator(pipelineStage);
 
     return true;
 }
 
 VK_LAYER_EXPORT void VKAPI vkCmdWriteTimestamp(
     VkCmdBuffer cmdBuffer,
-    VkTimestampType timestampType,
+    VkPipelineStageFlagBits pipelineStage,
     VkBuffer destBuffer,
     VkDeviceSize destOffset)
 {
-    get_dispatch_table(pc_device_table_map, cmdBuffer)->CmdWriteTimestamp(cmdBuffer, timestampType, destBuffer, destOffset);
+    get_dispatch_table(pc_device_table_map, cmdBuffer)->CmdWriteTimestamp(cmdBuffer, pipelineStage, destBuffer, destOffset);
 
-    PostCmdWriteTimestamp(cmdBuffer, timestampType, destBuffer, destOffset);
+    PostCmdWriteTimestamp(cmdBuffer, pipelineStage, destBuffer, destOffset);
 }
 
 bool PostCmdCopyQueryPoolResults(