| # Copyright 2024 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("//build/config.gni") |
| |
| assert(target_cpu == "x64", "gfxstream is only for x64") |
| |
| resource("vulkan_metadata") { |
| sources = [ "metadata.json" ] |
| outputs = [ "data/metadata.json" ] |
| } |
| |
| icd_name = "libvulkan_gfxstream" |
| |
| manifest_filename = "$target_gen_dir/vulkan/icd.d/$icd_name.json" |
| |
| generated_file("vulkan_manifest_json") { |
| outputs = [ manifest_filename ] |
| |
| # api_version must be present but is unused |
| contents = { |
| file_format_version = "1.0.0" |
| ICD = { |
| library_path = icd_name + ".so" |
| api_version = "1.1.0" |
| } |
| } |
| |
| output_conversion = "json" |
| } |
| |
| resource("vulkan_manifest_resource") { |
| sources = [ manifest_filename ] |
| outputs = [ "data/icd.d/$icd_name.json" ] |
| deps = [ ":vulkan_manifest_json" ] |
| } |
| |
| fuchsia_package_with_single_component("gfxstream-vulkan") { |
| package_name = "libvulkan_gfxstream" |
| component_name = "vulkan" |
| deps = [ |
| ":vulkan_manifest_resource", |
| ":vulkan_metadata", |
| "//third_party/gfxstream/src/guest:libvulkan_gfxstream", |
| ] |
| manifest = "meta/vulkan.cml" |
| } |