• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//third_party/vk-gl-cts/vk_gl_cts.gni")
16
17config("deqp_spirvtool_opt_config") {
18  cflags_cc = deqp_common_cflags_cc
19  defines = deqp_common_defines
20  defines += [
21    "SPIRV_CHECK_CONTEXT",
22    "SPIRV_COLOR_TERMINAL",
23    "SPIRV_LINUX",
24    "SPIRV_TIMER_ENABLED",
25  ]
26}
27
28ohos_source_set("deqp_spirvtool_opt_source") {
29  sources = [
30    "//third_party/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp",
31    "//third_party/spirv-tools/source/opt/amd_ext_to_khr.cpp",
32    "//third_party/spirv-tools/source/opt/basic_block.cpp",
33    "//third_party/spirv-tools/source/opt/block_merge_pass.cpp",
34    "//third_party/spirv-tools/source/opt/block_merge_util.cpp",
35    "//third_party/spirv-tools/source/opt/build_module.cpp",
36    "//third_party/spirv-tools/source/opt/ccp_pass.cpp",
37    "//third_party/spirv-tools/source/opt/cfg.cpp",
38    "//third_party/spirv-tools/source/opt/cfg_cleanup_pass.cpp",
39    "//third_party/spirv-tools/source/opt/code_sink.cpp",
40    "//third_party/spirv-tools/source/opt/combine_access_chains.cpp",
41    "//third_party/spirv-tools/source/opt/compact_ids_pass.cpp",
42    "//third_party/spirv-tools/source/opt/composite.cpp",
43    "//third_party/spirv-tools/source/opt/const_folding_rules.cpp",
44    "//third_party/spirv-tools/source/opt/constants.cpp",
45    "//third_party/spirv-tools/source/opt/control_dependence.cpp",
46    "//third_party/spirv-tools/source/opt/convert_to_half_pass.cpp",
47    "//third_party/spirv-tools/source/opt/convert_to_sampled_image_pass.cpp",
48    "//third_party/spirv-tools/source/opt/copy_prop_arrays.cpp",
49    "//third_party/spirv-tools/source/opt/dataflow.cpp",
50    "//third_party/spirv-tools/source/opt/dead_branch_elim_pass.cpp",
51    "//third_party/spirv-tools/source/opt/dead_insert_elim_pass.cpp",
52    "//third_party/spirv-tools/source/opt/dead_variable_elimination.cpp",
53    "//third_party/spirv-tools/source/opt/debug_info_manager.cpp",
54    "//third_party/spirv-tools/source/opt/decoration_manager.cpp",
55    "//third_party/spirv-tools/source/opt/def_use_manager.cpp",
56    "//third_party/spirv-tools/source/opt/desc_sroa.cpp",
57    "//third_party/spirv-tools/source/opt/desc_sroa_util.cpp",
58    "//third_party/spirv-tools/source/opt/dominator_analysis.cpp",
59    "//third_party/spirv-tools/source/opt/dominator_tree.cpp",
60    "//third_party/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp",
61    "//third_party/spirv-tools/source/opt/eliminate_dead_functions_pass.cpp",
62    "//third_party/spirv-tools/source/opt/eliminate_dead_functions_util.cpp",
63    "//third_party/spirv-tools/source/opt/eliminate_dead_input_components_pass.cpp",
64    "//third_party/spirv-tools/source/opt/eliminate_dead_members_pass.cpp",
65    "//third_party/spirv-tools/source/opt/feature_manager.cpp",
66    "//third_party/spirv-tools/source/opt/fix_func_call_arguments.cpp",
67    "//third_party/spirv-tools/source/opt/fix_storage_class.cpp",
68    "//third_party/spirv-tools/source/opt/flatten_decoration_pass.cpp",
69    "//third_party/spirv-tools/source/opt/fold.cpp",
70    "//third_party/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp",
71    "//third_party/spirv-tools/source/opt/folding_rules.cpp",
72    "//third_party/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp",
73    "//third_party/spirv-tools/source/opt/function.cpp",
74    "//third_party/spirv-tools/source/opt/graphics_robust_access_pass.cpp",
75    "//third_party/spirv-tools/source/opt/if_conversion.cpp",
76    "//third_party/spirv-tools/source/opt/inline_exhaustive_pass.cpp",
77    "//third_party/spirv-tools/source/opt/inline_opaque_pass.cpp",
78    "//third_party/spirv-tools/source/opt/inline_pass.cpp",
79    "//third_party/spirv-tools/source/opt/inst_bindless_check_pass.cpp",
80    "//third_party/spirv-tools/source/opt/inst_buff_addr_check_pass.cpp",
81    "//third_party/spirv-tools/source/opt/inst_debug_printf_pass.cpp",
82    "//third_party/spirv-tools/source/opt/instruction.cpp",
83    "//third_party/spirv-tools/source/opt/instruction_list.cpp",
84    "//third_party/spirv-tools/source/opt/instrument_pass.cpp",
85    "//third_party/spirv-tools/source/opt/interface_var_sroa.cpp",
86    "//third_party/spirv-tools/source/opt/interp_fixup_pass.cpp",
87    "//third_party/spirv-tools/source/opt/ir_context.cpp",
88    "//third_party/spirv-tools/source/opt/ir_loader.cpp",
89    "//third_party/spirv-tools/source/opt/licm_pass.cpp",
90    "//third_party/spirv-tools/source/opt/local_access_chain_convert_pass.cpp",
91    "//third_party/spirv-tools/source/opt/local_redundancy_elimination.cpp",
92    "//third_party/spirv-tools/source/opt/local_single_block_elim_pass.cpp",
93    "//third_party/spirv-tools/source/opt/local_single_store_elim_pass.cpp",
94    "//third_party/spirv-tools/source/opt/loop_dependence.cpp",
95    "//third_party/spirv-tools/source/opt/loop_dependence_helpers.cpp",
96    "//third_party/spirv-tools/source/opt/loop_descriptor.cpp",
97    "//third_party/spirv-tools/source/opt/loop_fission.cpp",
98    "//third_party/spirv-tools/source/opt/loop_fusion.cpp",
99    "//third_party/spirv-tools/source/opt/loop_fusion_pass.cpp",
100    "//third_party/spirv-tools/source/opt/loop_peeling.cpp",
101    "//third_party/spirv-tools/source/opt/loop_unroller.cpp",
102    "//third_party/spirv-tools/source/opt/loop_unswitch_pass.cpp",
103    "//third_party/spirv-tools/source/opt/loop_utils.cpp",
104    "//third_party/spirv-tools/source/opt/mem_pass.cpp",
105    "//third_party/spirv-tools/source/opt/merge_return_pass.cpp",
106    "//third_party/spirv-tools/source/opt/module.cpp",
107    "//third_party/spirv-tools/source/opt/optimizer.cpp",
108    "//third_party/spirv-tools/source/opt/pass.cpp",
109    "//third_party/spirv-tools/source/opt/pass_manager.cpp",
110    "//third_party/spirv-tools/source/opt/private_to_local_pass.cpp",
111    "//third_party/spirv-tools/source/opt/propagator.cpp",
112    "//third_party/spirv-tools/source/opt/reduce_load_size.cpp",
113    "//third_party/spirv-tools/source/opt/redundancy_elimination.cpp",
114    "//third_party/spirv-tools/source/opt/register_pressure.cpp",
115    "//third_party/spirv-tools/source/opt/relax_float_ops_pass.cpp",
116    "//third_party/spirv-tools/source/opt/remove_dontinline_pass.cpp",
117    "//third_party/spirv-tools/source/opt/remove_duplicates_pass.cpp",
118    "//third_party/spirv-tools/source/opt/remove_unused_interface_variables_pass.cpp",
119    "//third_party/spirv-tools/source/opt/replace_desc_array_access_using_var_index.cpp",
120    "//third_party/spirv-tools/source/opt/replace_invalid_opc.cpp",
121    "//third_party/spirv-tools/source/opt/scalar_analysis.cpp",
122    "//third_party/spirv-tools/source/opt/scalar_analysis_simplification.cpp",
123    "//third_party/spirv-tools/source/opt/scalar_replacement_pass.cpp",
124    "//third_party/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp",
125    "//third_party/spirv-tools/source/opt/simplification_pass.cpp",
126    "//third_party/spirv-tools/source/opt/spread_volatile_semantics.cpp",
127    "//third_party/spirv-tools/source/opt/ssa_rewrite_pass.cpp",
128    "//third_party/spirv-tools/source/opt/strength_reduction_pass.cpp",
129    "//third_party/spirv-tools/source/opt/strip_debug_info_pass.cpp",
130    "//third_party/spirv-tools/source/opt/strip_nonsemantic_info_pass.cpp",
131    "//third_party/spirv-tools/source/opt/struct_cfg_analysis.cpp",
132    "//third_party/spirv-tools/source/opt/type_manager.cpp",
133    "//third_party/spirv-tools/source/opt/types.cpp",
134    "//third_party/spirv-tools/source/opt/unify_const_pass.cpp",
135    "//third_party/spirv-tools/source/opt/upgrade_memory_model.cpp",
136    "//third_party/spirv-tools/source/opt/value_number_table.cpp",
137    "//third_party/spirv-tools/source/opt/vector_dce.cpp",
138    "//third_party/spirv-tools/source/opt/workaround1209.cpp",
139    "//third_party/spirv-tools/source/opt/wrap_opkill.cpp",
140  ]
141
142  include_dirs = deqp_common_include_dirs
143  include_dirs += [
144    "//third_party/spirv-tools",
145    "//third_party/vk-gl-cts/build/external/spirv-tools/spirv-tools",
146    "//third_party/spirv-headers/include",
147    "//third_party/spirv-headers/include/spirv/unified1",
148    "//third_party/spirv-tools/include",
149  ]
150
151  configs = [ ":deqp_spirvtool_opt_config" ]
152}
153
154ohos_static_library("libdeqp_spirvtools-opt") {
155  deps = [
156    ":deqp_spirvtool_opt_source",
157    "//third_party/spirv-tools:libdeqp_spirvtools",
158  ]
159  part_name = "graphic_2d"
160  subsystem_name = "graphic"
161}
162