• 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 framwork tcutil-platform build
15
16import("//build/ohos.gni")
17import("//foundation/graphic/graphic_2d/graphic_config.gni")
18import("//third_party/vk-gl-cts/vk_gl_cts.gni")
19
20config("tcutil-platform_config") {
21  cflags_cc = [
22      "-Wno-conversion",
23      "-Wno-unused-function",
24  ]
25  cflags_cc += deqp_common_cflags_cc
26  defines = deqp_common_defines
27}
28
29ohos_source_set("tcutil-platform_source") {
30  sources = [
31    "//third_party/vk-gl-cts/framework/platform/vanilla/tcuVanillaPlatform.cpp",
32  ]
33  include_dirs = [
34    "//third_party/zlib/src",
35    "//third_party/spirv-headers/include",
36    "//third_party/amber",
37    "//third_party/renderdoc/src",
38    "//third_party/libpng",
39    "//third_party/vulkancts/framework/vulkan",
40    "//third_party/vk-gl-cts/build/external/vulkancts/framework/vulkan",
41    "//third_party/glslang/glslang",
42    "//third_party/vk-gl-cts/build/include",
43    "//third_party/glslang/SPIRV",
44    "//third_party/spirv-tools/include",
45    "//third_party/spirv-headers/include",
46  ]
47  include_dirs += deqp_common_include_dirs
48
49  deps = [
50    "//third_party/vk-gl-cts/external/vulkancts/framework/vulkan:libdeqp_vkutil",
51    "//third_party/vk-gl-cts/framework/common:libdeqp_tcutil",
52    "//third_party/vk-gl-cts/framework/opengl:libdeqp_glutil",
53    "//third_party/vk-gl-cts/framework/egl:libdeqp_eglutil",
54  ]
55  configs = [ ":tcutil-platform_config" ]
56}
57
58ohos_static_library("libdeqp_tcutil-platform") {
59    deps = [ ":tcutil-platform_source" ]
60    part_name = "graphic_standard"
61    subsystem_name = "graphic"
62}
63
64config("deqp_platform_ohos_config") {
65  cflags_cc = deqp_common_cflags_cc
66  defines = deqp_common_defines
67  defines += [
68    "_XOPEN_SOURCE=600"
69  ]
70}
71
72ohos_shared_library("libdeqp_ohos_platform") {
73    sources = [
74        "ohos/context/tcuOhosNativeContext.cpp",
75        "ohos/context/tcuOhosEglContextFactory.cpp",
76
77        "ohos/display/tcuOhosNativeDisplay.cpp",
78        "ohos/display/tcuOhosEglDisplayFactory.cpp",
79
80        "ohos/display/window/tcuOhosNativeWindow.cpp",
81        "ohos/display/window/tcuOhosWindowFactory.cpp",
82        "ohos/display/pixmap/tcuOhosNativePixmap.cpp",
83        "ohos/display/pixmap/tcuOhosPixmapFactory.cpp",
84
85        "ohos/tcuOhosPlatform.cpp",
86    ]
87    include_dirs = [
88        "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include",
89        "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src",
90        "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/src",
91        "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/include",
92        "//foundation/graphic/graphic_2d/rosen/modules/render_service_client",
93        "//foundation/graphic/graphic_2d/interfaces/innerkits/vsync_module",
94        "//foundation/graphic/graphic_2d/rosen/include/common",
95        "//foundation/window/window_manager/interfaces/innerkits/wm",
96        "//third_party/vk-gl-cts",
97        "//third_party/vk-gl-cts/framework/delibs/debase",
98        "//third_party/vk-gl-cts/framework/delibs/decpp",
99        "//third_party/vk-gl-cts/framework/delibs/depool",
100        "//third_party/vk-gl-cts/framework/delibs/dethread",
101        "//third_party/vk-gl-cts/framework/delibs/deutil",
102        "//third_party/vk-gl-cts/framework/delibs/destream",
103        "//third_party/vk-gl-cts/framework/common",
104        "//third_party/vk-gl-cts/framework/qphelper",
105        "//third_party/vk-gl-cts/framework/xexml",
106        "//third_party/vk-gl-cts/framework/egl",
107        "//third_party/vk-gl-cts/framework/egl/wrapper",
108        "//third_party/vk-gl-cts/framework/opengl",
109        "//third_party/vk-gl-cts/framework/opengl/wrapper",
110        "//third_party/vk-gl-cts/framework/opengl/simplereference",
111        "//third_party/vk-gl-cts/framework/platform/ohos",
112        "//third_party/libpng",
113        "//third_party/vk-gl-cts/external/openglcts/modules",
114        "//third_party/vk-gl-cts/external/openglcts/modules/common",
115        "//third_party/vk-gl-cts/external/openglcts/modules/gl",
116        "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
117        "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
118        "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
119        "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
120        "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
121        "//third_party/vk-gl-cts/external/openglcts/modules/runner",
122        "//third_party/vk-gl-cts/framework/referencerenderer",
123        "//third_party/vk-gl-cts/modules/glshared",
124        "ohos/rosen_context",
125    ]
126    deps = [
127        "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
128        "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base",
129        "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
130        "//foundation/graphic/graphic_2d/rosen/samples/2d_graphics:drawing_sample_rs",
131        "//foundation/window/window_manager/wm:libwm",
132        "//third_party/vk-gl-cts/framework/common:libdeqp_tcutil",
133        "//third_party/vk-gl-cts/framework/delibs/decpp:libdeqp_decpp",
134        "//third_party/vk-gl-cts/framework/delibs/debase:libdeqp_debase",
135        "//third_party/vk-gl-cts/framework/delibs/deutil:libdeqp_deutil",
136        "//third_party/vk-gl-cts/framework/qphelper:libdeqp_qphelper",
137        "//third_party/vk-gl-cts/framework/delibs/dethread:libdeqp_dethread",
138        "//third_party/vk-gl-cts/framework/xexml:libdeqp_xexml",
139        "//third_party/vk-gl-cts/framework/egl:libdeqp_eglutil",
140        "//third_party/vk-gl-cts/framework/egl/wrapper:libdeqp_eglwrapper",
141        "//third_party/vk-gl-cts/framework/opengl:libdeqp_glutil",
142        "//third_party/vk-gl-cts/framework/opengl/wrapper:libdeqp_glwrapper",
143        "//third_party/vk-gl-cts/framework/opengl/simplereference:libdeqp_glutil-sglr",
144        "//third_party/vk-gl-cts/modules/egl:libdeqp-egl",
145        "//third_party/vk-gl-cts/modules/gles2:libdeqp-gles2",
146        "//third_party/vk-gl-cts/modules/gles3:libdeqp-gles3",
147        "//third_party/vk-gl-cts/modules/gles31:libdeqp-gles31",
148        "//third_party/vk-gl-cts/modules/glshared:libdeqp-gl-shared",
149        "//third_party/vk-gl-cts/external/openglcts/modules:libdeqp_glcts",
150
151        "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
152        "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
153        "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base",
154        "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
155
156        "//foundation/window/window_manager/dm:libdm",
157        "//foundation/window/window_manager/dmserver:libdms",
158        "//foundation/window/window_manager/wm:libwm",
159        "//foundation/window/window_manager/wmserver:libwms",
160
161        "ohos/rosen_context:rosen_context",
162        ":libdeqp_tcutil-platform",
163        "//third_party/zlib:libz",
164        "//third_party/libpng:libpng",
165    ]
166    external_deps = [
167        "hilog_native:libhilog",
168        "multimedia_image_framework:image_native",
169    ]
170
171    configs = [ ":deqp_platform_ohos_config" ]
172}
173
174ohos_executable("glcts") {
175  sources = [
176    "ohos/testmain.cpp",
177  ]
178    include_dirs = [
179        "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include",
180        "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src",
181        "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/src",
182        "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/include",
183        "//foundation/graphic/graphic_2d/rosen/modules/render_service_client",
184        "//foundation/graphic/graphic_2d/interfaces/innerkits/vsync_module",
185        "//foundation/graphic/graphic_2d/rosen/include/common",
186        "//foundation/window/window_manager/interfaces/innerkits/wm",
187        "//third_party/vk-gl-cts",
188        "//third_party/vk-gl-cts/framework/delibs/debase",
189        "//third_party/vk-gl-cts/framework/delibs/decpp",
190        "//third_party/vk-gl-cts/framework/delibs/depool",
191        "//third_party/vk-gl-cts/framework/delibs/dethread",
192        "//third_party/vk-gl-cts/framework/delibs/deutil",
193        "//third_party/vk-gl-cts/framework/delibs/destream",
194        "//third_party/vk-gl-cts/framework/common",
195        "//third_party/vk-gl-cts/framework/qphelper",
196        "//third_party/vk-gl-cts/framework/xexml",
197        "//third_party/vk-gl-cts/framework/egl",
198        "//third_party/vk-gl-cts/framework/egl/wrapper",
199        "//third_party/vk-gl-cts/framework/opengl",
200        "//third_party/vk-gl-cts/framework/opengl/wrapper",
201        "//third_party/vk-gl-cts/framework/opengl/simplereference",
202        "//third_party/vk-gl-cts/framework/platform/ohos",
203        "//third_party/libpng",
204        "//third_party/vk-gl-cts/external/openglcts/modules",
205        "//third_party/vk-gl-cts/external/openglcts/modules/common",
206        "//third_party/vk-gl-cts/external/openglcts/modules/gl",
207        "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
208        "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
209        "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
210        "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
211        "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
212        "//third_party/vk-gl-cts/external/openglcts/modules/runner",
213        "//third_party/vk-gl-cts/framework/referencerenderer",
214        "//third_party/vk-gl-cts/modules/glshared",
215        "ohos/rosen_context",
216    ]
217  deps = [
218    ":libdeqp_ohos_platform",
219  ]
220  configs = [ ":deqp_platform_ohos_config" ]
221}
222