. "$BST_LIB" # vulkan-headers is the Khronos definition of Vulkan -- 42 headers, a 2.4 MB # machine-readable API registry and a find_package() package. It is PAYLOAD: no # library, no binary of upstream's, nothing to run. # # WHAT IT IS ON THIS IMAGE FOR, and what that makes this suite's problem. # Nothing on this machine can open a Vulkan device: there is no ICD, no driver # and no GPU behind the guest, and that is not what the port is for. What ships # is the BUILD-TIME surface -- a consumer that includes # compiles, and one that writes find_package(VulkanHeaders) resolves. Every case # below is about that surface, and none of them pretends to be about rendering. # # For a payload port "the files are present" is the whole of what a shell test # can say by itself, and it is much weaker than it reads: a truncated install, a # half-regenerated registry, or a header no compiler on this arm would accept # all satisfy it. This suite is built around the properties that cannot be # satisfied by accident, and it reaches them by four independent routes: # # the compiled probe section 7. A translation unit including the C header, # the C++ binding and the two generated tables, built at # image-build time by the distro's own C++ driver, so it # also answers the question a listing cannot: did a # compiler on THIS arm accept these bytes. # python3 + vk.xml section 4. The registry is parsed, not stat'd -- a file # cut short is a parse error -- and its set and # tallies are read out of it. # cmake, at build time section 6. There is no cmake on this image, so the # recipe runs a real find_package() against the tree it # is about to package and leaves the verdict in # /usr/share/vulkan-headers/CMAKE-STATE. # the C++ compiler, section 7 again. Most of what the probe asserts is # at build time static_assert, so it failed or passed at `bitbake # vulkan-headers` rather than here. That is deliberate: # Vulkan's type layout is NOT arch-invariant, and wasm32 # takes the ILP32 branch upstream's CI does not build. # # Section 8 then compares those routes to EACH OTHER. Those cases are the point # of the file: every pinned number in sections 2-7 is a dated snapshot of # SRCREV 217e93c6 and moves when the package is bumped, but the agreements hold # at any revision, and they are what catches a tree that installed partially or # was regenerated from a different registry than its siblings. # # THE VERSION NUMBERS AGREE HERE, which is worth saying because the sibling port # on this image is the counter-example. spirv-headers carries three versions # none of which equals another, and 57-spirv-headers.test had to decline the # equality its ticket asked for. vulkan-headers is the opposite case: # # 1.3.275.0 the recipe's PV -- the Vulkan SDK release tag sdk-1.3.275.0 # 275 VK_HEADER_VERSION in vulkan_core.h, and # VK_HEADER_VERSION_COMPLETE decomposes to variant 0, 1.3.275 # 1.3.275 PACKAGE_VERSION in VulkanHeadersConfigVersion.cmake -- which # upstream GENERATES by reading those macros rather than # hardcoding, so the config cannot drift from the header # 1.3.275 "api version" in validusage.json, the registry's own account # # One number in four places, and the ticket's ask -- that vulkan_core.h's # VK_HEADER_VERSION matches the recipe's PV -- is therefore a true equality that # this suite asserts rather than works around. # # Not a brintOS defect anywhere in this port: vulkan-headers is headers and # data, it needed no patch, and the only BRINTOS-WORKAROUND marker in its recipe # is the one every probe on this layer carries for the guest's exec-image # segment cap. Nothing is filed against KhronosGroup/Vulkan-Headers, per # docs/conventions/no-public-upstream-reports.md. # # Fork discipline (the lesson 81-cjson paid for): the per-suite bound is a budget # in PROCESS SPAWNS, not in cases. vk.xml is parsed by ONE python3 invocation # that emits every number section 4 and section 8 use; the header macros come # from ONE grep; the file counts come from globs, which fork nothing; the probe # runs ONCE. Every case is then a fork-free `case` glob or string compare against # those captures. Do not add a per-case grep or a per-file python3. # # validusage.json is 9.3 MB and is deliberately NOT given to jq. Its version # block is the first 300 bytes of the file, and a bounded read of those is the # whole of what this suite needs from it -- where jq would build the entire # document in a guest that is short of memory to begin with. inc=/usr/include vinc=$inc/vulkan vvinc=$inc/vk_video reg=/usr/share/vulkan/registry cm=/usr/share/cmake/VulkanHeaders state=/usr/share/vulkan-headers/CMAKE-STATE probe=/usr/libexec/vulkan-headers-tests/vulkan-headers-probe data_reg=$BST_DATA/vulkan-headers-registry.py # has -- ok iff contains the literal . # eq -- ok iff the two strings are equal (check_eq's # argument order is ; this # wrapper takes them the way the cases read). # nonempty -- ok iff is a non-empty regular file. has() { case "$3" in *"$2"*) bst_ok "$1" ;; *) bst_notok "$1" "not found: $2" ;; esac; } eq() { check_eq "$1" "$3" "$2"; } nonempty() { if [ -s "$2" ]; then bst_ok "$1"; else bst_notok "$1" "absent or empty: $2"; fi; } # --------------------------------------------------------------------------- # 1. The payload, counted rather than listed. # # The counts ARE the assertion: a partial install drops files, and naming 57 of # them one stat() at a time would cost 57 forks to say the same thing less well. # The three trees are counted separately because they move independently -- a # version bump moves vulkan/ and the registry and leaves vk_video/ alone, and a # single total would hide which moved. if [ -d "$vinc" ]; then bst_ok vulkan-headers/include-dir else bst_notok vulkan-headers/include-dir "absent: $vinc"; fi if [ -d "$vvinc" ]; then bst_ok vulkan-headers/vk-video-dir else bst_notok vulkan-headers/vk-video-dir "absent: $vvinc"; fi if [ -d "$reg" ]; then bst_ok vulkan-headers/registry-dir else bst_notok vulkan-headers/registry-dir "absent: $reg"; fi if [ -d "$cm" ]; then bst_ok vulkan-headers/cmake-dir else bst_notok vulkan-headers/cmake-dir "absent: $cm"; fi set -- "$vinc"/*; nvk=$# set -- "$vvinc"/*; nvv=$# set -- "$reg"/*; nreg=$# set -- "$reg"/*/*; nregsub=$# set -- "$reg"/*.py; nregpy=$# set -- "$cm"/*; ncm=$# eq vulkan-headers/file-count-vulkan "$nvk" 35 eq vulkan-headers/file-count-vk-video "$nvv" 7 eq vulkan-headers/file-count-registry "$nreg" 12 eq vulkan-headers/file-count-registry-sub "$nregsub" 3 eq vulkan-headers/file-count-registry-py "$nregpy" 7 eq vulkan-headers/file-count-cmake "$ncm" 2 # The five files a consumer actually names, and the two the registry is for. nonempty vulkan-headers/header-entry "$vinc/vulkan.h" nonempty vulkan-headers/header-core "$vinc/vulkan_core.h" nonempty vulkan-headers/header-cpp "$vinc/vulkan.hpp" nonempty vulkan-headers/header-format-traits "$vinc/vulkan_format_traits.hpp" nonempty vulkan-headers/header-ext-inspection "$vinc/vulkan_extension_inspection.hpp" nonempty vulkan-headers/header-platform "$vinc/vk_platform.h" nonempty vulkan-headers/header-h264 "$vvinc/vulkan_video_codec_h264std.h" nonempty vulkan-headers/header-h265 "$vvinc/vulkan_video_codec_h265std.h" nonempty vulkan-headers/registry-vk-xml "$reg/vk.xml" nonempty vulkan-headers/registry-video-xml "$reg/video.xml" nonempty vulkan-headers/registry-validusage "$reg/validusage.json" nonempty vulkan-headers/registry-profile "$reg/profiles/VP_KHR_roadmap_2022.json" nonempty vulkan-headers/cmake-config "$cm/VulkanHeadersConfig.cmake" nonempty vulkan-headers/cmake-version-file "$cm/VulkanHeadersConfigVersion.cmake" nonempty vulkan-headers/cmake-state "$state" # Header-only: there is no library to link, and a stray one would mean something # built a Vulkan loader behind the port's back. vulkan-loader is a SEPARATE poky # recipe and is not on this image; nothing here would work if it were, because # there is no ICD for it to load. if [ -e /usr/lib/libvulkan.so ] || [ -e /usr/lib/libvulkan.a ]; then bst_notok vulkan-headers/no-library "unexpected libvulkan on a headers-only package" else bst_ok vulkan-headers/no-library; fi # No .pc either -- upstream ships a CMake package and nothing else, unlike # spirv-headers which ships both. Pinned so a future bump that adds one is a # changed answer rather than an unnoticed new integration surface. if [ -e /usr/share/pkgconfig/vulkan.pc ] || [ -e /usr/lib/pkgconfig/vulkan.pc ]; then bst_notok vulkan-headers/no-pkgconfig "unexpected vulkan.pc; upstream ships only a CMake package" else bst_ok vulkan-headers/no-pkgconfig; fi # --------------------------------------------------------------------------- # 2. The version, as vulkan_core.h states it. ONE grep supplies every case here. # # VK_HEADER_VERSION is the number the whole package is identified by: upstream's # CMakeLists reads it out of this file to compute the CMake package version, and # validusage.json restates it. Section 8 checks those three against each other. vmarks=$(grep -E '^#define (VK_HEADER_VERSION|VK_HEADER_VERSION_COMPLETE|VK_API_VERSION_1_[0-3]|VK_MAKE_API_VERSION|VK_API_VERSION_MAJOR) ' \ "$vinc/vulkan_core.h" 2>/dev/null) has vulkan-headers/version-macro '#define VK_HEADER_VERSION 275' "$vmarks" has vulkan-headers/version-complete \ '#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION)' "$vmarks" has vulkan-headers/core-1-0 '#define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)' "$vmarks" has vulkan-headers/core-1-1 '#define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0)' "$vmarks" has vulkan-headers/core-1-2 '#define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0)' "$vmarks" has vulkan-headers/core-1-3 '#define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0)' "$vmarks" # The extracted number, for the cross-source comparisons in section 8. h_ver=${vmarks##*"#define VK_HEADER_VERSION "} h_ver=${h_ver%%"$_BST_NL"*} case "$h_ver" in *[!0-9]*) h_ver='' ;; esac # --------------------------------------------------------------------------- # 3. The C++ binding is present and is what it claims to be. # # vulkan.hpp is 35 000 lines generated from the same registry as the C header. # The probe is what proves the two agree; these cases only pin that the file is # the C++ binding rather than, say, a stub, and that the namespace and the # version constant a consumer reaches for are in it. cppmarks=$(grep -E '^ VULKAN_HPP_CONSTEXPR_INLINE uint32_t HeaderVersion|^#define VULKAN_HPP_NAMESPACE |^namespace VULKAN_HPP_NAMESPACE' \ "$vinc/vulkan.hpp" 2>/dev/null) has vulkan-headers/cpp-namespace 'namespace VULKAN_HPP_NAMESPACE' "$cppmarks" has vulkan-headers/cpp-version 'HeaderVersion = VK_HEADER_VERSION' "$cppmarks" # --------------------------------------------------------------------------- # 4. vk.xml, PARSED. # # The ticket asks that "vk.xml parses and its set covers the core # versions the headers declare". Parsing it is the assertion no `test -s` can # make: a file cut short is a parse error here. The payload streams it with # iterparse rather than building a whole tree, because 2.4 MB of XML is tens of # MB of Python objects on a guest that refuses a large exec image to begin with. # # The payload is passed the tree's vk.xml as an ARGUMENT, never redirected from # the rootfs: a top-level redirect out of the virtiofs root is how a suite ends # early while reporting a clean pass (brintos/linux#73). x_feat=''; x_dev=''; x_inst='' if command -v python3 >/dev/null 2>&1; then if [ -f "$data_reg" ]; then bst_ok vulkan-headers/registry-payload-staged else bst_notok vulkan-headers/registry-payload-staged "absent: $data_reg"; fi vkxml=$(python3 "$data_reg" "$reg/vk.xml" 2>&1) vidxml=$(python3 "$data_reg" "$reg/video.xml" 2>&1) # The whole summary compared at once: a single changed number is then reported # with the want/got pair beside it, which is what makes it diagnosable from # the console dump. eq vulkan-headers/vk-xml-summary "$vkxml" \ "VKXML features=VK_VERSION_1_0:1.0,VK_VERSION_1_1:1.1,VK_VERSION_1_2:1.2,VK_VERSION_1_3:1.3 exts=297/25 commands=704 types=2007 enums=270" # video.xml is the registry for the vk_video/ headers and is parsed by the # same payload. It declares no and no the filter keeps # (its extensions carry no `supported` attribute at all), which is a property # of that registry rather than of this install. eq vulkan-headers/video-xml-summary "$vidxml" \ "VKXML features= exts=0/0 commands=0 types=92 enums=20" # The registry's eight Python modules are why the stock poky recipe carries # RDEPENDS:${PN} += "python3-core". Byte-compiling them is the cheapest # statement that the interpreter which ships can actually read what shipped -- # a listing cannot tell a valid module from a truncated one. # cfile= into a scratch directory, never the default: py_compile writes the # .pyc beside its source, and this rootfs is read-only at run time -- the # default would fail for a reason that says nothing about the module. pyc=$(python3 -c ' import os, sys, tempfile, py_compile d = tempfile.mkdtemp() n = 0 for f in sys.argv[1:]: py_compile.compile(f, cfile=os.path.join(d, os.path.basename(f) + "c"), doraise=True) n += 1 print(n) ' "$reg"/*.py "$reg"/spec_tools/*.py 2>&1) pyrc=$? if [ "$pyrc" -ne 0 ] && bst_execfail "$pyc"; then bst_unrun vulkan-headers/registry-py-compiles "$pyc" else # The COUNT, not just the exit status: nine modules ship, and a run that # compiled fewer of them would exit 0 having said less than it appears to. eq vulkan-headers/registry-py-compiles "$pyc" 9 fi case "$vkxml" in VKXML*) x_feat=${vkxml##*features=}; x_feat=${x_feat%% *} x_dev=${vkxml##*exts=}; x_dev=${x_dev%% *} x_inst=${x_dev##*/} x_dev=${x_dev%%/*} ;; esac else for c in registry-payload-staged vk-xml-summary video-xml-summary registry-py-compiles; do bst_skip "vulkan-headers/$c" "python3 not installed on this image" done fi # --------------------------------------------------------------------------- # 5. validusage.json, read within a bound. # # 9.3 MB. Its version block is the first 300 bytes and is the only part this # suite needs, so it is read with head(1) rather than parsed -- jq would build # the whole document. The api version here is the registry's own account of what # it describes, and section 8 checks it against the header macro. vuhead=$(head -c 300 "$reg/validusage.json" 2>&1) has vulkan-headers/validusage-schema '"schema version": 2' "$vuhead" has vulkan-headers/validusage-api '"api version": "1.3.275"' "$vuhead" vu_api='' case "$vuhead" in *'"api version": "'*) vu_api=${vuhead##*'"api version": "'} vu_api=${vu_api%%'"'*} ;; esac # --------------------------------------------------------------------------- # 6. The integration surface -- what a consumer actually resolves through. # # Both halves are here on purpose. The string cases read the shipped files; the # CMAKE-STATE cases read the verdict of a REAL find_package() run at build time # against the tree that was packaged. A config that parses, names the right # target and still fails to resolve would pass every string case and fail the # first consumer, and there is no cmake on this image to catch that here. cmtext=$(cat "$cm/VulkanHeadersConfig.cmake" "$cm/VulkanHeadersConfigVersion.cmake" 2>/dev/null) has vulkan-headers/cmake-target 'add_library(Vulkan::Headers INTERFACE IMPORTED)' "$cmtext" has vulkan-headers/cmake-interface 'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"' "$cmtext" has vulkan-headers/cmake-version 'set(PACKAGE_VERSION "1.3.275")' "$cmtext" has vulkan-headers/cmake-compat 'PACKAGE_VERSION_COMPATIBLE' "$cmtext" # The config computes its prefix by walking up from its own location -- four # get_filename_component steps from share/cmake/VulkanHeaders -- so the number of # steps and the file's own directory have to match. Pinned because an install # that moved the config one level would still produce an EXISTING path, just the # wrong one, which is the failure a bare `test -d` cannot see. has vulkan-headers/cmake-prefix-walk \ 'get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)' "$cmtext" sttext=$(cat "$state" 2>/dev/null) has vulkan-headers/cmake-control-ran 'vulkan-headers-cmake-control:' "$sttext" has vulkan-headers/cmake-control-resolved 'RESOLVED' "$sttext" has vulkan-headers/cmake-control-version 'version=1.3.275' "$sttext" # `rel=include` is the whole point of the control: it is what the four-step # prefix walk produced when a real find_package() resolved this package, # expressed relative to the prefix so it is the same string in every build. has vulkan-headers/cmake-control-rel 'rel=include' "$sttext" cm_ver='' case "$sttext" in *version=*) cm_ver=${sttext##*version=}; cm_ver=${cm_ver%% *} ;; esac # --------------------------------------------------------------------------- # 7. The compiled probe -- the only part of this suite that is not about bytes. # # It was built by the distro's C++ driver from the shipped headers in the same # build that installed them, so it is the answer to "did a compiler on this arm # ever accept these". It is run ONCE and every case below is a fork-free match # against that one output. # # MOST OF WHAT IT ASSERTS ALREADY PASSED AT BUILD TIME. Its 56 static_asserts -- # the ILP32 handle layout, the VkApplicationInfo offsets, the C-vs-C++ enum # pairs -- are compile-time, so `bitbake vulkan-headers` is what checked them and # a wrong answer could not have produced this binary at all. The lines below are # the run-time half: the two generated tables that COMPUTE. # # The payload arrives non-executable (do_install ships it 0755 but the rootfs is # read-only at runtime), so it is copied to the writable /tmp tmpfs and given the # bit there. if [ -f "$probe" ]; then bst_ok vulkan-headers/probe-installed else bst_notok vulkan-headers/probe-installed "absent: $probe"; fi tmp=${TMPDIR:-/tmp} pcopy=$tmp/bst-vulkan-headers-probe.$$ pout='' if cp "$probe" "$pcopy" 2>/dev/null && chmod +x "$pcopy" 2>/dev/null; then pout=$("$pcopy" 2>&1); prc=$? if bst_execfail "$pout"; then bst_unrun vulkan-headers/probe-run "$pout" elif [ "$prc" -eq 0 ]; then bst_ok vulkan-headers/probe-run else bst_notok vulkan-headers/probe-run "rc=$prc $(_bst_1line "$pout")" fi else bst_notok vulkan-headers/probe-stage "cannot stage $probe at $pcopy" pout='' fi rm -f "$pcopy" has vulkan-headers/probe-all-ok 'ALL-VULKAN-HEADERS-OK' "$pout" # Every case the probe emits, counted. A probe killed part-way through prints a # PREFIX of the OK lines and no ALL-VULKAN-HEADERS-OK -- but each individual # `has` below would still pass on whichever ones survived, so a short run would # read as a mostly-green section. The count is what makes it visible. 25 is the # number a run printed, not one read off the source: 57-spirv-headers.test went # red against an entirely correct probe because that number had been counted by # eye. It is the probe's 24 findings plus the VKH-cases line it ends with, which # is checked separately below so the two cannot drift apart unnoticed. nprobe=$(printf '%s\n' "$pout" | grep -c '^VKH-') eq vulkan-headers/probe-case-count "$nprobe" 25 has vulkan-headers/probe-self-count 'VKH-cases 24' "$pout" case "$pout" in *FAIL*) bst_notok vulkan-headers/probe-no-fail "$(_bst_1line "$pout")" ;; *) bst_ok vulkan-headers/probe-no-fail ;; esac has vulkan-headers/probe-header-version 'VKH-header-version OK 275' "$pout" has vulkan-headers/probe-api-complete 'VKH-api-complete OK 1.3.275' "$pout" has vulkan-headers/probe-api-variant 'VKH-api-variant OK 0' "$pout" has vulkan-headers/probe-static-pairs 'VKH-static-pairs OK 56' "$pout" has vulkan-headers/probe-cpp-version 'VKH-cpp-header-version OK 275' "$pout" # The three arch-dependent answers, pinned to the values wasm32 gives. On x86-64 # the same source prints `1`, `8 8` and `48` -- these three lines are the whole # of what an ILP32 target changes about Vulkan's ABI, and they are the reason the # probe exists on this arm rather than being taken on trust from upstream's CI. has vulkan-headers/probe-ptr-defines 'VKH-ptr-defines OK 0' "$pout" has vulkan-headers/probe-handle-sizes 'VKH-handle-sizes OK 4 8' "$pout" has vulkan-headers/probe-appinfo-size 'VKH-appinfo-size OK 28' "$pout" # vulkan_format_traits.hpp walked over the whole contiguous core range, # VK_FORMAT_UNDEFINED+1 .. VK_FORMAT_ASTC_12x12_SRGB_BLOCK. The tallies move if # any arm of the generated switch changes; the four named cases say which. has vulkan-headers/probe-format-known 'VKH-format-known OK 184' "$pout" has vulkan-headers/probe-format-compressed 'VKH-format-compressed OK 54' "$pout" has vulkan-headers/probe-format-blocksum 'VKH-format-blocksize-sum OK 1509' "$pout" has vulkan-headers/probe-format-texelsum 'VKH-format-texel-sum OK 2212' "$pout" has vulkan-headers/probe-format-compsum 'VKH-format-component-sum OK 559' "$pout" has vulkan-headers/probe-format-rgba8 'VKH-format-rgba8 OK 4 1 4' "$pout" has vulkan-headers/probe-format-bc1 'VKH-format-bc1 OK 8 16' "$pout" has vulkan-headers/probe-format-astc12 'VKH-format-astc12 OK 16 144' "$pout" has vulkan-headers/probe-format-undefined 'VKH-format-undefined OK 0' "$pout" has vulkan-headers/probe-ext-known 'VKH-ext-known OK swapchain device, surface instance' "$pout" has vulkan-headers/probe-ext-promoted 'VKH-ext-promoted OK VK_VERSION_1_1' "$pout" has vulkan-headers/probe-to-string 'VKH-to-string OK Success R8G8B8A8Unorm' "$pout" has vulkan-headers/probe-video-spec 'VKH-video-spec OK 4194304 4194304' "$pout" has vulkan-headers/probe-video-sizes 'VKH-video-scaling-sizes OK 484 1000' "$pout" # The two extension tallies the probe read out of the C++ binding, kept for # section 8. $_BST_NL is bst.sh's own newline constant -- the cut has to be at # the end of the line, and a literal newline inside a ${..%%..} pattern is the # kind of thing that survives one shell and not the next. probe_field() { case "$pout" in *"$1"*) _pf=${pout##*"$1"}; printf '%s' "${_pf%%"$_BST_NL"*}" ;; *) printf '' ;; esac } p_dev=$(probe_field 'VKH-ext-device OK ') p_inst=$(probe_field 'VKH-ext-instance OK ') p_hver=$(probe_field 'VKH-header-version OK ') # --------------------------------------------------------------------------- # 8. The four sources compared to EACH OTHER. # # This is what the file is for. Every number above is pinned to a constant, so # every one of those cases is a dated snapshot of SRCREV 217e93c6 and goes red # the day the package is bumped -- correctly, but for a reason that says nothing # about whether the install is sound. These cases say the header macro, the # generated CMake package version, the registry's own api version and the C++ # binding's extension tables all agree, and they hold at ANY revision. # # The extension comparison is the strongest of them. vk.xml and # vulkan_extension_inspection.hpp are generated from one source by one tool, and # the payload filters vk.xml the way the probe's translation unit is compiled -- # supported="vulkan", no platform attribute, not provisional, because the probe # defines no VK_USE_PLATFORM_* and no VK_ENABLE_BETA_EXTENSIONS. A disagreement # is invisible in either file alone. if [ -n "$x_dev" ] && [ -n "$p_dev" ]; then eq vulkan-headers/agree-ext-device "$p_dev" "$x_dev" else bst_skip vulkan-headers/agree-ext-device "registry or probe summary unavailable" fi if [ -n "$x_inst" ] && [ -n "$p_inst" ]; then eq vulkan-headers/agree-ext-instance "$p_inst" "$x_inst" else bst_skip vulkan-headers/agree-ext-instance "registry or probe summary unavailable" fi if [ -n "$h_ver" ] && [ -n "$p_hver" ]; then eq vulkan-headers/agree-version-header-probe "$p_hver" "$h_ver" else bst_skip vulkan-headers/agree-version-header-probe "header or probe version unavailable" fi # The CMake package version and the registry's api version are `1.3.` # where the header macro is the bare patch. Comparing the composed string is the # assertion: upstream generates the first from the header and the second from # the same registry the header is generated from, so all three moving together # is the property, and any one of them moving alone is the failure. if [ -n "$h_ver" ] && [ -n "$cm_ver" ]; then eq vulkan-headers/agree-version-header-cmake "$cm_ver" "1.3.$h_ver" else bst_skip vulkan-headers/agree-version-header-cmake "header or cmake-state version unavailable" fi if [ -n "$h_ver" ] && [ -n "$vu_api" ]; then eq vulkan-headers/agree-version-header-validusage "$vu_api" "1.3.$h_ver" else bst_skip vulkan-headers/agree-version-header-validusage "header or validusage version unavailable" fi # The core versions the headers declare, against vk.xml's set. This is # the ticket's "its set covers the core versions the headers declare", # stated as the agreement it is rather than as two independent constants: the # headers declare VK_API_VERSION_1_0 through 1_3 (section 2) and the registry # declares VK_VERSION_1_0 through 1_3 for api="vulkan" (section 4). if [ -n "$x_feat" ]; then eq vulkan-headers/agree-core-versions "$x_feat" \ "VK_VERSION_1_0:1.0,VK_VERSION_1_1:1.1,VK_VERSION_1_2:1.2,VK_VERSION_1_3:1.3" else bst_skip vulkan-headers/agree-core-versions "registry summary unavailable" fi # --------------------------------------------------------------------------- # 9. What is NOT covered, recorded as skips rather than omitted. # # Listed by name so a run states its own gap: a reader counting the passes above # should not conclude that more was exercised than was. bst_skip vulkan-headers/vulkan-device \ "no ICD, no driver and no GPU behind this guest; the port's deliverable is the build-time surface, not a rendering one" bst_skip vulkan-headers/loader \ "vulkan-loader is a separate poky recipe and is not on this image; with no ICD it would have nothing to load" bst_skip vulkan-headers/consumer-compile-on-target \ "no C or C++ compiler on this image; the recipe's build-time probe (section 7) is what compiles the headers" bst_skip vulkan-headers/find-package-on-target \ "no cmake on this image; the recipe's build-time find_package control (section 6, CMAKE-STATE) is what resolves the package" bst_skip vulkan-headers/validusage-body \ "validusage.json is 9.3 MB and its 1664 validation entries are not parsed here; only its version block is read" bst_skip vulkan-headers/registry-generators-run \ "the registry's Python generators regenerate the headers from vk.xml; they are byte-compiled here but not run, which would need the full spec toolchain"