1# Copyright 2022 Android Open Source Project 2# SPDX-License-Identifier: MIT 3 4output_host_path = meson.current_build_dir() + '/host/vulkan/cereal' 5guest_enc_path = meson.current_build_dir() 6 7if build_machine.system() != 'android' 8 gfxstream_guest_vk_autogen = custom_target( 9 'gfxstream_guest_vk_autogen', 10 output : [ 11 'VkEncoder.h', 12 'goldfish_vk_counting_guest.h', 13 'goldfish_vk_deepcopy_guest.h', 14 'goldfish_vk_marshaling_guest.h', 15 'goldfish_vk_extension_structs_guest.h', 16 'goldfish_vk_reserved_marshaling_guest.h', 17 'goldfish_vk_transform_guest.h', 18 'goldfish_vk_counting_guest.cpp', 19 'goldfish_vk_deepcopy_guest.cpp', 20 'goldfish_vk_extension_structs_guest.cpp', 21 'goldfish_vk_marshaling_guest.cpp', 22 'goldfish_vk_reserved_marshaling_guest.cpp', 23 'goldfish_vk_transform_guest.cpp', 24 'VkEncoder.cpp', 25 'func_table.cpp', 26 ], 27 env: {'GFXSTREAM_NO_CLANG_FMT': '1', 'CEREAL_VARIANT' : 'guest', 28 'GFXSTREAM_GUEST_ENCODER_DIR': guest_enc_path}, 29 input: [genvk, vk_api_xml, vk_gfxstream_xml], 30 command: [prog_python, '@INPUT0@', '-registry', '@INPUT1@', '-registryGfxstream', '@INPUT2@', 31 'cereal', '-o', output_host_path], 32 ) 33 34 vulkan_gfxstream_h = custom_target( 35 'vulkan_gfxstream_header', 36 output : [ 37 'vulkan_gfxstream.h', 38 ], 39 env: {'GFXSTREAM_NO_CLANG_FMT': '1', 'CEREAL_VARIANT' : 'guest'}, 40 input: [genvk, vk_gfxstream_xml], 41 command: [prog_python, '@INPUT0@', '-registry', '@INPUT1@', 'vulkan_gfxstream.h', 42 '-o', guest_enc_path], 43 ) 44else 45 gfxstream_guest_vk_autogen = files( 46 'VkEncoder.h', 47 'goldfish_vk_counting_guest.h', 48 'goldfish_vk_deepcopy_guest.h', 49 'goldfish_vk_marshaling_guest.h', 50 'goldfish_vk_extension_structs_guest.h', 51 'goldfish_vk_reserved_marshaling_guest.h', 52 'goldfish_vk_transform_guest.h', 53 'goldfish_vk_counting_guest.cpp', 54 'goldfish_vk_deepcopy_guest.cpp', 55 'goldfish_vk_extension_structs_guest.cpp', 56 'goldfish_vk_marshaling_guest.cpp', 57 'goldfish_vk_reserved_marshaling_guest.cpp', 58 'goldfish_vk_transform_guest.cpp', 59 'VkEncoder.cpp', 60 'func_table.cpp' 61 ) 62 63 vulkan_gfxstream_h = files('vulkan_gfxstream.h') 64endif 65 66gfxstream_vk_entrypoints = custom_target( 67 'gfxstream_vk_entrypoints', 68 input : [vk_entrypoints_gen, vk_api_xml], 69 output : ['gfxstream_vk_entrypoints.h', 'gfxstream_vk_entrypoints.c'], 70 command : [ 71 prog_python, '@INPUT0@', '--xml', '@INPUT1@', '--proto', '--weak', 72 '--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@', '--prefix', 'gfxstream_vk', 73 '--beta', with_vulkan_beta.to_string() 74 ], 75) 76 77files_lib_vulkan_enc = files( 78 'CommandBufferStagingStream.cpp', 79 'DescriptorSetVirtualization.cpp', 80 'HostVisibleMemoryVirtualization.cpp', 81 'ResourceTracker.cpp', 82 'Resources.cpp', 83 'Validation.cpp', 84 'VulkanHandleMapping.cpp', 85 'VulkanStreamGuest.cpp', 86 'gfxstream_vk_private.cpp', 87 'GfxStreamVulkanConnection.cpp', 88) 89