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