1# Copyright (c) 2020 Google LLC 2# 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and/or associated documentation files (the "Materials"), 5# to deal in the Materials without restriction, including without limitation 6# the rights to use, copy, modify, merge, publish, distribute, sublicense, 7# and/or sell copies of the Materials, and to permit persons to whom the 8# Materials are furnished to do so, subject to the following conditions: 9# 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Materials. 12# 13# MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS 14# STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND 15# HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ 16# 17# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22# FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS 23# IN THE MATERIALS. 24 25config("spv_headers_public_config") { 26 include_dirs = [ "include" ] 27} 28 29source_set("spv_headers") { 30 sources = [ 31 #"include/spirv/1.2/GLSL.std.450.h", 32 #"include/spirv/1.2/OpenCL.std.h", 33 #"include/spirv/1.2/spirv.h", 34 #"include/spirv/1.2/spirv.hpp", 35 #"include/spirv/unified1/GLSL.std.450.h", 36 #"include/spirv/unified1/NonSemanticClspvReflection.h", 37 #"include/spirv/unified1/NonSemanticDebugPrintf.h", 38 #"include/spirv/unified1/OpenCL.std.h", 39 #"include/spirv/unified1/spirv.h", 40 #"include/spirv/unified1/spirv.hpp", 41 ] 42 43 public_configs = [ ":spv_headers_public_config" ] 44} 45 46import("//build/ohos.gni") 47import("//third_party/vk-gl-cts/vk_gl_cts.gni") 48 49config("deqp_spirvtool_config") { 50 cflags_cc = deqp_common_cflags_cc 51 cflags_cc += [ 52 "-ftemplate-depth=1024", 53 "-Wno-switch", 54 ] 55 defines = deqp_common_defines 56 defines += [ 57 "SPIRV_CHECK_CONTEXT", 58 "SPIRV_COLOR_TERMINAL", 59 "SPIRV_LINUX", 60 "SPIRV_TIMER_ENABLED", 61 "SPIRV_TOOLS_SHAREDLIB", 62 "SPIRV_Tools_shared_EXPORTS", 63 ] 64} 65 66ohos_source_set("deqp_spirvtool_source") { 67 sources = [ 68 "//third_party/spirv-tools/source/assembly_grammar.cpp", 69 "//third_party/spirv-tools/source/binary.cpp", 70 "//third_party/spirv-tools/source/diagnostic.cpp", 71 "//third_party/spirv-tools/source/disassemble.cpp", 72 "//third_party/spirv-tools/source/enum_string_mapping.cpp", 73 "//third_party/spirv-tools/source/ext_inst.cpp", 74 "//third_party/spirv-tools/source/extensions.cpp", 75 "//third_party/spirv-tools/source/libspirv.cpp", 76 "//third_party/spirv-tools/source/name_mapper.cpp", 77 "//third_party/spirv-tools/source/opcode.cpp", 78 "//third_party/spirv-tools/source/operand.cpp", 79 "//third_party/spirv-tools/source/parsed_operand.cpp", 80 "//third_party/spirv-tools/source/print.cpp", 81 "//third_party/spirv-tools/source/software_version.cpp", 82 "//third_party/spirv-tools/source/spirv_endian.cpp", 83 "//third_party/spirv-tools/source/spirv_fuzzer_options.cpp", 84 "//third_party/spirv-tools/source/spirv_optimizer_options.cpp", 85 "//third_party/spirv-tools/source/spirv_reducer_options.cpp", 86 "//third_party/spirv-tools/source/spirv_target_env.cpp", 87 "//third_party/spirv-tools/source/spirv_validator_options.cpp", 88 "//third_party/spirv-tools/source/table.cpp", 89 "//third_party/spirv-tools/source/text.cpp", 90 "//third_party/spirv-tools/source/text_handler.cpp", 91 "//third_party/spirv-tools/source/util/bit_vector.cpp", 92 "//third_party/spirv-tools/source/util/parse_number.cpp", 93 "//third_party/spirv-tools/source/util/string_utils.cpp", 94 "//third_party/spirv-tools/source/util/timer.cpp", 95 "//third_party/spirv-tools/source/val/basic_block.cpp", 96 "//third_party/spirv-tools/source/val/construct.cpp", 97 "//third_party/spirv-tools/source/val/function.cpp", 98 "//third_party/spirv-tools/source/val/instruction.cpp", 99 "//third_party/spirv-tools/source/val/validate.cpp", 100 "//third_party/spirv-tools/source/val/validate_adjacency.cpp", 101 "//third_party/spirv-tools/source/val/validate_annotation.cpp", 102 "//third_party/spirv-tools/source/val/validate_arithmetics.cpp", 103 "//third_party/spirv-tools/source/val/validate_atomics.cpp", 104 "//third_party/spirv-tools/source/val/validate_barriers.cpp", 105 "//third_party/spirv-tools/source/val/validate_bitwise.cpp", 106 "//third_party/spirv-tools/source/val/validate_builtins.cpp", 107 "//third_party/spirv-tools/source/val/validate_capability.cpp", 108 "//third_party/spirv-tools/source/val/validate_cfg.cpp", 109 "//third_party/spirv-tools/source/val/validate_composites.cpp", 110 "//third_party/spirv-tools/source/val/validate_constants.cpp", 111 "//third_party/spirv-tools/source/val/validate_conversion.cpp", 112 "//third_party/spirv-tools/source/val/validate_debug.cpp", 113 "//third_party/spirv-tools/source/val/validate_decorations.cpp", 114 "//third_party/spirv-tools/source/val/validate_derivatives.cpp", 115 "//third_party/spirv-tools/source/val/validate_execution_limitations.cpp", 116 "//third_party/spirv-tools/source/val/validate_extensions.cpp", 117 "//third_party/spirv-tools/source/val/validate_function.cpp", 118 "//third_party/spirv-tools/source/val/validate_id.cpp", 119 "//third_party/spirv-tools/source/val/validate_image.cpp", 120 "//third_party/spirv-tools/source/val/validate_instruction.cpp", 121 "//third_party/spirv-tools/source/val/validate_interfaces.cpp", 122 "//third_party/spirv-tools/source/val/validate_layout.cpp", 123 "//third_party/spirv-tools/source/val/validate_literals.cpp", 124 "//third_party/spirv-tools/source/val/validate_logicals.cpp", 125 "//third_party/spirv-tools/source/val/validate_memory.cpp", 126 "//third_party/spirv-tools/source/val/validate_memory_semantics.cpp", 127 "//third_party/spirv-tools/source/val/validate_mesh_shading.cpp", 128 "//third_party/spirv-tools/source/val/validate_misc.cpp", 129 "//third_party/spirv-tools/source/val/validate_mode_setting.cpp", 130 "//third_party/spirv-tools/source/val/validate_non_uniform.cpp", 131 "//third_party/spirv-tools/source/val/validate_primitives.cpp", 132 "//third_party/spirv-tools/source/val/validate_ray_query.cpp", 133 "//third_party/spirv-tools/source/val/validate_ray_tracing.cpp", 134 "//third_party/spirv-tools/source/val/validate_scopes.cpp", 135 "//third_party/spirv-tools/source/val/validate_small_type_uses.cpp", 136 "//third_party/spirv-tools/source/val/validate_type.cpp", 137 "//third_party/spirv-tools/source/val/validation_state.cpp", 138 ] 139 140 include_dirs = deqp_common_include_dirs 141 include_dirs += [ 142 "//third_party/spirv-tools", 143 "//third_party/vk-gl-cts/build/external/spirv-tools/spirv-tools", 144 "//third_party/spirv-headers/include", 145 "//third_party/spirv-tools/include", 146 ] 147 148 configs = [ ":deqp_spirvtool_config" ] 149} 150 151ohos_static_library("libdeqp_spirvtools") { 152 deps = [ ":deqp_spirvtool_source" ] 153 part_name = "graphic_2d" 154 subsystem_name = "graphic" 155} 156