unstable-naga
This commit is contained in:
parent
e9f2789703
commit
71d1ddfa2a
62
Cargo.lock
generated
62
Cargo.lock
generated
|
@ -275,30 +275,15 @@ dependencies = [
|
|||
"virtue",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
|
||||
dependencies = [
|
||||
"bit-vec 0.6.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f"
|
||||
dependencies = [
|
||||
"bit-vec 0.7.0",
|
||||
"bit-vec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.7.0"
|
||||
|
@ -1763,7 +1748,7 @@ dependencies = [
|
|||
"librashader-presets",
|
||||
"librashader-spirv-cross",
|
||||
"matches",
|
||||
"naga 0.20.0",
|
||||
"naga",
|
||||
"rspirv",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
|
@ -2084,26 +2069,6 @@ dependencies = [
|
|||
"simd-adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set 0.5.3",
|
||||
"bitflags 2.6.0",
|
||||
"codespan-reporting",
|
||||
"indexmap 2.2.6",
|
||||
"log",
|
||||
"num-traits",
|
||||
"petgraph",
|
||||
"rustc-hash",
|
||||
"spirv",
|
||||
"termcolor",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "22.0.0"
|
||||
|
@ -2111,13 +2076,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "09eeccb9b50f4f7839b214aa3e08be467159506a986c18e0702170ccf720a453"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set 0.6.0",
|
||||
"bit-set",
|
||||
"bitflags 2.6.0",
|
||||
"cfg_aliases",
|
||||
"codespan-reporting",
|
||||
"hexf-parse",
|
||||
"indexmap 2.2.6",
|
||||
"log",
|
||||
"petgraph",
|
||||
"pp-rs",
|
||||
"rustc-hash",
|
||||
"spirv",
|
||||
"termcolor",
|
||||
|
@ -2551,6 +2518,15 @@ version = "0.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2"
|
||||
|
||||
[[package]]
|
||||
name = "pp-rs"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb458bb7f6e250e6eb79d5026badc10a3ebb8f9a15d1fff0f13d17c71f4d6dee"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
|
@ -3689,7 +3665,7 @@ dependencies = [
|
|||
"document-features",
|
||||
"js-sys",
|
||||
"log",
|
||||
"naga 22.0.0",
|
||||
"naga",
|
||||
"parking_lot",
|
||||
"profiling",
|
||||
"raw-window-handle 0.6.2",
|
||||
|
@ -3710,13 +3686,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "e0f191908a21968991463fcf3b42cb6c9648c0fb7fa301b8fc733bc21a9ed9bd"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-vec 0.7.0",
|
||||
"bit-vec",
|
||||
"bitflags 2.6.0",
|
||||
"cfg_aliases",
|
||||
"document-features",
|
||||
"indexmap 2.2.6",
|
||||
"log",
|
||||
"naga 22.0.0",
|
||||
"naga",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"profiling",
|
||||
|
@ -3737,7 +3713,7 @@ dependencies = [
|
|||
"android_system_properties",
|
||||
"arrayvec",
|
||||
"ash 0.38.0+1.3.281",
|
||||
"bit-set 0.6.0",
|
||||
"bit-set",
|
||||
"bitflags 2.6.0",
|
||||
"block",
|
||||
"cfg_aliases",
|
||||
|
@ -3755,7 +3731,7 @@ dependencies = [
|
|||
"libloading 0.8.3",
|
||||
"log",
|
||||
"metal",
|
||||
"naga 22.0.0",
|
||||
"naga",
|
||||
"ndk-sys",
|
||||
"objc",
|
||||
"once_cell",
|
||||
|
|
|
@ -24,7 +24,7 @@ librashader-presets = { path = "../librashader-presets", version = "0.2.7" }
|
|||
|
||||
spirv_cross = { package = "librashader-spirv-cross", version = "0.25.1", optional = true }
|
||||
|
||||
naga = { version = "0.20.0", optional = true }
|
||||
naga = { version = "22.0.0", optional = true }
|
||||
rspirv = { version = "0.12.0", optional = true }
|
||||
spirv = { version = "0.3.0", optional = true }
|
||||
|
||||
|
@ -42,7 +42,20 @@ optional = true
|
|||
default = ["cross", "naga", "serialize", "wgsl", "msl"]
|
||||
dxil = ["spirv_cross/hlsl", "spirv-to-dxil"]
|
||||
wgsl = ["cross", "naga/wgsl-out", "spirv", "rspirv"]
|
||||
cross = [ "spirv_cross", "spirv_cross/glsl", "spirv_cross/hlsl", "spirv_cross/msl" ]
|
||||
naga = [ "rspirv", "spirv", "naga/spv-in", "naga/spv-out", "naga/wgsl-out", "naga/msl-out" ]
|
||||
cross = [
|
||||
"spirv_cross",
|
||||
"spirv_cross/glsl",
|
||||
"spirv_cross/hlsl",
|
||||
"spirv_cross/msl",
|
||||
]
|
||||
naga = [
|
||||
"rspirv",
|
||||
"spirv",
|
||||
"naga/spv-in",
|
||||
"naga/spv-out",
|
||||
"naga/wgsl-out",
|
||||
"naga/msl-out",
|
||||
]
|
||||
unstable-naga = ["naga", "naga/glsl-in"]
|
||||
serialize = ["serde"]
|
||||
msl = ["spirv_cross/msl", "naga/msl-out"]
|
||||
|
|
|
@ -130,7 +130,10 @@ mod test {
|
|||
use librashader_preprocess::ShaderSource;
|
||||
|
||||
pub fn test() {
|
||||
let result = ShaderSource::load("../test/basic.slang").unwrap();
|
||||
let result = ShaderSource::load(&librashader_common::ShaderStorage::Path(
|
||||
"../test/basic.slang".into(),
|
||||
))
|
||||
.unwrap();
|
||||
let _cross = Glslang::compile(&result).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ mod test {
|
|||
use crate::reflect::naga::NagaLoweringOptions;
|
||||
use crate::reflect::semantics::{Semantic, ShaderSemantics, UniformSemantic, UniqueSemantics};
|
||||
use crate::reflect::ReflectShader;
|
||||
use bitflags::Flags;
|
||||
use librashader_common::map::FastHashMap;
|
||||
use librashader_preprocess::ShaderSource;
|
||||
|
||||
|
@ -43,7 +42,10 @@ mod test {
|
|||
pub fn test_into() {
|
||||
// let result = ShaderSource::load("../test/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang").unwrap();
|
||||
// let result = ShaderSource::load("../test/shaders_slang/crt/shaders/crt-royale/src/crt-royale-scanlines-horizontal-apply-mask.slang").unwrap();
|
||||
let result = ShaderSource::load("../test/basic.slang").unwrap();
|
||||
let result = ShaderSource::load(&librashader_common::ShaderStorage::Path(
|
||||
"../test/basic.slang".into(),
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
let mut uniform_semantics: FastHashMap<String, UniformSemantic> = Default::default();
|
||||
|
||||
|
|
|
@ -57,7 +57,10 @@ mod test {
|
|||
use librashader_preprocess::ShaderSource;
|
||||
#[test]
|
||||
pub fn compile_shader() {
|
||||
let result = ShaderSource::load("../test/basic.slang").unwrap();
|
||||
let result = ShaderSource::load(&librashader_common::ShaderStorage::Path(
|
||||
"../test/basic.slang".into(),
|
||||
))
|
||||
.unwrap();
|
||||
let _spirv = compile_spirv(&result).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,8 @@ impl CompileShader<MSL> for NagaReflect {
|
|||
|
||||
let pipeline_options = PipelineOptions {
|
||||
allow_and_force_point_size: false,
|
||||
vertex_pulling_transform: false,
|
||||
vertex_buffer_mappings: Vec::new(),
|
||||
};
|
||||
|
||||
let msl = naga::back::msl::write_string(module, &info, &options, &pipeline_options)?;
|
||||
|
|
|
@ -111,7 +111,11 @@ runtime-metal = [
|
|||
# reflection
|
||||
reflect-cross = ["reflect", "librashader-reflect/cross"]
|
||||
reflect-dxil = ["reflect", "librashader-reflect/dxil"]
|
||||
reflect-naga = ["reflect", "librashader-reflect/naga"]
|
||||
reflect-naga = [
|
||||
"reflect",
|
||||
"librashader-reflect/naga",
|
||||
"librashader-reflect/unstable-naga",
|
||||
]
|
||||
|
||||
runtime-all = [
|
||||
"runtime-gl",
|
||||
|
|
Loading…
Reference in a new issue