Vulkan: Use ShaderType enum.

This re-uses the same machinery as the GL front-end. It saves a lot of
custom casting and array sizing. Currently we only support vertex and
fragment shaders in Vulkan. Because of the Pipeline cache sizing, it's
easier to stick with just VS/FS and introduce the full set of shaders
when we move to packing the cache better.

Bug: angleproject:2522
Bug: angleproject:2455
Change-Id: I21432a335c741885af87970d8ee52b4a36338304
Reviewed-on: https://chromium-review.googlesource.com/1036927
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 723c018..e79be60 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -961,8 +961,10 @@
                                   const gl::AttributesMask &activeAttribLocationsMask,
                                   vk::PipelineAndSerial **pipelineOut)
 {
-    ASSERT(programVk->getVertexModuleSerial() == desc.getShaderStageInfo()[0].moduleSerial);
-    ASSERT(programVk->getFragmentModuleSerial() == desc.getShaderStageInfo()[1].moduleSerial);
+    ASSERT(programVk->getVertexModuleSerial() ==
+           desc.getShaderStageInfo()[vk::ShaderType::VertexShader].moduleSerial);
+    ASSERT(programVk->getFragmentModuleSerial() ==
+           desc.getShaderStageInfo()[vk::ShaderType::FragmentShader].moduleSerial);
 
     // Pull in a compatible RenderPass.
     vk::RenderPass *compatibleRenderPass = nullptr;