• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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
14# deqp external vkutil build
15
16import("//build/ohos.gni")
17import("//third_party/vk-gl-cts/vk_gl_cts.gni")
18
19config("deqp_vkutil_config") {
20  cflags_cc = deqp_common_cflags_cc
21  defines = deqp_common_defines
22  defines += [
23    "_XOPEN_SOURCE=600",
24    "VK_USE_PLATFORM_OHOS_OPENHARMONY",
25  ]
26}
27
28ohos_source_set("deqp_vkutilnoshader_source") {
29  sources = [
30    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkAllocationCallbackUtil.cpp",
31    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkApiVersion.cpp",
32    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBarrierUtil.cpp",
33    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBinaryRegistry.cpp",
34    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBufferWithMemory.cpp",
35    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBuilderUtil.cpp",
36    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkCmdUtil.cpp",
37    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDebugReportUtil.cpp",
38    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDefs.cpp",
39    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp",
40    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDeviceProperties.cpp",
41    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDeviceUtil.cpp",
42    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkImageUtil.cpp",
43    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkImageWithMemory.cpp",
44    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkMemUtil.cpp",
45    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkNullDriver.cpp",
46    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkObjUtil.cpp",
47    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkPlatform.cpp",
48    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkQueryUtil.cpp",
49    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRayTracingUtil.cpp",
50    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRef.cpp",
51    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRefUtil.cpp",
52    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRenderDocUtil.cpp",
53    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkShaderProgram.cpp",
54    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkStrUtil.cpp",
55    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkTypeUtil.cpp",
56    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkWsiPlatform.cpp",
57    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkWsiUtil.cpp",
58    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkYCbCrImageWithMemory.cpp",
59  ]
60
61  include_dirs = deqp_common_include_dirs
62  include_dirs += [
63    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan",
64    "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan",
65    "//third_party/glslang",
66    "//third_party/spirv-tools/include",
67  ]
68
69  deps = [
70    "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler",
71    "//third_party/glslang/SPIRV:libdeqp_spirv",
72    "//third_party/glslang/SPIRV:libdeqp_spvremapper",
73    "//third_party/glslang/glslang:libdeqp_GenericCodeGen",
74    "//third_party/glslang/glslang:libdeqp_MachineIndependent",
75    "//third_party/glslang/glslang:libdeqp_OSDependent",
76
77    #":gen_framework_c",
78    "//third_party/glslang/glslang:libdeqp_glslang",
79    "//third_party/glslang/hlsl:libdeqp_hlsl",
80    "//third_party/spirv-tools:libdeqp_spirvtools",
81    "//third_party/spirv-tools/source/link:libdeqp_spirvtools-link",
82    "//third_party/spirv-tools/source/lint:libdeqp_spirvtools-lint",
83    "//third_party/spirv-tools/source/opt:libdeqp_spirvtools-opt",
84    "//third_party/spirv-tools/source/reduce:libdeqp_spirvtools-reduce",
85    "//third_party/vk-gl-cts/framework/common:libdeqp_tcutil",
86    "//third_party/vk-gl-cts/framework/delibs/depool:libdeqp_depool",
87    "//third_party/vk-gl-cts/framework/opengl:libdeqp_glutil",
88    "//third_party/vk-gl-cts/framework/xexml:libdeqp_xexml",
89    "//third_party/zlib:libz",
90  ]
91
92  #   lib_dirs = [
93  #     "//third_party/vk-gl-cts/outlibs"
94  #   ]
95  #   libs=[
96  #     "glslang",
97  #     "GenericCodeGen",
98  #     "MachineIndependent",
99  #     "SPIRV",
100  #     "SPVRemapper",
101  #     "HLSL",
102  #     "OGLCompiler",
103  #     "OSDependent",
104  #     "spirv-tools-link",
105  #     "spirv-tools",
106  #     "spirv-tools-lint",
107  #     "spirv-tools-reduce",
108  #     "spirv-tools-opt",
109  #     "z"
110  #   ]
111
112  configs = [ ":deqp_vkutil_config" ]
113}
114
115ohos_static_library("libdeqp_vkutilnoshader") {
116  deps = [ ":deqp_vkutilnoshader_source" ]
117  part_name = "graphic_2d"
118  subsystem_name = "graphic"
119}
120
121action("gen_ext_deps") {
122  script =
123      "//third_party/vk-gl-cts/external/vulkancts/scripts/ohos_gen_ext_deps.py"
124  outputs = [ "$target_out_dir/gen_ext_deps.log" ]
125
126  out_path = rebase_path(
127          "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan")
128  args = [ "$out_path" ]
129}
130
131action("gen_framework") {
132  script =
133      "//third_party/vk-gl-cts/external/vulkancts/scripts/ohos_gen_framework.py"
134  outputs = [ "$target_out_dir/gen_framework.log" ]
135
136  out_path = rebase_path(
137          "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan")
138  args = [ "$out_path" ]
139  deps = [ ":gen_ext_deps" ]
140}
141
142action("gen_framework_c") {
143  script = "//third_party/vk-gl-cts/external/vulkancts/scripts/ohos_gen_framework_c.py"
144  outputs = [ "$target_out_dir/gen_framework_c.log" ]
145
146  out_path = rebase_path(
147          "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan")
148  args = [ "$out_path" ]
149  deps = [ ":gen_framework" ]
150}
151
152ohos_source_set("deqp_vkutil_source") {
153  sources = [
154    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkPrograms.cpp",
155    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkShaderToSpirV.cpp",
156    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkSpirVAsm.cpp",
157    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkSpirVProgram.cpp",
158  ]
159
160  include_dirs = deqp_common_include_dirs
161  include_dirs += [
162    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan",
163    "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan",
164    "//third_party/glslang",
165    "//third_party/spirv-tools/include",
166  ]
167
168  deps = [
169    ":libdeqp_vkutilnoshader",
170    "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler",
171    "//third_party/glslang/SPIRV:libdeqp_spirv",
172    "//third_party/glslang/SPIRV:libdeqp_spvremapper",
173    "//third_party/glslang/glslang:libdeqp_GenericCodeGen",
174    "//third_party/glslang/glslang:libdeqp_MachineIndependent",
175    "//third_party/glslang/glslang:libdeqp_OSDependent",
176    "//third_party/glslang/glslang:libdeqp_glslang",
177    "//third_party/glslang/hlsl:libdeqp_hlsl",
178    "//third_party/spirv-tools:libdeqp_spirvtools",
179    "//third_party/spirv-tools/source/link:libdeqp_spirvtools-link",
180    "//third_party/spirv-tools/source/lint:libdeqp_spirvtools-lint",
181    "//third_party/spirv-tools/source/opt:libdeqp_spirvtools-opt",
182    "//third_party/spirv-tools/source/reduce:libdeqp_spirvtools-reduce",
183    "//third_party/vk-gl-cts/framework/common:libdeqp_tcutil",
184    "//third_party/vk-gl-cts/framework/opengl:libdeqp_glutil",
185    "//third_party/zlib:libz",
186  ]
187
188  #   lib_dirs = [
189  #     "//third_party/vk-gl-cts/outlibs"
190  #   ]
191  #   libs=[
192  #     "glslang",
193  #     "GenericCodeGen",
194  #     "MachineIndependent",
195  #     "SPIRV",
196  #     "SPVRemapper",
197  #     "HLSL",
198  #     "OGLCompiler",
199  #     "OSDependent",
200  #     "spirv-tools-link",
201  #     "spirv-tools",
202  #     "spirv-tools-lint",
203  #     "spirv-tools-reduce",
204  #     "spirv-tools-opt",
205  #     "z"
206  #   ]
207
208  configs = [ ":deqp_vkutil_config" ]
209}
210ohos_static_library("libdeqp_vkutil") {
211  deps = [ ":deqp_vkutil_source" ]
212  part_name = "graphic_2d"
213  subsystem_name = "graphic"
214}
215