Re-land "Vulkan: Roll loader/validation layers SDK. (2/2)"
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: I1ed87ecfa84f51ee1edf6a8581d9b3c8f9a6f26e
Reviewed-on: https://chromium-review.googlesource.com/834429
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: 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: