me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Package SPIR-V Tools from the Vulkan SDK sources

diviocity committed 5 days ago · ad0c57003bafe6be20e89219e929ea84518b075c View patch
Unverified signature 3 files changed +42 -0
spirv-tools/PKGBUILD.vile new file +30 -0

@@ -0,0 +1,30 @@

1+defpkgbuild(spirv-tools,

2+ #:pkgname, "spirv-tools",

3+ #:pkgver, "1.3.296.0",

4+ #:pkgrel, 1,

5+ #:pkgdesc, "SPIR-V assembler, validator, disassembler and optimization libraries",

6+ #:arch, [#:x86-64, #:aarch64],

7+ #:url, "https://github.com/KhronosGroup/SPIRV-Tools",

8+ #:license, "Apache-2.0",

9+ #:depends, ["musl", "gcc-libs", "spirv-headers"],

10+ #:source, ["spirv-tools-1.3.296.0.tar.gz::https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz",

11+ "fragment.spvasm"],

12+ #:sha256sums, ["75aafdf7e731b4b6bfb36a590ddfbb38ebc605d80487f38254da24fe0cb95837",

13+ "c105c6d8db9a43cc0764f5513c83546c46e34da82627afab441334dd2caa7ef0"],

14+ #:build, fn() {

15+ root := get-environment-variable("VPAC_MAKEPKG_ROOT")

16+ run("vinix-cmake", "SPIRV-Tools-vulkan-sdk-1.3.296.0", "build", "-DCMAKE_BUILD_TYPE=MinSizeRel",

17+ "-DBUILD_SHARED_LIBS=ON", "-DSPIRV_WERROR=OFF", "-DSPIRV_SKIP_TESTS=ON",

18+ "-DSPIRV_TOOLS_BUILD_STATIC=OFF", string-append("-DSPIRV-Headers_SOURCE_DIR=", root, "/usr"))

19+ run("vinix-ninja", "build", "all")

20+ },

21+ #:check, fn() {

22+ run("vinix-run", "--library-path", "build/source", "build/tools/spirv-as", "--target-env", "vulkan1.0", "fragment.spvasm", "-o", "fragment.spv")

23+ run("vinix-run", "--library-path", "build/source", "build/tools/spirv-val", "--target-env", "vulkan1.0", "fragment.spv")

24+ run("vinix-run", "--library-path", "build/source", "build/tools/spirv-dis", "fragment.spv", "-o", "disassembled.spvasm")

25+ run("grep", "-Fq", "OpEntryPoint Fragment", "disassembled.spvasm")

26+ },

27+ #:package, fn() {

28+ run("env", string-append("DESTDIR=", pkgdir()), "cmake", "--install", "build")

29+ run("install", "-Dm644", "SPIRV-Tools-vulkan-sdk-1.3.296.0/LICENSE", string-append(pkgdir(), "/usr/share/licenses/spirv-tools/LICENSE"))

30+ })

spirv-tools/fragment.spvasm new file +10 -0

@@ -0,0 +1,10 @@

1+OpCapability Shader

2+OpMemoryModel Logical GLSL450

3+OpEntryPoint Fragment %main "main"

4+OpExecutionMode %main OriginUpperLeft

5+%void = OpTypeVoid

6+%function = OpTypeFunction %void

7+%main = OpFunction %void None %function

8+%entry = OpLabel

9+OpReturn

10+OpFunctionEnd

tests/x11/README.md +2 -0

@@ -29,6 +29,8 @@ v run tests/x11/release-elf.v "$release_assets" "$reference_apks" "$new_output"

2929

3030## Signed packages in a Vinix guest

3131

32+The x86_64 SPIR-V Tools port assembled, validated and disassembled a Vulkan fragment shader during the build. A clean signed install audited four packages, 371 owned paths and 26 target ELFs, and the installed assembler reported SPIR-V 1.6 support. The archive `spirv-tools-1.3.296.0-1-x86_64.pkg.tar.zst` has SHA-256 `ed3f6e35fc1afc58617c768742ebd27c7d4e5baffcc877271fc03f32fbf61296`. See `xorg/spirv-tools-x86_64-01`, receipt SHA-256 `163e2feb20c2c3a547c381f4d38dd142ff3b868d4fde450a38851f3b6d76bba2`.

33+

3234The AArch64 source queue built `xvfb-21.1.16-2-aarch64.pkg.tar.zst` against a signed 31-package SDK with the target font index. The archive passed the 16 KiB ELF page audit and has SHA-256 `90dcce49c2c908a4118ab6211bfc687accf515a41095f87b669a2de81df84bdc`. The queue receipt is `xorg/arm/abi16/source-queue-01/receipts-06.sha256`, SHA-256 `20a5e0b48886e4697abc8752a7b78318aa06c8eda2ba0c9bf7ff30e09328f7dc`.

3335

3436The AArch64 guest booted a fresh 40-package signed root with that Xvfb archive. `tests/x11/headless.sh` used `client.v` to read back a pixel, loaded and queried an X resource with xrdb, and verified Xvfb refused a client without the cookie. See `xorg/arm/abi16/guest-xvfb-02`, receipt SHA-256 `19d8b95839fa53ed8ae58aa2516635a6da1caa106833d084571da913cca26089`. The ext2 image and firmware variables have checksum-verified compressed copies and restoration metadata in `foundation/archived-arm-xvfb-guest-assets-01`, receipt SHA-256 `5e1d06fa28d11e32cf08d00ab8140395139556cad9f6179e713851a14f0f7c5b`.