• 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    "DISABLE_SHADERCACHE_IPC",
26  ]
27}
28
29ohos_source_set("deqp_vkutilnoshader_source") {
30  sources = [
31    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkAllocationCallbackUtil.cpp",
32    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkApiVersion.cpp",
33    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkAppParamsUtil.cpp",
34    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBarrierUtil.cpp",
35    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBinaryRegistry.cpp",
36    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBufferWithMemory.cpp",
37    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkBuilderUtil.cpp",
38    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkCmdUtil.cpp",
39    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDebugReportUtil.cpp",
40    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDefs.cpp",
41    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp",
42    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDeviceProperties.cpp",
43    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkDeviceUtil.cpp",
44    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkImageUtil.cpp",
45    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkImageWithMemory.cpp",
46    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkMemUtil.cpp",
47    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkNullDriver.cpp",
48    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkObjUtil.cpp",
49    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkPipelineConstructionUtil.cpp",
50    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkPlatform.cpp",
51    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkQueryUtil.cpp",
52    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRayTracingUtil.cpp",
53    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRef.cpp",
54    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRefUtil.cpp",
55    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkRenderDocUtil.cpp",
56    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkResourceInterface.cpp",
57    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkSafetyCriticalUtil.cpp",
58    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkShaderProgram.cpp",
59    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkStrUtil.cpp",
60    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkTypeUtil.cpp",
61    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkWsiPlatform.cpp",
62    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkWsiUtil.cpp",
63    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkYCbCrImageWithMemory.cpp",
64  ]
65
66  include_dirs = deqp_common_include_dirs
67  include_dirs += [
68    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan",
69    "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan",
70    "//third_party/glslang",
71    "//third_party/spirv-tools/include",
72  ]
73
74  deps = [
75    # "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler",
76    "//third_party/glslang/SPIRV:libdeqp_spirv",
77    "//third_party/glslang/SPIRV:libdeqp_spvremapper",
78    "//third_party/glslang/glslang:libdeqp_GenericCodeGen",
79    "//third_party/glslang/glslang:libdeqp_MachineIndependent",
80    "//third_party/glslang/glslang:libdeqp_OSDependent",
81
82    #":gen_framework_c",
83    "//third_party/glslang/glslang:libdeqp_glslang",
84
85    #"//third_party/glslang/hlsl:libdeqp_hlsl",
86    "//third_party/spirv-tools:libdeqp_spirvtools",
87    "//third_party/spirv-tools/source/link:libdeqp_spirvtools-link",
88    "//third_party/spirv-tools/source/lint:libdeqp_spirvtools-lint",
89    "//third_party/spirv-tools/source/opt:libdeqp_spirvtools-opt",
90    "//third_party/spirv-tools/source/reduce:libdeqp_spirvtools-reduce",
91    "//third_party/vk-gl-cts/framework/common:libdeqp_tcutil",
92    "//third_party/vk-gl-cts/framework/delibs/depool:libdeqp_depool",
93    "//third_party/vk-gl-cts/framework/opengl:libdeqp_glutil",
94    "//third_party/vk-gl-cts/framework/xexml:libdeqp_xexml",
95    "//third_party/zlib:libz",
96  ]
97  part_name = "acts"
98  subsystem_name = "xts"
99  configs = [ ":deqp_vkutil_config" ]
100}
101
102ohos_static_library("libdeqp_vkutilnoshader") {
103  deps = [ ":deqp_vkutilnoshader_source" ]
104  part_name = "acts"
105  subsystem_name = "xts"
106}
107
108action("gen_ext_deps") {
109  script = "//third_party/vk-gl-cts/external/vulkancts/scripts/ohos_gen_ext_deps.py -o ../../../build/external/vulkancts/framework/vulkan"
110  outputs = [ "$target_out_dir/gen_ext_deps.log" ]
111
112  out_path = rebase_path(
113          "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan")
114  args = [ "$out_path" ]
115}
116
117action("gen_framework") {
118  script = "//third_party/vk-gl-cts/external/vulkancts/scripts/ohos_gen_framework.py -o ../../../build/external/vulkancts/framework/vulkan"
119  outputs = [ "$target_out_dir/gen_framework.log" ]
120
121  out_path = rebase_path(
122          "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan")
123  args = [ "$out_path" ]
124  deps = [ ":gen_ext_deps" ]
125}
126
127action("gen_framework_c") {
128  script = "//third_party/vk-gl-cts/external/vulkancts/scripts/ohos_gen_framework_c.py -o ../../../build/external/vulkancts/framework/vulkan"
129  outputs = [ "$target_out_dir/gen_framework_c.log" ]
130
131  out_path = rebase_path(
132          "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan")
133  args = [ "$out_path" ]
134  deps = [ ":gen_framework" ]
135}
136
137ohos_source_set("deqp_vkutil_source") {
138  sources = [
139    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkPrograms.cpp",
140    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkShaderToSpirV.cpp",
141    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkSpirVAsm.cpp",
142    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan/vkSpirVProgram.cpp",
143  ]
144  include_dirs = deqp_common_include_dirs
145  include_dirs += [
146    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan",
147    "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan",
148    "//third_party/glslang",
149    "//third_party/spirv-tools/include",
150  ]
151
152  deps = [
153    ":libdeqp_vkutilnoshader",
154
155    # "//third_party/glslang/OGLCompilersDLL:libdeqp_OGLCompiler",
156    "//third_party/glslang/SPIRV:libdeqp_spirv",
157    "//third_party/glslang/SPIRV:libdeqp_spvremapper",
158    "//third_party/glslang/glslang:libdeqp_GenericCodeGen",
159    "//third_party/glslang/glslang:libdeqp_MachineIndependent",
160    "//third_party/glslang/glslang:libdeqp_OSDependent",
161    "//third_party/glslang/glslang:libdeqp_glslang",
162
163    #"//third_party/glslang/hlsl:libdeqp_hlsl",
164    "//third_party/spirv-tools:libdeqp_spirvtools",
165    "//third_party/spirv-tools/source/link:libdeqp_spirvtools-link",
166    "//third_party/spirv-tools/source/lint:libdeqp_spirvtools-lint",
167    "//third_party/spirv-tools/source/opt:libdeqp_spirvtools-opt",
168    "//third_party/spirv-tools/source/reduce:libdeqp_spirvtools-reduce",
169    "//third_party/vk-gl-cts/framework/common:libdeqp_tcutil",
170    "//third_party/vk-gl-cts/framework/opengl:libdeqp_glutil",
171    "//third_party/zlib:libz",
172  ]
173  part_name = "acts"
174  subsystem_name = "xts"
175  configs = [ ":deqp_vkutil_config" ]
176}
177ohos_static_library("libdeqp_vkutil") {
178  deps = [ ":deqp_vkutil_source" ]
179  part_name = "acts"
180  subsystem_name = "xts"
181}
182