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:
push:
@ -26,21 +26,18 @@ jobs:
with:
toolchain: nightly
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
name: Setup Python
name: Setup Python 3.11
with:
python-version: '3.x'
- run: pip install meson ninja mako
name: Install Meson for spirv-to-dxil-sys
python-version: '3.11.6'
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
with:
version: latest
cache: true
- if: runner.os == 'Windows'
name: Install winflexbison
run: choco install winflexbison3
run: pip install meson ninja mako
name: Install Meson for spirv-to-dxil-sys
- name: Build dynamic library
run: cargo run -p librashader-build-script -- --profile ${{ matrix.profile }}
- name: Upload build artifacts

View file

@ -2,7 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/test/shaders_slang" vcs="Git" />
</component>
</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
* The [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/)
* [Meson](https://mesonbuild.com/)
* [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/)
---
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

View file

@ -10,6 +10,8 @@ use std::{env, fs};
struct Args {
#[arg(long, default_value = "debug", global = true)]
profile: String,
#[arg(long, global = true)]
target: Option<String>,
}
pub fn main() {
@ -32,12 +34,26 @@ pub fn main() {
"--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"));
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()
.expect("Could not find output directory.");
println!("Generating C headers...");
// Create headers.

View file

@ -2,7 +2,7 @@
name = "librashader-cache"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -12,8 +12,8 @@ description = "RetroArch shaders for all."
[dependencies]
serde = { version = "1.0" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["serialize"] }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["serialize"] }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
platform-dirs = "0.3.0"
blake3 = { version = "1.3.3" }
thiserror = "1.0.38"

View file

