Vulkan: Add vk::GetImpl helper.

Using reflection helpers, we can avoid having to pass the return
type to the GetImpl method.

BUG=angleproject:2200

Change-Id: Id160fbdf0ea8b3de2f219d3cc92394c678189a48
Reviewed-on: https://chromium-review.googlesource.com/742371
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
index d942cd6..7902353 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
@@ -62,7 +62,7 @@
 
     ANGLE_TRY(storageOut->buffer.init(device, uniformBufferInfo));
 
-    ANGLE_TRY(AllocateBufferMemory(GetImplAs<ContextVk>(context), blockSize, &storageOut->buffer,
+    ANGLE_TRY(AllocateBufferMemory(vk::GetImpl(context), blockSize, &storageOut->buffer,
                                    &storageOut->memory, requiredSizeOut));
 
     return gl::NoError();
@@ -145,7 +145,7 @@
 
 void ProgramVk::destroy(const gl::Context *contextImpl)
 {
-    VkDevice device = GetImplAs<ContextVk>(contextImpl)->getDevice();
+    VkDevice device = vk::GetImpl(contextImpl)->getDevice();
     reset(device);
 }
 
@@ -202,7 +202,7 @@
                                const gl::VaryingPacking &packing,
                                gl::InfoLog &infoLog)
 {
-    ContextVk *contextVk           = GetImplAs<ContextVk>(glContext);
+    ContextVk *contextVk           = vk::GetImpl(glContext);
     RendererVk *renderer           = contextVk->getRenderer();
     GlslangWrapper *glslangWrapper = renderer->getGlslangWrapper();
     VkDevice device                = renderer->getDevice();
@@ -250,7 +250,7 @@
 
 gl::Error ProgramVk::initDefaultUniformBlocks(const gl::Context *glContext)
 {
-    ContextVk *contextVk = GetImplAs<ContextVk>(glContext);
+    ContextVk *contextVk = vk::GetImpl(glContext);
     VkDevice device      = contextVk->getDevice();
 
     // Process vertex and fragment uniforms into std140 packing.
@@ -836,7 +836,7 @@
         // TODO(jmadill): Incomplete textures handling.
         ASSERT(texture);
 
-        TextureVk *textureVk   = GetImplAs<TextureVk>(texture);
+        TextureVk *textureVk   = vk::GetImpl(texture);
         const vk::Image &image = textureVk->getImage();
 
         VkDescriptorImageInfo &imageInfo = descriptorImageInfo[imageCount];