Hash :
8a57b468
Author :
Date :
2017-12-28T12:25:03
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>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
#!/usr/bin/python2
#
# Copyright 2016 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.
#
# generate_vulkan_layers_json.py:
# Generate copies of the Vulkan layers JSON files, with no paths, forcing
# Vulkan to use the default search path to look for layers.
import os, sys, json, glob
if len(sys.argv) != 3:
print("Usage: " + sys.argv[0] + " <source_dir> <target_dir>")
sys.exit(1)
source_dir = sys.argv[1]
target_dir = sys.argv[2]
if not os.path.isdir(source_dir):
print(source_dir + " is not a directory.")
sys.exit(1)
if not os.path.exists(target_dir):
os.makedirs(target_dir)
for json_fname in glob.glob(os.path.join(source_dir, "*.json")):
with open(json_fname) as infile:
data = json.load(infile)
# update the path
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:
json.dump(data, outfile)