Skip to content
Commits on Source (12)
......@@ -50,11 +50,6 @@ before_install:
sudo apt-get -qq update
sudo apt-get -y install libxkbcommon-dev libwayland-dev libxrandr-dev libx11-xcb-dev
fi
- |
if [[ "$VULKAN_BUILD_TARGET" == "MACOS" ]]; then
# We need to upgrade to a newer python
brew upgrade python3
fi
- |
if [[ "$VULKAN_BUILD_TARGET" == "LINUX" ]] || [[ "$VULKAN_BUILD_TARGET" == "MACOS" ]]; then
# Install dependencies
......
This file contains other licenses and their copyrights that appear in this
repository besides Apache 2.0 license.
===================================================
/*
Copyright (c) 2009 Dave Gamble
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
===================================================
/*
Copyright Kevlin Henney, 1997, 2003, 2012. All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose is hereby granted without fee, provided
that this copyright and permissions notice appear in all copies and
derivatives.
This software is supplied "as is" without express or implied warranty.
But that said, if there are any problems please get in touch.
*/
===================================================
Copyright 2008, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===================================================
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the names of Kitware, Inc., the Insight Software Consortium,
nor the names of their contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===================================================
Copyright (c) 2011 Fredrik Höglund <fredrik@kde.org>
Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
Copyright (c) 2007 Matthias Kretz, <kretz@kde.org>
Redistribution and use is allowed according to the terms of the BSD license.
===================================================
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
The majority of files in this project use the Apache 2.0 License.
There are a few exceptions and their license can be found in the source.
Any license deviations from Apache 2.0 are "more permissive" licenses.
===========================================================================================
Apache License
Version 2.0, January 2004
......
<!-- markdownlint-disable MD041 -->
[![Khronos Vulkan][1]][2]
[1]: https://vulkan.lunarg.com/img/Vulkan_100px_Dec16.png "https://www.khronos.org/vulkan/"
[2]: https://www.khronos.org/vulkan/
# Architecture of the Vulkan Loader Interfaces
[![Creative Commons][3]][4]
<!-- Copyright &copy; 2015-2019 LunarG, Inc. -->
[3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License"
[4]: https://creativecommons.org/licenses/by-nd/4.0/
## Table of Contents
* [Overview](#overview)
* [Who Should Read This Document](#who-should-read-this-document)
......
/*
*
* Copyright (c) 2014-2018 The Khronos Group Inc.
* Copyright (c) 2014-2018 Valve Corporation
* Copyright (c) 2014-2018 LunarG, Inc.
* Copyright (c) 2014-2019 The Khronos Group Inc.
* Copyright (c) 2014-2019 Valve Corporation
* Copyright (c) 2014-2019 LunarG, Inc.
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -1005,6 +1005,7 @@ static struct loader_layer_properties *loaderGetNextLayerPropertySlot(const stru
return NULL;
}
layer_list->list = new_ptr;
memset((uint8_t *)layer_list->list + layer_list->capacity, 0, layer_list->capacity);
layer_list->capacity *= 2;
}
......@@ -1048,6 +1049,17 @@ static bool loaderFindLayerNameInMetaLayer(const struct loader_instance *inst, c
return false;
}
// Search the override layer's blacklist for a layer matching the given layer name
static bool loaderFindLayerNameInBlacklist(const struct loader_instance *inst, const char *layer_name,
struct loader_layer_list *layer_list, struct loader_layer_properties *meta_layer_props) {
for (uint32_t black_layer = 0; black_layer < meta_layer_props->num_blacklist_layers; black_layer++) {
if (!strcmp(meta_layer_props->blacklist_layer_names[black_layer], layer_name)) {
return true;
}
}
return false;
}
// Remove all layer properties entries from the list
void loaderDeleteLayerListAndProperties(const struct loader_instance *inst, struct loader_layer_list *layer_list) {
uint32_t i, j, k;
......@@ -1056,6 +1068,10 @@ void loaderDeleteLayerListAndProperties(const struct loader_instance *inst, stru
if (!layer_list) return;
for (i = 0; i < layer_list->count; i++) {
if (NULL != layer_list->list[i].blacklist_layer_names) {
loader_instance_heap_free(inst, layer_list->list[i].blacklist_layer_names);
layer_list->list[i].blacklist_layer_names = NULL;
}
if (NULL != layer_list->list[i].component_layer_names) {
loader_instance_heap_free(inst, layer_list->list[i].component_layer_names);
layer_list->list[i].component_layer_names = NULL;
......@@ -1087,9 +1103,9 @@ void loaderDeleteLayerListAndProperties(const struct loader_instance *inst, stru
}
}
// Remove all layers in the layer list that are not found inside the override layer.
// Remove all layers in the layer list that are blacklisted by the override layer.
// NOTE: This should only be called if an override layer is found and not expired.
void loaderRemoveLayersNotInOverride(const struct loader_instance *inst, struct loader_layer_list *layer_list) {
void loaderRemoveLayersInBlacklist(const struct loader_instance *inst, struct loader_layer_list *layer_list) {
struct loader_layer_properties *override_prop = loaderFindLayerProperty(VK_OVERRIDE_LAYER_NAME, layer_list);
if (NULL == override_prop) {
return;
......@@ -1104,17 +1120,18 @@ void loaderRemoveLayersNotInOverride(const struct loader_instance *inst, struct
continue;
}
// If not found in the override layer, remove it
if (!loaderFindLayerNameInMetaLayer(inst, cur_layer_name, layer_list, override_prop)) {
// If found in the override layer's blacklist, remove it
if (loaderFindLayerNameInBlacklist(inst, cur_layer_name, layer_list, override_prop)) {
loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0,
"loaderRemoveLayersNotInOverride : Override layer is active, and layer %s is not list"
" inside of it. So removing layer from current layer list.",
"loaderRemoveLayersInBlacklist: Override layer is active and layer % is in the blacklist"
" inside of it. Removing that layer from current layer list.",
cur_layer_name);
if (cur_layer_prop.type_flags & VK_LAYER_TYPE_FLAG_META_LAYER) {
// Delete the component layers
loader_instance_heap_free(inst, cur_layer_prop.component_layer_names);
loader_instance_heap_free(inst, cur_layer_prop.override_paths);
// Never need to free the blacklist, since it can only exist in the override layer
}
// Remove the current invalid meta-layer from the layer list. Use memmove since we are
......@@ -1174,7 +1191,7 @@ void loaderRemoveLayersNotInImplicitMetaLayers(const struct loader_instance *ins
struct loader_layer_properties cur_layer_prop = layer_list->list[i];
if (!cur_layer_prop.keep) {
loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0,
"loaderRemoveLayersNotInOverride : Implicit meta-layers are active, and layer %s is not list"
"loaderRemoveLayersNotInImplicitMetaLayers : Implicit meta-layers are active, and layer %s is not list"
" inside of any. So removing layer from current layer list.",
cur_layer_prop.info.layerName);
......@@ -2567,6 +2584,9 @@ static void VerifyAllMetaLayers(struct loader_instance *inst, struct loader_laye
// Delete the component layers
loader_instance_heap_free(inst, prop->component_layer_names);
if (prop->blacklist_layer_names != NULL) {
loader_instance_heap_free(inst, prop->blacklist_layer_names);
}
// Remove the current invalid meta-layer from the layer list. Use memmove since we are
// overlapping the source and destination addresses.
......@@ -2602,7 +2622,7 @@ static VkResult loaderReadLayerJson(const struct loader_instance *inst, struct l
char *temp;
char *name, *type, *library_path_str, *api_version;
char *implementation_version, *description;
cJSON *ext_item, *library_path, *component_layers, *override_paths;
cJSON *ext_item, *library_path, *component_layers, *override_paths, *blacklisted_layers;
VkExtensionProperties ext_prop;
VkResult result = VK_ERROR_INITIALIZATION_FAILED;
struct loader_layer_properties *props = NULL;
......@@ -2849,6 +2869,42 @@ static VkResult loaderReadLayerJson(const struct loader_instance *inst, struct l
goto out;
}
props->num_blacklist_layers = 0;
props->blacklist_layer_names = NULL;
blacklisted_layers = cJSON_GetObjectItem(layer_node, "blacklisted_layers");
if (blacklisted_layers != NULL && strcmp(name, VK_OVERRIDE_LAYER_NAME)) {
loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0,
"Layer %s contains a blacklist, but a blacklist can only be provided by the override metalayer. "
"This blacklist will be ignored.", name);
} else if (blacklisted_layers != NULL) {
props->num_blacklist_layers = cJSON_GetArraySize(blacklisted_layers);
// Allocate the blacklist array
props->blacklist_layer_names = loader_instance_heap_alloc(
inst, sizeof(char[MAX_STRING_SIZE]) * props->num_blacklist_layers, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (props->blacklist_layer_names == NULL) {
result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
}
// Copy the blacklisted layers into the array
for (i = 0; i < (int)props->num_blacklist_layers; ++i) {
cJSON *black_layer = cJSON_GetArrayItem(blacklisted_layers, i);
if (black_layer == NULL) {
continue;
}
temp = cJSON_Print(black_layer);
if (temp == NULL) {
result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
}
temp[strlen(temp) - 1] = '\0';
strncpy(props->blacklist_layer_names[i], temp + 1, MAX_STRING_SIZE - 1);
props->blacklist_layer_names[i][MAX_STRING_SIZE - 1] = '\0';
cJSON_Free(temp);
}
}
override_paths = cJSON_GetObjectItem(layer_node, "override_paths");
if (NULL != override_paths) {
if (version.major == 1 && (version.minor < 1 || version.patch < 1)) {
......@@ -3136,12 +3192,17 @@ out:
#undef GET_JSON_OBJECT
if (VK_SUCCESS != result && NULL != props) {
if (NULL != props->blacklist_layer_names) {
loader_instance_heap_free(inst, props->blacklist_layer_names);
}
if (NULL != props->component_layer_names) {
loader_instance_heap_free(inst, props->component_layer_names);
}
if (NULL != props->override_paths) {
loader_instance_heap_free(inst, props->override_paths);
}
props->num_blacklist_layers = 0;
props->blacklist_layer_names = NULL;
props->num_component_layers = 0;
props->component_layer_names = NULL;
props->num_override_paths = 0;
......@@ -4239,7 +4300,7 @@ void loaderScanForLayers(struct loader_instance *inst, struct loader_layer_list
VerifyAllMetaLayers(inst, instance_layers, &override_layer_valid);
if (override_layer_valid) {
loaderRemoveLayersNotInOverride(inst, instance_layers);
loaderRemoveLayersInBlacklist(inst, instance_layers);
if (NULL != inst) {
inst->override_layer_present = true;
}
......@@ -4346,7 +4407,7 @@ void loaderScanForImplicitLayers(struct loader_instance *inst, struct loader_lay
// If either the override layer or an implicit meta-layer are present, we need to add
// explicit layer info as well. Not to worry, though, all explicit layers not included
// in the override layer will be removed below in loaderRemoveLayersNotInOverride().
// in the override layer will be removed below in loaderRemoveLayersInBlacklist().
if (override_layer_valid || implicit_metalayer_present) {
if (VK_SUCCESS != loaderGetDataFiles(inst, LOADER_DATA_FILE_MANIFEST_LAYER, true, "VK_LAYER_PATH", override_paths,
VK_ELAYERS_INFO_REGISTRY_LOC, VK_ELAYERS_INFO_RELATIVE_DIR, &manifest_files)) {
......@@ -4383,7 +4444,7 @@ void loaderScanForImplicitLayers(struct loader_instance *inst, struct loader_lay
VerifyAllMetaLayers(inst, instance_layers, &override_layer_valid);
if (override_layer_valid) {
loaderRemoveLayersNotInOverride(inst, instance_layers);
loaderRemoveLayersInBlacklist(inst, instance_layers);
if (NULL != inst) {
inst->override_layer_present = true;
}
......
/*
*
* Copyright (c) 2014-2017 The Khronos Group Inc.
* Copyright (c) 2014-2017 Valve Corporation
* Copyright (c) 2014-2017 LunarG, Inc.
* Copyright (c) 2014-2019 The Khronos Group Inc.
* Copyright (c) 2014-2019 Valve Corporation
* Copyright (c) 2014-2019 LunarG, Inc.
* Copyright (C) 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
......@@ -22,6 +22,7 @@
* Author: Chia-I Wu <olvaffe@gmail.com>
* Author: Chia-I Wu <olv@lunarg.com>
* Author: Mark Lobodzinski <mark@LunarG.com>
* Author: Lenny Komow <lenny@lunarg.com>
*
*/
......@@ -152,6 +153,8 @@ struct loader_layer_properties {
bool has_expiration;
struct loader_override_expiration expiration;
bool keep;
uint32_t num_blacklist_layers;
char (*blacklist_layer_names)[MAX_STRING_SIZE];
};
struct loader_layer_list {
......
//
// Copyright (c) 2014-2017 The Khronos Group Inc.
// Copyright (c) 2014-2017 Valve Corporation
// Copyright (c) 2014-2017 LunarG, Inc.
// Copyright (c) 2014-2019 The Khronos Group Inc.
// Copyright (c) 2014-2019 Valve Corporation
// Copyright (c) 2014-2019 LunarG, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......@@ -86,7 +86,7 @@ BEGIN
BEGIN
VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
VALUE "FileVersion", VER_FILE_VERSION_STR
VALUE "LegalCopyright", "Copyright (C) 2015-2018"
VALUE "LegalCopyright", "Copyright (C) 2015-2019"
VALUE "ProductName", "Vulkan Runtime"
VALUE "ProductVersion", VER_FILE_VERSION_STR
END
......
......@@ -6,7 +6,7 @@
"sub_dir" : "Vulkan-Headers",
"build_dir" : "Vulkan-Headers/build",
"install_dir" : "Vulkan-Headers/build/install",
"commit" : "v1.1.97"
"commit" : "v1.1.101"
}
],
"install_names" : {
......
#!/usr/bin/python3
#
# Copyright (c) 2013-2018 The Khronos Group Inc.
# Copyright (c) 2013-2019 The Khronos Group Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -21,12 +21,13 @@ startTime = None
def startTimer(timeit):
global startTime
if timeit:
startTime = time.process_time()
def endTimer(timeit, msg):
global startTime
if timeit:
endTime = time.process_time()
if (timeit):
write(msg, endTime - startTime, file=sys.stderr)
startTime = None
......@@ -81,7 +82,7 @@ def makeGenOpts(args):
# Copyright text prefixing all headers (list of strings).
prefixStrings = [
'/*',
'** Copyright (c) 2015-2018 The Khronos Group Inc.',
'** Copyright (c) 2015-2019 The Khronos Group Inc.',
'**',
'** Licensed under the Apache License, Version 2.0 (the "License");',
'** you may not use this file except in compliance with the License.',
......