build: remove libvulkan buildtime dependency

This commit is contained in:
chyyran 2024-02-07 23:12:08 -05:00 committed by Ronny Chan
parent 91794dd353
commit b796494cc6
8 changed files with 6 additions and 15 deletions

View file

@ -34,7 +34,7 @@ jobs:
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted" | sudo tee -a /etc/apt/sources.list
sudo apt-get update || true
sudo apt-get -y install libvulkan-dev:arm64 g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
sudo apt-get -y install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Build dynamic library
run: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc cargo run -p librashader-build-script -- --profile ${{ matrix.profile }} --target aarch64-unknown-linux-gnu
- name: Upload build artifacts

View file

@ -26,11 +26,6 @@ jobs:
with:
toolchain: nightly
override: true
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: latest
cache: true
- name: Build dynamic library
run: cargo run -p librashader-build-script -- --profile ${{ matrix.profile }}
- name: Upload build artifacts

View file

@ -91,10 +91,6 @@ static GL_DEFAULT_MVP: &[f32; 16] = &[
### Building
librashader requires the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/).
---
For Rust projects, simply add the crate to your `Cargo.toml`.
```
@ -110,6 +106,9 @@ cargo run -p librashader-build-script -- --profile optimized
This will output a `librashader.dll` or `librashader.so` in the target folder. Profile can be `debug`, `release`, or
`optimized` for full LTO.
While librashader has no build-time dependencies, using `librashader_ld.h` may require headers from
the relevant runtime graphics API.
### Writing a librashader Runtime
If you wish to contribute a runtime implementation not already available, see the [librashader-runtime](https://docs.rs/librashader-runtime/latest/librashader_runtime/)

View file

@ -25,7 +25,7 @@ spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
rustc-hash = "1.1.0"
bytemuck = "1.12.3"
thiserror = "1.0.37"
ash = { version = "0.37.1+1.3.235", features = ["linked", "debug"] }
ash = { version = "0.37.1+1.3.235", features = ["debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = ["vulkan"] }
parking_lot = "0.12.1"
rayon = "1.6.1"

View file

@ -11,7 +11,6 @@ License: MPL-2.0
URL: https://github.com/SnowflakePowered/%{name}
%undefine _disable_source_fetch
Source: {{{ git_dir_pack }}}
BuildRequires: pkgconfig(vulkan)
BuildRequires: gcc
BuildRequires: git
BuildRequires: g++

View file

@ -6,5 +6,5 @@ includedir=${exec_prefix}/include
Name: librashader
Description: RetroArch shaders for all
Version: 0.2.0
Libs: -L${libdir} -lvulkan -lrashader
Libs: -L${libdir} -lrashader
Cflags: -I${includedir}

View file

@ -11,7 +11,6 @@ License: MPL-2.0
URL: https://github.com/SnowflakePowered/%{name}
%undefine _disable_source_fetch
Source: https://github.com/SnowflakePowered/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
BuildRequires: pkgconfig(vulkan)
BuildRequires: gcc
BuildRequires: g++
BuildRequires: ninja-build

View file

@ -9,7 +9,6 @@ URL: https://github.com/SnowflakePowered/%{name}
Source0: librashader-%{version}.tar.xz
Source1: vendor.tar.xz
Source2: cargo_config
BuildRequires: pkgconfig(vulkan)
BuildRequires: ninja-build
BuildRequires: patchelf
BuildRequires: gcc