Vulkan: Minor refactor to RendererVk::initialize.

Bug: angleproject:2314
Change-Id: Ic3fa5f8ff5a0933e22b9fd5803b7ab3fbbfd449f
Reviewed-on: https://chromium-review.googlesource.com/899686
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
index 1847f40..4ea31b4 100644
--- a/src/libANGLE/renderer/vulkan/RendererVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -250,9 +250,7 @@
 
 vk::Error RendererVk::initialize(const egl::AttributeMap &attribs, const char *wsiName)
 {
-    mEnableValidationLayers = ShouldUseDebugLayers(attribs);
-
-    ScopedVkLoaderEnvironment scopedEnvironment(mEnableValidationLayers);
+    ScopedVkLoaderEnvironment scopedEnvironment(ShouldUseDebugLayers(attribs));
     mEnableValidationLayers = scopedEnvironment.canEnableValidationLayers();
 
     // Gather global layer properties.