blob: 5e3c6f452ae260c042b003d18a5d0023dab2cdcd [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors
#
# 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 (including the next
# paragraph) 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.
import("//garnet/lib/magma/gnbuild/magma.gni")
import("//packages/package.gni")
package("vulkan_loader_and_layers") {
deps = [
":layers",
"//third_party/vulkan_loader_and_validation_layers/loader",
]
libraries = [
{
name = "libvulkan.so"
},
{
name = "libVkLayer_core_validation.so"
},
{
name = "libVkLayer_threading.so"
},
{
name = "libVkLayer_unique_objects.so"
},
{
name = "libVkLayer_parameter_validation.so"
},
]
resources = [
{
path = rebase_path("fuchsia/VkLayer_core_validation.json")
dest = "vulkan/explicit_layer.d/VkLayer_core_validation.json"
},
{
path = rebase_path("fuchsia/VkLayer_parameter_validation.json")
dest = "vulkan/explicit_layer.d/VkLayer_parameter_validation.json"
},
{
path = rebase_path("fuchsia/VkLayer_threading.json")
dest = "vulkan/explicit_layer.d/VkLayer_threading.json"
},
{
path = rebase_path("fuchsia/VkLayer_unique_objects.json")
dest = "vulkan/explicit_layer.d/VkLayer_unique_objects.json"
},
]
}
package("vulkan_loader_and_layers_tests") {
testonly = true
if (current_cpu == "x64") {
deps = [
"//third_party/vulkan_loader_and_validation_layers/tests",
]
binaries = [
{
name = "loader_validation_tests"
},
{
name = "layer_validation_tests"
},
]
}
}
group("layers") {
public_deps = [
":VkLayer_core_validation",
":VkLayer_parameter_validation",
":VkLayer_threading",
":VkLayer_unique_objects",
]
}
config("layer_include_config") {
cflags_cc = [ "-Wno-unused-function" ]
include_dirs = [
".",
"../include",
"../loader",
]
}
source_set("layer_common") {
public_configs = [ ":layer_include_config" ]
sources = [
"vk_layer_config.cpp",
"vk_layer_extension_utils.cpp",
"vk_layer_table.cpp",
"vk_layer_utils.cpp",
]
public_deps = [
"../:extra_vulkan_headers",
"../:vulkan",
]
}
shared_library("VkLayer_core_validation") {
cflags_cc = [ "-Wno-missing-field-initializers" ]
include_dirs = [
"//third_party/shaderc/third_party/spirv-tools/include",
"//third_party/shaderc/third_party/glslang",
]
sources = [
"buffer_validation.cpp",
"core_validation.cpp",
"descriptor_sets.cpp",
"shader_validation.cpp",
"vk_format_utils.cpp",
]
deps = [
":layer_common",
"//third_party/shaderc/third_party/glslang",
"//third_party/shaderc/third_party/spirv-tools",
]
}
shared_library("VkLayer_parameter_validation") {
sources = [
"parameter_validation.cpp",
"vk_format_utils.cpp",
]
deps = [
":layer_common",
]
}
shared_library("VkLayer_threading") {
sources = [
"threading.cpp",
]
deps = [
":layer_common",
]
}
shared_library("VkLayer_unique_objects") {
sources = [
"unique_objects.cpp",
]
deps = [
":layer_common",
]
}