1e5c31af7Sopenharmony_ci# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
2e5c31af7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3e5c31af7Sopenharmony_ci# you may not use this file except in compliance with the License.
4e5c31af7Sopenharmony_ci# You may obtain a copy of the License at
5e5c31af7Sopenharmony_ci#
6e5c31af7Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7e5c31af7Sopenharmony_ci#
8e5c31af7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9e5c31af7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10e5c31af7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11e5c31af7Sopenharmony_ci# See the License for the specific language governing permissions and
12e5c31af7Sopenharmony_ci# limitations under the License.
13e5c31af7Sopenharmony_ci
14e5c31af7Sopenharmony_ci# external glcts build
15e5c31af7Sopenharmony_ci
16e5c31af7Sopenharmony_ciimport("//build/ohos.gni")
17e5c31af7Sopenharmony_ciimport("//third_party/vk-gl-cts/vk_gl_cts.gni")
18e5c31af7Sopenharmony_ci
19e5c31af7Sopenharmony_ciconfig("glcts_config") {
20e5c31af7Sopenharmony_ci  cflags_cc = [
21e5c31af7Sopenharmony_ci    "-Wno-conversion",
22e5c31af7Sopenharmony_ci    "-Wno-unused-function",
23e5c31af7Sopenharmony_ci  ]
24e5c31af7Sopenharmony_ci
25e5c31af7Sopenharmony_ci  cflags_cc += deqp_common_cflags_cc
26e5c31af7Sopenharmony_ci  defines = deqp_common_defines
27e5c31af7Sopenharmony_ci}
28e5c31af7Sopenharmony_ci
29e5c31af7Sopenharmony_ciohos_source_set("glcts_source") {
30e5c31af7Sopenharmony_ci  sources = [ "//third_party/vk-gl-cts/external/openglcts/modules/glcTestPackageRegistry.cpp" ]
31e5c31af7Sopenharmony_ci  include_dirs = [
32e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/glshared",
33e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/egl",
34e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles2",
35e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles3",
36e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles31",
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/common",
39e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gl",
40e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
41e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
42e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
43e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
44e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
45e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules",
46e5c31af7Sopenharmony_ci  ]
47e5c31af7Sopenharmony_ci  include_dirs += deqp_common_include_dirs
48e5c31af7Sopenharmony_ci
49e5c31af7Sopenharmony_ci  deps = [
50e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/common:libdeqp_glcts-common-nocontext-package",
51e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gl:libdeqp_glcts-gl",
52e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles2:libdeqp_glcts-es2",
53e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles3:libdeqp_glcts-es3",
54e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles31:libdeqp_glcts-es31",
55e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles32:libdeqp_glcts-es32",
56e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/glesext:libdeqp_glcts-esext",
57e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/egl:libdeqp-egl",
58e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles2:libdeqp-gles2",
59e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles3:libdeqp-gles3",
60e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles31:libdeqp-gles31",
61e5c31af7Sopenharmony_ci  ]
62e5c31af7Sopenharmony_ci
63e5c31af7Sopenharmony_ci  configs = [ ":glcts_config" ]
64e5c31af7Sopenharmony_ci}
65e5c31af7Sopenharmony_ci
66e5c31af7Sopenharmony_ciohos_static_library("libdeqp_glcts") {
67e5c31af7Sopenharmony_ci  deps = [ ":glcts_source" ]
68e5c31af7Sopenharmony_ci  part_name = "graphic_2d"
69e5c31af7Sopenharmony_ci  subsystem_name = "graphic"
70e5c31af7Sopenharmony_ci}
71e5c31af7Sopenharmony_ci
72e5c31af7Sopenharmony_ciohos_executable("deqp_glcts") {
73e5c31af7Sopenharmony_ci  sources = [
74e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/glcTestPackageEntry.cpp",
75e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/framework/platform/tcuMain.cpp",
76e5c31af7Sopenharmony_ci  ]
77e5c31af7Sopenharmony_ci  include_dirs = [
78e5c31af7Sopenharmony_ci    "//third_party/zlib/src",
79e5c31af7Sopenharmony_ci    "//third_party/spirv-headers/include",
80e5c31af7Sopenharmony_ci    "//third_party/amber",
81e5c31af7Sopenharmony_ci    "//third_party/renderdoc/src",
82e5c31af7Sopenharmony_ci    "//third_party/vulkancts/framework/vulkan",
83e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/include",
84e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/framework/egl/wrapper",
85e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/common",
86e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gl",
87e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
88e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
89e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
90e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
91e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
92e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules",
93e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/glshared",
94e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/egl",
95e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles2",
96e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles3",
97e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles31",
98e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/runner",
99e5c31af7Sopenharmony_ci    "//third_party/glslang/glslang",
100e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/build/include",
101e5c31af7Sopenharmony_ci    "//third_party/glslang/SPIRV",
102e5c31af7Sopenharmony_ci    "//third_party/spirv-tools/include",
103e5c31af7Sopenharmony_ci    "//third_party/spirv-headers/include",
104e5c31af7Sopenharmony_ci  ]
105e5c31af7Sopenharmony_ci  include_dirs += deqp_common_include_dirs
106e5c31af7Sopenharmony_ci  deps = [
107e5c31af7Sopenharmony_ci    ":libdeqp_glcts",
108e5c31af7Sopenharmony_ci    "//third_party/libpng:libpng",
109e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/framework/platform:libdeqp_tcutil-platform",
110e5c31af7Sopenharmony_ci  ]
111e5c31af7Sopenharmony_ci
112e5c31af7Sopenharmony_ci  configs = [ ":glcts_config" ]
113e5c31af7Sopenharmony_ci  part_name = "graphic_2d"
114e5c31af7Sopenharmony_ci  subsystem_name = "graphic"
115e5c31af7Sopenharmony_ci}
116e5c31af7Sopenharmony_ci
117e5c31af7Sopenharmony_ciohos_executable("deqp_cts-runner") {
118e5c31af7Sopenharmony_ci  sources = [
119e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/glcTestPackageEntry.cpp",
120e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/runner/glcTestRunnerMain.cpp",
121e5c31af7Sopenharmony_ci  ]
122e5c31af7Sopenharmony_ci  include_dirs = [
123e5c31af7Sopenharmony_ci    "//third_party/zlib/src",
124e5c31af7Sopenharmony_ci    "//third_party/spirv-headers/include",
125e5c31af7Sopenharmony_ci    "//third_party/amber",
126e5c31af7Sopenharmony_ci    "//third_party/renderdoc/src",
127e5c31af7Sopenharmony_ci    "//third_party/vulkancts/framework/vulkan",
128e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/include",
129e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/framework/egl/wrapper",
130e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/common",
131e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gl",
132e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles2",
133e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles3",
134e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles31",
135e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/gles32",
136e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/glesext",
137e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules",
138e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/glshared",
139e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/egl",
140e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles2",
141e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles3",
142e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/gles31",
143e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/runner",
144e5c31af7Sopenharmony_ci    "//third_party/glslang/glslang",
145e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/build/include",
146e5c31af7Sopenharmony_ci    "//third_party/glslang/SPIRV",
147e5c31af7Sopenharmony_ci    "//third_party/spirv-tools/include",
148e5c31af7Sopenharmony_ci    "//third_party/spirv-headers/include",
149e5c31af7Sopenharmony_ci  ]
150e5c31af7Sopenharmony_ci  include_dirs += deqp_common_include_dirs
151e5c31af7Sopenharmony_ci
152e5c31af7Sopenharmony_ci  deps = [
153e5c31af7Sopenharmony_ci    ":libdeqp_glcts",
154e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/external/openglcts/modules/runner:libdeqp_glcts-runner",
155e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/framework/platform:libdeqp_tcutil-platform",
156e5c31af7Sopenharmony_ci    "//third_party/vk-gl-cts/modules/glshared:libdeqp-gl-shared",
157e5c31af7Sopenharmony_ci  ]
158e5c31af7Sopenharmony_ci
159e5c31af7Sopenharmony_ci  configs = [ ":glcts_config" ]
160e5c31af7Sopenharmony_ci  part_name = "graphic_2d"
161e5c31af7Sopenharmony_ci  subsystem_name = "graphic"
162e5c31af7Sopenharmony_ci}
163