Compare commits

..

13 commits

Author SHA1 Message Date
Alex Janka 2d0dd5909d fix double free 2024-01-25 09:38:23 +11:00
Alex Janka 03546153ff shaders can be either a path or a string 2024-01-25 09:38:23 +11:00
chyyran fa3b6bf5fc chore: Release 2023-11-30 02:11:33 -05:00
chyyran ee0587310c chore: Release 2023-11-30 02:07:12 -05:00
chyyran 2bd6f8f80f build: prefer static linking of shaderc 2023-11-30 02:03:43 -05:00
chyyran d17503be71 build: unify ash version 2023-11-30 02:03:43 -05:00
chyyran 2be2178502 build: allow aarch64-linux-unknown-gnu build of librashader-capi 2023-11-29 03:26:58 -05:00
chyyran f4bdf160ab build: only build dxil on windows 2023-11-29 03:26:58 -05:00
chyyran c0a1b56f4e build: use build deps for linux 2023-11-29 03:26:58 -05:00
chyyran 43c0f3d676 build: fix python 3.11 2023-11-29 03:26:58 -05:00
chyyran 25bf4904e1 build: use install-vulkan-sdk 2023-11-29 03:26:58 -05:00
chyyran 7ce02014d4 build: upgrade python first 2023-11-29 03:26:58 -05:00
chyyran 6e071138dc build: update spirv-to-dxil-sys to reduce mesa build reqs 2023-11-29 03:26:58 -05:00
22 changed files with 568 additions and 573 deletions

47
.github/workflows/build-linux-arm64.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: build librashader-capi for ARM64 Linux
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "0 0 * * 6"
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
profile: ['debug', 'release', 'optimized']
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nightly Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
override: true
target: aarch64-unknown-linux-gnu
- uses: actions/setup-python@v1
name: Setup Python 3.11
with:
python-version: '3.11.6'
- name: Install ARM64 cross-compilation dependencies
continue-on-error: true
run: |
sudo dpkg --add-architecture arm64
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
- 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
uses: actions/upload-artifact@v3.1.2
with:
name: ${{ format('build-outputs-aarch64-unknown-linux-gnu-{0}', matrix.profile) }}
path: ${{ format('target/aarch64-unknown-linux-gnu/{0}/librashader.*', matrix.profile) }}

View file

@ -1,4 +1,4 @@
name: build librashader-capi name: build librashader-capi for x86_64
on: on:
push: push:
@ -26,21 +26,18 @@ jobs:
with: with:
toolchain: nightly toolchain: nightly
override: true override: true
- name: Setup Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Cross, SPIRV-Headers, SPIRV-Reflect, SPIRV-Tools, Glslang
vulkan-use-cache: true
- uses: actions/setup-python@v1 - uses: actions/setup-python@v1
name: Setup Python name: Setup Python 3.11
with: with:
python-version: '3.x' python-version: '3.11.6'
- run: pip install meson ninja mako - name: Install Vulkan SDK
name: Install Meson for spirv-to-dxil-sys uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: latest
cache: true
- if: runner.os == 'Windows' - if: runner.os == 'Windows'
name: Install winflexbison run: pip install meson ninja mako
run: choco install winflexbison3 name: Install Meson for spirv-to-dxil-sys
- name: Build dynamic library - name: Build dynamic library
run: cargo run -p librashader-build-script -- --profile ${{ matrix.profile }} run: cargo run -p librashader-build-script -- --profile ${{ matrix.profile }}
- name: Upload build artifacts - name: Upload build artifacts

View file

@ -2,7 +2,6 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" /> <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/test/shaders_slang" vcs="Git" /> <mapping directory="$PROJECT_DIR$/test/shaders_slang" vcs="Git" />
</component> </component>
</project> </project>