@ -1,8 +1,6 @@
//! Cache helpers for `ShaderCompilation` objects to cache compiled SPIRV.
use librashader_preprocess::ShaderSource;
#[cfg(feature = "windows")]
use librashader_reflect::back::targets::DXIL;
use librashader_reflect::back::targets::{GLSL, HLSL, SPIRV};
use librashader_reflect::back::targets::{DXIL, GLSL, HLSL, SPIRV};
use librashader_reflect::back::{CompilerBackend, FromCompilation};
use librashader_reflect::error::{ShaderCompileError, ShaderReflectError};
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 {
type Target = <DXIL as FromCompilation<GlslangCompilation>>::Target;
type Options = <DXIL as FromCompilation<GlslangCompilation>>::Options;

View file

@ -3,7 +3,7 @@ name = "librashader-capi"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -12,33 +12,18 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[lib]
crate-type = ["cdylib", "staticlib"]
crate-type = [ "cdylib", "staticlib" ]
[features]
default = ["runtime-all"]
runtime-all = [
"runtime-opengl",
"runtime-d3d11",
"runtime-d3d12",
"runtime-vulkan",
]
default = ["runtime-all" ]
runtime-all = ["runtime-opengl", "runtime-d3d11", "runtime-d3d12", "runtime-vulkan"]
runtime-opengl = ["gl", "librashader/runtime-gl"]
runtime-d3d11 = [
"windows",
"librashader/runtime-d3d11",
"windows/Win32_Graphics_Direct3D11",
]
runtime-d3d12 = [
"windows",
"librashader/runtime-d3d12",
"windows/Win32_Graphics_Direct3D12",
]
runtime-d3d11 = ["windows", "librashader/runtime-d3d11", "windows/Win32_Graphics_Direct3D11"]
runtime-d3d12 = ["windows", "librashader/runtime-d3d12", "windows/Win32_Graphics_Direct3D12"]
runtime-vulkan = ["ash", "librashader/runtime-vk"]
[dependencies]
librashader = { path = "../librashader", version = "0.1.4", features = [
"internal",
] }
librashader = { path = "../librashader", version = "0.2.0-beta.2", features = ["internal"] }
thiserror = "1.0.37"
paste = "1.0.9"
gl = { version = "0.14.0", optional = true }

View file

@ -3,7 +3,7 @@ name = "librashader-common"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"

View file

@ -3,7 +3,7 @@ name = "librashader-preprocess"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -14,7 +14,7 @@ description = "RetroArch shaders for all."
[dependencies]
thiserror = "1.0.37"
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"
encoding_rs = "0.8.31"

View file

@ -3,7 +3,7 @@ name = "librashader-presets"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -15,7 +15,7 @@ description = "RetroArch shaders for all."
thiserror = "1.0.37"
nom = "7.1.1"
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"
[features]

View file

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

View file

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

View file

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

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-d3d11"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -12,13 +12,13 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[dependencies]
librashader-common = { path = "../librashader-common", features = ["d3d11"], version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-common = { path = "../librashader-common", features = ["d3d11"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.2.0-beta.2" }
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"
rustc-hash = "1.1.0"

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-d3d12"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -12,12 +12,12 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[dependencies]
librashader-common = { path = "../librashader-common", features = ["d3d12"], version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["dxil", "standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4", features = ["d3d"] }
librashader-common = { path = "../librashader-common", features = ["d3d12"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["dxil", "standalone"] }
librashader-runtime = { path = "../librashader-runtime", version = "0.2.0-beta.2" }
librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2", features = ["d3d"] }
thiserror = "1.0.37"
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-gl"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -12,12 +12,12 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[dependencies]
librashader-common = { path = "../librashader-common", features = ["opengl"], version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime" , version = "0.1.4" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" }
librashader-common = { path = "../librashader-common", features = ["opengl"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["standalone"] }
librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.2" }
librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2" }
spirv_cross = { package = "librashader-spirv-cross", version = "0.23" }
rustc-hash = "1.1.0"

View file

@ -3,7 +3,7 @@ name = "librashader-runtime-vk"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
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
[dependencies]
librashader-common = { path = "../librashader-common", features = [
"vulkan",
], version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [
] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-cache = { path = "../librashader-cache", version = "0.1.4" }
librashader-common = { path = "../librashader-common", features = ["vulkan"], version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = [] }
librashader-runtime = { path = "../librashader-runtime" , version = "0.2.0-beta.2" }
librashader-cache = { path = "../librashader-cache", version = "0.2.0-beta.2" }
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", features = ["linked", "debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = [
"vulkan",
] }
ash = { version = "0.37.1+1.3.235", features = ["linked", "debug"] }
gpu-allocator = { version = "0.22.0", default-features = false, features = ["vulkan"] }
parking_lot = "0.12.1"
rayon = "1.6.1"

View file

@ -3,7 +3,7 @@ name = "librashader-runtime"
edition = "2021"
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -12,10 +12,10 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[dependencies]
librashader-common = { path = "../librashader-common", version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4" }
librashader-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2" }
bytemuck = "1.12.3"
rustc-hash = "1.1.0"
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
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>"]
repository = "https://github.com/SnowflakePowered/librashader"
readme = "../README.md"
@ -13,19 +13,17 @@ keywords = ["shader", "retroarch", "SPIR-V"]
description = "RetroArch shaders for all."
[dependencies]
librashader-common = { path = "../librashader-common", version = "0.1.4" }
librashader-presets = { path = "../librashader-presets", version = "0.1.4" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.1.4" }
librashader-reflect = { path = "../librashader-reflect", version = "0.1.4", features = [
"standalone",
] }
librashader-runtime = { path = "../librashader-runtime", version = "0.1.4" }
librashader-runtime-d3d11 = { path = "../librashader-runtime-d3d11", version = "0.1.4", optional = true }
librashader-runtime-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.1.4", 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-common = { path = "../librashader-common", version = "0.2.0-beta.2" }
librashader-presets = { path = "../librashader-presets", version = "0.2.0-beta.2" }
librashader-preprocess = { path = "../librashader-preprocess", version = "0.2.0-beta.2" }
librashader-reflect = { path = "../librashader-reflect", version = "0.2.0-beta.2", features = ["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-d3d12 = { path = "../librashader-runtime-d3d12", version = "0.2.0-beta.2", optional = true }
librashader-runtime-gl = { path = "../librashader-runtime-gl", version = "0.2.0-beta.2", optional = true }
librashader-runtime-vk = { path = "../librashader-runtime-vk", version = "0.2.0-beta.2", 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 }
@ -41,34 +39,10 @@ preprocess = []
presets = []
# runtimes
runtime-gl = [
"runtime",
"reflect-cross",
"librashader-common/opengl",
"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",
]
runtime-gl = [ "runtime", "reflect-cross", "librashader-common/opengl", "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
reflect-cross = ["reflect", "librashader-reflect/cross"]
@ -78,7 +52,7 @@ runtime-all = ["runtime-gl", "runtime-d3d11", "runtime-d3d12", "runtime-vk"]
reflect-all = ["reflect-cross", "reflect-dxil"]
# enable all features by default
default = ["full"]
default = [ "full" ]
internal = []
full = ["runtime-all", "reflect-all", "preprocess", "presets"]
@ -88,4 +62,4 @@ docsrs = ["librashader-cache/docsrs"]
[package.metadata.docs.rs]
targets = ["x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu"]
features = ["librashader-cache/docsrs"]
features = [ "librashader-cache/docsrs" ]

View file

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