1// Copyright (C) 2023 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20genrule { 21 name: "libberberis_android_api_libvulkan_vulkan_xml_headers_riscv64_to_x86_64", 22 out: ["vulkan_xml-inl.h"], 23 srcs: [":vulkan_headers_registry"], 24 tools: ["gen_vulkan"], 25 cmd: "$(location gen_vulkan) --xml $(out) --input $(in) --guest_arch riscv64 --host_arch x86_64", 26} 27 28cc_library_shared { 29 name: "libberberis_proxy_libvulkan", 30 defaults: ["berberis_proxy_library_defaults"], 31 cflags: [ 32 "-DVK_USE_PLATFORM_ANDROID_KHR", 33 ], 34 srcs: [":native_bridge_proxy_libvulkan_files"], 35 header_libs: [ 36 "hwvulkan_headers", 37 "libberberis_base_headers", 38 ], 39 arch: { 40 x86_64: { 41 generated_headers: ["libberberis_android_api_libvulkan_vulkan_xml_headers_riscv64_to_x86_64"], 42 }, 43 }, 44 shared_libs: ["libvulkan"], 45} 46 47cc_library_static { 48 name: "libberberis_emulated_libvulkan_api_checker", 49 defaults: ["berberis_defaults_64"], 50 host_supported: true, 51 native_bridge_supported: true, 52 srcs: [":native_bridge_proxy_libvulkan_checker"], 53 header_libs: [ 54 "hwvulkan_headers", 55 "libberberis_base_headers", 56 "vulkan_headers", 57 ], 58 arch: { 59 riscv64: { 60 enabled: true, 61 generated_headers: ["libberberis_android_api_libvulkan_vulkan_xml_headers_riscv64_to_x86_64"], 62 }, 63 x86_64: { 64 generated_headers: ["libberberis_android_api_libvulkan_vulkan_xml_headers_riscv64_to_x86_64"], 65 }, 66 }, 67} 68