Compare commits

...

2 Commits

Author SHA1 Message Date
3594268cf6 the macroer (we were so close to greatness) 2023-10-12 19:05:36 -07:00
fac0383bb1 include spirv deps 2023-10-12 19:05:36 -07:00
3 changed files with 61 additions and 5 deletions

61
Cargo.lock generated
View File

@ -538,6 +538,12 @@ dependencies = [
"simd-adler32",
]
[[package]]
name = "fixedbitset"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]]
name = "flate2"
version = "1.0.27"
@ -617,6 +623,15 @@ dependencies = [
"waker-fn",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "generic-array"
version = "0.14.7"
@ -762,6 +777,16 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "include_wgsl"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57ac28436974a64aef47cbf8453e8f1a558b779177fe50b7e3c3774e2cb9ba47"
dependencies = [
"naga 0.7.3",
"syn 1.0.109",
]
[[package]]
name = "indexmap"
version = "1.9.3"
@ -1013,6 +1038,24 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "naga"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "806f448a7ce662ca79ef5484ef8f451a9b7c51b8166c95f5a667228b3825a6ca"
dependencies = [
"bit-set",
"bitflags 1.3.2",
"codespan-reporting",
"fxhash",
"hexf-parse",
"indexmap 1.9.3",
"log",
"num-traits 0.2.16",
"spirv",
"thiserror",
]
[[package]]
name = "naga"
version = "0.13.0"
@ -1026,6 +1069,7 @@ dependencies = [
"indexmap 1.9.3",
"log",
"num-traits 0.2.16",
"petgraph",
"rustc-hash",
"spirv",
"termcolor",
@ -1282,6 +1326,16 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "petgraph"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
dependencies = [
"fixedbitset",
"indexmap 2.0.0",
]
[[package]]
name = "pin-project-lite"
version = "0.2.13"
@ -1696,6 +1750,7 @@ dependencies = [
"ddsfile",
"env_logger",
"glam",
"include_wgsl",
"lazy-regex",
"log",
"obj",
@ -2027,7 +2082,7 @@ dependencies = [
"cfg-if",
"js-sys",
"log",
"naga",
"naga 0.13.0",
"parking_lot",
"profiling",
"raw-window-handle",
@ -2052,7 +2107,7 @@ dependencies = [
"bitflags 2.4.0",
"codespan-reporting",
"log",
"naga",
"naga 0.13.0",
"parking_lot",
"profiling",
"raw-window-handle",
@ -2089,7 +2144,7 @@ dependencies = [
"libloading 0.8.0",
"log",
"metal",
"naga",
"naga 0.13.0",
"objc",
"parking_lot",
"profiling",

View File

@ -12,6 +12,7 @@ configparser = "3.0.2"
ddsfile = "0.5.1"
env_logger = "0.10.0"
glam = "0.24.1"
include_wgsl = { version = "1.1.1", features = ["spv-out"] }
lazy-regex = "3.0.2"
log = "0.4.20"
obj = "0.10.2"
@ -21,7 +22,7 @@ rbx_binary = "0.7.1"
rbx_dom_weak = "2.5.0"
rbx_reflection_database = "0.2.7"
rbx_xml = "0.13.1"
wgpu = "0.17.0"
wgpu = { version = "0.17.0", features = ["spirv"] }
winit = "0.28.6"
#[profile.release]

View File

@ -556,7 +556,7 @@ impl framework::Example for GlobalState {
// Create the render pipeline
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: None,
source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(include_str!("shader.wgsl"))),
source: wgpu::ShaderSource::SpirV(Cow::Borrowed(include_wgsl_to_spv!("shader.wgsl"))),
});
//load textures