Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"

Second re-land fixes git.bat access on developer machines.

Re-landing with upstream fixes to the layers so they no longer
need to copy the parameter validation errors to the current
working directory of the layer generation. Also includes fixes
for the GCC build.

This hasn't been updated in a while, so there are many changes.
It should also include better validation for memory barriers.

Also includes updated builds for SPIRV Tools and glslang.
A few pull requests need to land before landing this in ANGLE.

This second step re-enables Vulkan and includes the updated build.

Includes a workaround for parameter_validation.h no longer being
auto-generated, and the stale file clobbering the build.

Also includes a fix for an incorrect memory barrier.

Bug: angleproject:2237
Change-Id: Ic1a3ad7458bb743d7279a1af9334693ab6cb59d6
Reviewed-on: https://chromium-review.googlesource.com/845859
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/scripts/generate_vulkan_layers_json.py b/scripts/generate_vulkan_layers_json.py
index 0d806e3..e5fc773 100644
--- a/scripts/generate_vulkan_layers_json.py
+++ b/scripts/generate_vulkan_layers_json.py
@@ -29,8 +29,13 @@
         data = json.load(infile)
 
         # update the path
-        prev_name = os.path.basename(data['layer']['library_path'])
-        data['layer']['library_path'] = prev_name
+        if not 'layer' in data:
+            raise Exception("Could not find a layer key in " + json_fname)
+
+        # The standard validation layer has no library path.
+        if 'library_path' in data['layer']:
+            prev_name = os.path.basename(data['layer']['library_path'])
+            data['layer']['library_path'] = prev_name
 
         target_fname = os.path.join(target_dir, os.path.basename(json_fname))
         with open(target_fname, "w") as outfile:
diff --git a/scripts/remove_file_if_exists.py b/scripts/remove_file_if_exists.py
new file mode 100644
index 0000000..976470b
--- /dev/null
+++ b/scripts/remove_file_if_exists.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python2
+#
+# Copyright 2017 The ANGLE Project Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# remove_file_if_exists.py:
+#   This special action is needed to remove generated headers.
+#   Otherwise ANGLE will pick up the old file(s) and the build will fail.
+#
+
+import sys
+import os
+
+if len(sys.argv) < 3:
+    print("Usage: " + sys.argv[0] + " <remove_file> <stamp_file>")
+
+remove_file = sys.argv[1]
+if os.path.isfile(remove_file):
+    os.remove(remove_file)
+
+# touch a dummy file to keep a timestamp
+with open(sys.argv[2], "w") as f:
+    f.write("blah")
+    f.close()