834
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -90,13 +90,15 @@ static GL_DEFAULT_MVP: &[f32; 16] = &[
librashader requires the following build time dependencies librashader requires the following build time dependencies
* The [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) * The [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/)
* [Meson](https://mesonbuild.com/)
* [CMake 3.8 or later](https://cmake.org/) * [CMake 3.8 or later](https://cmake.org/)
For DXIL support on Windows, the following is also needed
* [Meson](https://mesonbuild.com/)
* [Python 3.6 or later](https://www.python.org/) * [Python 3.6 or later](https://www.python.org/)
--- ---
For Rust projects, simply add the crate to your `Cargo.toml`. For Rust projects, simply add the crate tofil your `Cargo.toml`.
``` ```
cargo add librashader cargo add librashader

View file

@ -10,6 +10,8 @@ use std::{env, fs};
struct Args { struct Args {
#[arg(long, default_value = "debug", global = true)] #[arg(long, default_value = "debug", global = true)]
profile: String, profile: String,
#[arg(long, global = true)]
target: Option<String>,
} }
pub fn main() { pub fn main() {
@ -32,12 +34,26 @@ pub fn main() {
"--profile={}", "--profile={}",
if profile == "debug" { "dev" } else { &profile } if profile == "debug" { "dev" } else { &profile }
)); ));
if let Some(target) = &args.target {
cmd.arg(format!(
"--target={}",
&target
));
}
Some(cmd.status().expect("Failed to build librashader-capi")); Some(cmd.status().expect("Failed to build librashader-capi"));
let output_dir = PathBuf::from(format!("target/{}", profile)) let mut output_dir = PathBuf::from(format!("target/{}", profile));
if let Some(target) = &args.target {
output_dir = PathBuf::from(format!("target/{}/{}", target, profile));
}
let output_dir = output_dir
.canonicalize() .canonicalize()
.expect("Could not find output directory."); .expect("Could not find output directory.");
println!("Generating C headers..."); println!("Generating C headers...");
// Create headers. // Create headers.

View file

@ -2,7 +2,7 @@
name = "librashader-cache" name = "librashader-cache"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -12,8 +12,8 @@ description = "RetroArch shaders for all."
[dependencies] [dependencies]
serde = { version = "1.0" } serde = { version = "1.0" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["serialize"] } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["serialize"] }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
platform-dirs = "0.3.0" platform-dirs = "0.3.0"
blake3 = { version = "1.3.3" } blake3 = { version = "1.3.3" }
thiserror = "1.0.38" thiserror = "1.0.38"

View file

@ -1,8 +1,6 @@
//! Cache helpers for `ShaderCompilation` objects to cache compiled SPIRV. //! Cache helpers for `ShaderCompilation` objects to cache compiled SPIRV.
use librashader_preprocess::ShaderSource; use librashader_preprocess::ShaderSource;
#[cfg(feature = "windows")] use librashader_reflect::back::targets::{DXIL, GLSL, HLSL, SPIRV};
use librashader_reflect::back::targets::DXIL;
use librashader_reflect::back::targets::{GLSL, HLSL, SPIRV};
use librashader_reflect::back::{CompilerBackend, FromCompilation}; use librashader_reflect::back::{CompilerBackend, FromCompilation};
use librashader_reflect::error::{ShaderCompileError, ShaderReflectError}; use librashader_reflect::error::{ShaderCompileError, ShaderReflectError};
use librashader_reflect::front::{GlslangCompilation, ShaderCompilation}; use librashader_reflect::front::{GlslangCompilation, ShaderCompilation};
@ -58,7 +56,7 @@ impl<T: ShaderCompilation + for<'de> serde::Deserialize<'de> + serde::Serialize
} }
} }
#[cfg(feature = "windows")] #[cfg(all(target_os = "windows", feature = "d3d"))]
impl FromCompilation<CachedCompilation<GlslangCompilation>> for DXIL { impl FromCompilation<CachedCompilation<GlslangCompilation>> for DXIL {
type Target = <DXIL as FromCompilation<GlslangCompilation>>::Target; type Target = <DXIL as FromCompilation<GlslangCompilation>>::Target;
type Options = <DXIL as FromCompilation<GlslangCompilation>>::Options; type Options = <DXIL as FromCompilation<GlslangCompilation>>::Options;

View file

@ -3,7 +3,7 @@ name = "librashader-capi"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -16,29 +16,14 @@ crate-type = ["cdylib", "staticlib"]
[features] [features]
default = ["runtime-all" ] default = ["runtime-all" ]
runtime-all = [ runtime-all = ["runtime-opengl", "runtime-d3d11", "runtime-d3d12", "runtime-vulkan"]
"runtime-opengl",
"runtime-d3d11",
"runtime-d3d12",
"runtime-vulkan",
]
runtime-opengl = ["gl", "librashader/runtime-gl"] runtime-opengl = ["gl", "librashader/runtime-gl"]
runtime-d3d11 = [ runtime-d3d11 = ["windows", "librashader/runtime-d3d11", "windows/Win32_Graphics_Direct3D11"]
"windows", runtime-d3d12 = ["windows", "librashader/runtime-d3d12", "windows/Win32_Graphics_Direct3D12"]
"librashader/runtime-d3d11",
"windows/Win32_Graphics_Direct3D11",
]
runtime-d3d12 = [
"windows",
"librashader/runtime-d3d12",
"windows/Win32_Graphics_Direct3D12",
]
runtime-vulkan = ["ash", "librashader/runtime-vk"] runtime-vulkan = ["ash", "librashader/runtime-vk"]
[dependencies] [dependencies]
librashader = { path = "../librashader", version = "0.1.4", features = [ librashader = { path = "../librashader", version = "0.2.0-beta.2", features = ["internal"] }
"internal",
] }
thiserror = "1.0.37" thiserror = "1.0.37"
paste = "1.0.9" paste = "1.0.9"
gl = { version = "0.14.0", optional = true } gl = { version = "0.14.0", optional = true }

View file

@ -3,7 +3,7 @@ name = "librashader-common"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"

View file

@ -3,7 +3,7 @@ name = "librashader-preprocess"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -14,7 +14,7 @@ description = "RetroArch shaders for all."
[dependencies] [dependencies]
thiserror = "1.0.37" thiserror = "1.0.37"
nom = "7.1.1" nom = "7.1.1"
librashader-common = { path = "../librashader-common", version = "0.1.4" } librashader-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
encoding_rs = "0.8.31" encoding_rs = "0.8.31"

View file

@ -3,7 +3,7 @@ name = "librashader-presets"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -15,7 +15,7 @@ description = "RetroArch shaders for all."
thiserror = "1.0.37" thiserror = "1.0.37"
nom = "7.1.1" nom = "7.1.1"
nom_locate = "4.0.0" nom_locate = "4.0.0"
librashader-common = { path = "../librashader-common", version = "0.1.4" } librashader-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
num-traits = "0.2" num-traits = "0.2"
[features] [features]

View file

@ -3,7 +3,7 @@ name = "librashader-reflect"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -12,28 +12,32 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all." description = "RetroArch shaders for all."
[dependencies] [dependencies]
shaderc = { version = "0.8.2", features = [] } shaderc = { version = "0.8.3", features = [] }
bytemuck = "1.13.0" bytemuck = "1.13.0"
thiserror = "1.0.37" thiserror = "1.0.37"
bitflags = "1.3.2" bitflags = "1.3.2"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
librashader-common = { path = "../librashader-common", version = "0.1.4" } librashader-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23", optional = true } spirv_cross = { package = "librashader-spirv-cross", version = "0.23", optional = true }
spirv-to-dxil = { version = "0.4", optional = true }
naga = { version = "0.11.0", features = ["glsl-in", "spv-in", "spv-out", "glsl-out", "wgsl-out"], optional = true } naga = { version = "0.11.0", features = ["glsl-in", "spv-in", "spv-out", "glsl-out", "wgsl-out"], optional = true }
rspirv = { version = "0.11.0+1.5.4", optional = true } rspirv = { version = "0.11.0+1.5.4", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true } serde = { version = "1.0", features = ["derive"], optional = true }
[target.'cfg(windows)'.dependencies.spirv-to-dxil]
version = "0.4"
optional = true
[features] [features]
default = ["cross", "serialize"] default = ["cross", "serialize"]
unstable-naga = [ "naga", "rspirv" ] unstable-naga = [ "naga", "rspirv" ]
standalone = ["shaderc/build-from-source"] standalone = ["shaderc/build-from-source", "shaderc/prefer-static-linking"]
dxil = ["cross", "spirv-to-dxil"] dxil = ["cross", "spirv-to-dxil"]
cross = [ "spirv_cross", "spirv_cross/glsl", "spirv_cross/hlsl" ] cross = [ "spirv_cross", "spirv_cross/glsl", "spirv_cross/hlsl" ]
serialize = [ "serde" ] serialize = [ "serde" ]

View file

@ -1,5 +1,5 @@
pub mod cross; pub mod cross;
#[cfg(feature = "dxil")] #[cfg(all(target_os = "windows", feature = "dxil"))]
pub mod dxil; pub mod dxil;
mod spirv; mod spirv;
pub mod targets; pub mod targets;

View file

@ -23,7 +23,7 @@ pub enum ShaderCompileError {
SpirvCrossCompileError(#[from] spirv_cross::ErrorCode), SpirvCrossCompileError(#[from] spirv_cross::ErrorCode),
/// Error when transpiling from spirv-to-dxil /// Error when transpiling from spirv-to-dxil
#[cfg(feature = "dxil")] #[cfg(all(target_os = "windows", feature = "dxil"))]
#[error("spirv-to-dxil")] #[error("spirv-to-dxil")]
SpirvToDxilCompileError(#[from] spirv_to_dxil::SpirvToDxilError), SpirvToDxilCompileError(#[from] spirv_to_dxil::SpirvToDxilError),
} }

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-d3d11"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -12,13 +12,13 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all." description = "RetroArch shaders for all."
[dependencies] [dependencies]
librashader-common = { path = "../librashader-common", features = ["d3d11"], version = "0.1.4" } librashader-common = { path = "../librashader-common", features = ["d3d11"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["standalone"] } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" } librashader-runtime = { path = "../librashader-runtime", version = "0.2.0-beta.2" }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" } spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4", features = ["d3d"] } librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2", features = ["d3d"] }
thiserror = "1.0.37" thiserror = "1.0.37"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-d3d12"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -12,12 +12,12 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all." description = "RetroArch shaders for all."
[dependencies] [dependencies]
librashader-common = { path = "../librashader-common", features = ["d3d12"], version = "0.1.4" } librashader-common = { path = "../librashader-common", features = ["d3d12"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["dxil", "standalone"] } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["dxil", "standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" } librashader-runtime = { path = "../librashader-runtime", version = "0.2.0-beta.2" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4", features = ["d3d"] } librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2", features = ["d3d"] }
thiserror = "1.0.37" thiserror = "1.0.37"
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" } spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-gl"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -12,12 +12,12 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all." description = "RetroArch shaders for all."
[dependencies] [dependencies]
librashader-common = { path = "../librashader-common", features = ["opengl"], version = "0.1.4" } librashader-common = { path = "../librashader-common", features = ["opengl"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["standalone"] } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime" , version = "0.1.4" } librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.2" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" } librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2" }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" } spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
rustc-hash = "1.1.0" rustc-hash = "1.1.0"

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-vk"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -14,24 +14,19 @@ description = "RetroArch shaders for all."
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
librashader-common = { path = "../librashader-common", features = [ librashader-common = { path = "../librashader-common", features = ["vulkan"], version = "0.2.0-beta.2" }
"vulkan", librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
], version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = [] }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [ librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2" }
] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" } spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
bytemuck = "1.12.3" bytemuck = "1.12.3"
thiserror = "1.0.37" thiserror = "1.0.37"
ash = { version = "0.37", features = ["linked", "debug"] } ash = { version = "0.37.1+1.3.235", features = ["linked", "debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = [ gpu-allocator = { version = "0.22.0", default-features = false, features = ["vulkan"] }
"vulkan",
] }
parking_lot = "0.12.1" parking_lot = "0.12.1"
rayon = "1.6.1" rayon = "1.6.1"

View file

@ -3,7 +3,7 @@ name = "librashader-runtime"
edition = "2021" edition = "2021"
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -12,10 +12,10 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all." description = "RetroArch shaders for all."
[dependencies] [dependencies]
librashader-common = { path = "../librashader-common", version = "0.1.4" } librashader-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4" } librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2" }
bytemuck = "1.12.3" bytemuck = "1.12.3"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
num-traits = "0.2.15" num-traits = "0.2.15"

View file

@ -4,7 +4,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
license = "MPL-2.0 OR GPL-3.0-only" license = "MPL-2.0 OR GPL-3.0-only"
version = "0.1.4" version = "0.2.0-beta.2"
authors = ["Ronny Chan <ronny@ronnychan.ca>"] authors = ["Ronny Chan <ronny@ronnychan.ca>"]
repository = "https://github.com/SnowflakePowered/librashader" repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md" readme = "../README.md"
@ -13,19 +13,17 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all." description = "RetroArch shaders for all."
[dependencies] [dependencies]
librashader-common = { path = "../librashader-common", version = "0.1.4" } librashader-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" } librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" } librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [ librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["standalone"] }
"standalone", librashader-runtime = { path = "../librashader-runtime", version = "0.2.0-beta.2" }
] } librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version = "0.2.0-beta.2", optional = true }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" } librashader-runtime-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.2.0-beta.2", optional = true }
librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version = "0.1.4", optional = true } librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.2.0-beta.2", optional = true }
librashader-runtime-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.1.4", optional = true } librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.2.0-beta.2", optional = true }
librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.1.4", optional = true }
librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.1.4", optional = true }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" } librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2" }
ash = { version = "0.37", optional = true } ash = { version = "0.37", optional = true }
@ -41,34 +39,10 @@ preprocess = []
presets = [] presets = []
# runtimes # runtimes
runtime-gl = [ runtime-gl = [ "runtime", "reflect-cross", "librashader-common/opengl", "librashader-runtime-gl" ]
"runtime", runtime-d3d11 = [ "runtime", "reflect-cross","librashader-common/d3d11", "librashader-runtime-d3d11", "windows/Win32_Graphics_Direct3D11" ]
"reflect-cross", runtime-d3d12 = [ "runtime", "reflect-cross", "reflect-dxil", "librashader-common/d3d12", "librashader-runtime-d3d12", "windows/Win32_Graphics_Direct3D12" ]
"librashader-common/opengl", runtime-vk = ["runtime", "reflect-cross", "librashader-common/vulkan", "librashader-runtime-vk", "ash" ]
"librashader-runtime-gl",
]
runtime-d3d11 = [
"runtime",
"reflect-cross",
"librashader-common/d3d11",
"librashader-runtime-d3d11",
"windows/Win32_Graphics_Direct3D11",
]
runtime-d3d12 = [
"runtime",
"reflect-cross",
"reflect-dxil",
"librashader-common/d3d12",
"librashader-runtime-d3d12",
"windows/Win32_Graphics_Direct3D12",
]
runtime-vk = [
"runtime",
"reflect-cross",
"librashader-common/vulkan",
"librashader-runtime-vk",
"ash",
]
# reflection # reflection
reflect-cross = ["reflect", "librashader-reflect/cross"] reflect-cross = ["reflect", "librashader-reflect/cross"]

View file

@ -170,8 +170,8 @@ pub mod reflect {
} }
/// DXIL reflection via spirv-to-dxil. /// DXIL reflection via spirv-to-dxil.
#[cfg(feature = "reflect-dxil")] #[cfg(all(target_os = "windows", feature = "reflect-dxil"))]
#[doc(cfg(feature = "reflect-dxil"))] #[doc(cfg(all(target_os = "windows", feature = "reflect-dxil")))]
pub mod dxil { pub mod dxil {
/// The maximum shader model to use when compiling the DXIL blob. /// The maximum shader model to use when compiling the DXIL blob.
pub use librashader_reflect::back::dxil::ShaderModel; pub use librashader_reflect::back::dxil::ShaderModel;