• 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_reduce_config") {
18  cflags_cc = deqp_common_cflags_cc
19  cflags_cc += [ "-ftemplate-depth=1024" ]
20  defines = deqp_common_defines
21  defines += [
22    "SPIRV_CHECK_CONTEXT",
23    "SPIRV_COLOR_TERMINAL",
24    "SPIRV_LINUX",
25    "SPIRV_TIMER_ENABLED",
26  ]
27}
28
29ohos_source_set("deqp_spirvtool_reduce_source") {
30  sources = [
31    "//third_party/spirv-tools/source/reduce/change_operand_reduction_opportunity.cpp",
32    "//third_party/spirv-tools/source/reduce/change_operand_to_undef_reduction_opportunity.cpp",
33    "//third_party/spirv-tools/source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp",
34    "//third_party/spirv-tools/source/reduce/conditional_branch_to_simple_conditional_branch_reduction_opportunity.cpp",
35    "//third_party/spirv-tools/source/reduce/merge_blocks_reduction_opportunity.cpp",
36    "//third_party/spirv-tools/source/reduce/merge_blocks_reduction_opportunity_finder.cpp",
37    "//third_party/spirv-tools/source/reduce/operand_to_const_reduction_opportunity_finder.cpp",
38    "//third_party/spirv-tools/source/reduce/operand_to_dominating_id_reduction_opportunity_finder.cpp",
39    "//third_party/spirv-tools/source/reduce/operand_to_undef_reduction_opportunity_finder.cpp",
40    "//third_party/spirv-tools/source/reduce/reducer.cpp",
41    "//third_party/spirv-tools/source/reduce/reduction_opportunity.cpp",
42    "//third_party/spirv-tools/source/reduce/reduction_opportunity_finder.cpp",
43    "//third_party/spirv-tools/source/reduce/reduction_pass.cpp",
44    "//third_party/spirv-tools/source/reduce/reduction_util.cpp",
45    "//third_party/spirv-tools/source/reduce/remove_block_reduction_opportunity.cpp",
46    "//third_party/spirv-tools/source/reduce/remove_block_reduction_opportunity_finder.cpp",
47    "//third_party/spirv-tools/source/reduce/remove_function_reduction_opportunity.cpp",
48    "//third_party/spirv-tools/source/reduce/remove_function_reduction_opportunity_finder.cpp",
49    "//third_party/spirv-tools/source/reduce/remove_instruction_reduction_opportunity.cpp",
50    "//third_party/spirv-tools/source/reduce/remove_selection_reduction_opportunity.cpp",
51    "//third_party/spirv-tools/source/reduce/remove_selection_reduction_opportunity_finder.cpp",
52    "//third_party/spirv-tools/source/reduce/remove_struct_member_reduction_opportunity.cpp",
53    "//third_party/spirv-tools/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp",
54    "//third_party/spirv-tools/source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp",
55    "//third_party/spirv-tools/source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp",
56    "//third_party/spirv-tools/source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp",
57
58    #"//third_party/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity.cpp",
59    #"//third_party/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp",
60    "//third_party/spirv-tools/source/reduce/structured_loop_to_selection_reduction_opportunity.cpp",
61    "//third_party/spirv-tools/source/reduce/structured_loop_to_selection_reduction_opportunity_finder.cpp",
62  ]
63
64  include_dirs = deqp_common_include_dirs
65  include_dirs += [
66    "//third_party/spirv-tools",
67    "//third_party/vk-gl-cts/build/external/spirv-tools/spirv-tools",
68    "//third_party/spirv-headers/include",
69    "//third_party/spirv-tools/include",
70  ]
71
72  configs = [ ":deqp_spirvtool_reduce_config" ]
73}
74
75ohos_static_library("libdeqp_spirvtools-reduce") {
76  deps = [
77    ":deqp_spirvtool_reduce_source",
78    "//third_party/spirv-tools:libdeqp_spirvtools",
79    "//third_party/spirv-tools/source/opt:libdeqp_spirvtools-opt",
80  ]
81  part_name = "graphic_standard"
82  subsystem_name = "graphic"
83}
84