xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunLICENSE = "Apache-2.0"
2*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunSRC_URI = "\
5*4882a593Smuzhiyun	git://github.com/KhronosGroup/VK-GL-CTS.git;protocol=https;name=vk-gl-cts;nobranch=1 \
6*4882a593Smuzhiyun	git://github.com/google/amber;protocol=https;destsuffix=git/external/amber/src;name=amber;branch=main \
7*4882a593Smuzhiyun	git://github.com/KhronosGroup/glslang.git;protocol=https;destsuffix=git/external/glslang/src;name=glslang;branch=master \
8*4882a593Smuzhiyun	git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/external/spirv-headers/src;name=spirv-headers;branch=master \
9*4882a593Smuzhiyun	git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/external/spirv-tools/src;name=spirv-tools;branch=master \
10*4882a593Smuzhiyun	https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;name=renderdoc \
11*4882a593Smuzhiyun"
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunS = "${WORKDIR}/git"
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSRCREV_FORMAT = "vk-gl-cts_amber_glslang_spirv-headers_spirv-tools"
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunS = "${WORKDIR}/git"
18*4882a593Smuzhiyun
19*4882a593Smuzhiyuninherit pkgconfig cmake features_check
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunANY_OF_DISTRO_FEATURES += "opengl wayland"
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunDEPENDS += "libpng zlib virtual/libgles2"
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunSRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
26*4882a593Smuzhiyun            file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
27*4882a593Smuzhiyun            file://0001-vulkancts.patch \
28*4882a593Smuzhiyun            file://0001-use-library-sonames-for-linking.patch \
29*4882a593Smuzhiyun"
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunSRC_URI:append:libc-musl = "\
32*4882a593Smuzhiyun	file://fix-musl.patch \
33*4882a593Smuzhiyun"
34*4882a593SmuzhiyunDEPENDS:append:libc-musl = " libexecinfo"
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunSRC_URI:append:toolchain-clang = "\
37*4882a593Smuzhiyun	file://fix-clang-private-operator.patch \
38*4882a593Smuzhiyun"
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun# The best thing for the user to do is to not specify any of the following
41*4882a593Smuzhiyun# PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own
42*4882a593Smuzhiyun# probing and build what it thinks is appropriate.
43*4882a593Smuzhiyun# However, if you want, you can specify one of the following PACKAGECONFIGs
44*4882a593Smuzhiyun# to override this behaviour.
45*4882a593SmuzhiyunPACKAGECONFIG ??= ""
46*4882a593SmuzhiyunPACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,,,,wayland x11_egl x11_glx x11_egl_glx"
47*4882a593SmuzhiyunPACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland,,,surfaceless x11_egl x11_glx x11_egl_glx"
48*4882a593SmuzhiyunPACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_glx x11_egl_glx"
49*4882a593SmuzhiyunPACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx"
50*4882a593SmuzhiyunPACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx"
51*4882a593Smuzhiyun
52*4882a593Smuzhiyunpython __anonymous() {
53*4882a593Smuzhiyun    # if the user doesn't specify any PACKAGECONFIG then the cts build system
54*4882a593Smuzhiyun    # is going to probe the sysroot to try to figure out what to build
55*4882a593Smuzhiyun    # in this case we try to guess whether the user is building for wayland
56*4882a593Smuzhiyun    # or x11 and add the required dependencies automatically
57*4882a593Smuzhiyun    distrofeatures = (d.getVar("DISTRO_FEATURES") or "")
58*4882a593Smuzhiyun    if not bb.utils.contains_any("PACKAGECONFIG", ["surfaceless", "wayland", "x11_egl", "x11_glx", "x11_egl_glx"], True, False, d):
59*4882a593Smuzhiyun        if "wayland" in distrofeatures:
60*4882a593Smuzhiyun            d.appendVar("DEPENDS", " wayland ")
61*4882a593Smuzhiyun        if "x11" in distrofeatures:
62*4882a593Smuzhiyun            d.appendVar("DEPENDS", " virtual/libx11 virtual/egl ")
63*4882a593Smuzhiyun}
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunCTSDIR = "/usr/lib/${BPN}"
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunFILES:${PN} += "${CTSDIR}"
68