blob: 315a463061460bec16966db2c33e11890095f79b [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/components.gni")
import("//src/graphics/lib/magma/gnbuild/magma.gni")
source_set("vulkan_extension_test") {
testonly = true
sources = [
"vulkan_extension_test.cc",
"vulkan_extension_test.h",
]
deps = [
"//sdk/lib/fdio",
"//src/lib/fsl",
]
public_deps = [
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_hlcpp",
"//src/graphics/tests/common",
"//src/lib/vulkan",
"//third_party/googletest:gtest",
]
}
fuchsia_component_manifest("child-manifest") {
component_name = "vkext-test-child"
manifest = "meta/vkext-test-child.cml"
}
fuchsia_structured_config_cpp_elf_lib("config") {
cm_label = ":child-manifest"
}
executable("vkext_bin") {
testonly = true
output_name = "vkext"
sources = [
"config_query.cc",
"vk_ext_buffer_collection.cc",
"vk_ext_protected.cc",
"vk_fuchsia_external_memory.cc",
"vk_fuchsia_external_semaphore.cc",
]
deps = [
":config",
":vulkan_extension_test",
"../common:gtest_main",
"../vkreadback:helper",
"//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_hlcpp",
"//sdk/lib/fdio",
"//src/graphics/magma/lib/magma/platform:logger_impl",
"//src/graphics/magma/lib/magma/platform:semaphore",
"//src/graphics/tests/common",
"//src/lib/fsl",
"//src/lib/vulkan",
"//third_party/googletest:gtest",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/trace",
]
}
executable("vkext_linux") {
testonly = true
sources = [ "test_vk_ext_fd.cc" ]
deps = [
"//src/graphics/tests/common",
"//src/lib/fxl/test:gtest_main",
]
}
group("vkext_linux_x64") {
testonly = true
public_deps = [ ":vkext_linux(//build/toolchain:linux_x64)" ]
}
fuchsia_component("vkext_cmp") {
component_name = "vkext-test-child"
deps = [
":vkext_bin",
"//src/lib/vulkan/validation_layers",
]
cm_label = ":child-manifest"
testonly = true
}
fuchsia_structured_config_values("default_config") {
cm_label = ":child-manifest"
values = {
gpu_vendor_id = 0
support_sysmem_yuv = true
support_sysmem_linear_nonrgba = true
support_sysmem_renderable_linear = true
support_protected_memory = false
disabled_test_pattern = ""
}
}
fuchsia_package("vkext-child-package") {
package_name = "vkext-test"
testonly = true
deps = [
":default_config",
":vkext_cmp",
]
}
protected_libvulkan_envs = []
# Filter out everything that's not astro, sherlock, or nelson.
foreach(env, magma_libvulkan_hardware_envs) {
if (env == sherlock_env || env == astro_env || env == nelson_env) {
protected_libvulkan_envs += [ env ]
}
}
fuchsia_test_component("vkext-unprotected-test-component") {
component_name = "vkext-unprotected"
manifest = "meta/vkext_unprotected.cml"
test_type = "vulkan"
}
fuchsia_test_package("vkext-unprotected-package") {
package_name = "vkext_unprotected_test"
test_components = [ ":vkext-unprotected-test-component" ]
subpackages = [ ":vkext-child-package" ]
test_specs = {
environments = magma_libvulkan_hardware_envs - protected_libvulkan_envs
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_test_component("vkext-unprotected-lavapipe-test-component") {
component_name = "vkext-unprotected-lavapipe"
manifest = "meta/vkext_unprotected_lavapipe.cml"
test_type = "vulkan"
restricted_features = [ "config_capabilities" ]
}
fuchsia_test_package("vkext-unprotected-lavapipe-package") {
package_name = "vkext_unprotected_lavapipe_test"
test_components = [ ":vkext-unprotected-lavapipe-test-component" ]
subpackages = [ ":vkext-child-package" ]
test_specs = {
environments = []
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_test_component("vkext-protected-test-component") {
component_name = "vkext-protected-test"
manifest = "meta/vkext_protected.cml"
test_type = "vulkan"
restricted_features = [ "config_capabilities" ]
}
fuchsia_test_package("vkext-protected-package") {
package_name = "vkext_protected_test"
test_components = [ ":vkext-protected-test-component" ]
subpackages = [ ":vkext-child-package" ]
test_specs = {
environments = protected_libvulkan_envs
log_settings = {
max_severity = "ERROR"
}
}
}
group("vkext") {
testonly = true
deps = [
":vkext-protected-package",
":vkext-unprotected-lavapipe-package",
":vkext-unprotected-package",
]
}