Update to the latest wgpu git

This commit is contained in:
Imbris 2021-02-27 23:09:30 -05:00 committed by Avi Weinstock
parent 03acb63667
commit 8d8ea55830
14 changed files with 149 additions and 117 deletions

102
Cargo.lock generated
View File

@ -1224,6 +1224,16 @@ dependencies = [
"sct", "sct",
] ]
[[package]]
name = "d3d12"
version = "0.3.2"
source = "git+https://github.com/gfx-rs/d3d12-rs?rev=be19a243b86e0bafb9937d661fc8eabb3e42b44e#be19a243b86e0bafb9937d661fc8eabb3e42b44e"
dependencies = [
"bitflags",
"libloading 0.7.0",
"winapi 0.3.9",
]
[[package]] [[package]]
name = "d3d12" name = "d3d12"
version = "0.3.2" version = "0.3.2"
@ -1886,10 +1896,10 @@ dependencies = [
[[package]] [[package]]
name = "gfx-auxil" name = "gfx-auxil"
version = "0.8.0" version = "0.8.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"fxhash", "fxhash",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"spirv_cross", "spirv_cross",
] ]
@ -1907,16 +1917,16 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-dx11" name = "gfx-backend-dx11"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bitflags", "bitflags",
"gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"libloading 0.6.7", "libloading 0.7.0",
"log", "log",
"parking_lot 0.11.1", "parking_lot 0.11.1",
"range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"raw-window-handle", "raw-window-handle",
"smallvec", "smallvec",
"spirv_cross", "spirv_cross",
@ -1950,17 +1960,17 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-dx12" name = "gfx-backend-dx12"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bit-set", "bit-set",
"bitflags", "bitflags",
"d3d12", "d3d12 0.3.2 (git+https://github.com/gfx-rs/d3d12-rs?rev=be19a243b86e0bafb9937d661fc8eabb3e42b44e)",
"gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"log", "log",
"parking_lot 0.11.1", "parking_lot 0.11.1",
"range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"raw-window-handle", "raw-window-handle",
"smallvec", "smallvec",
"spirv_cross", "spirv_cross",
@ -1976,7 +1986,7 @@ dependencies = [
"arrayvec", "arrayvec",
"bit-set", "bit-set",
"bitflags", "bitflags",
"d3d12", "d3d12 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx-auxil 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx-auxil 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log", "log",
@ -1992,9 +2002,9 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-empty" name = "gfx-backend-empty"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"log", "log",
"raw-window-handle", "raw-window-handle",
] ]
@ -2013,16 +2023,17 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-gl" name = "gfx-backend-gl"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bitflags", "bitflags",
"gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "fxhash",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"glow", "glow",
"js-sys", "js-sys",
"khronos-egl", "khronos-egl 4.1.0",
"libloading 0.6.7", "libloading 0.7.0",
"log", "log",
"naga 0.3.1", "naga 0.3.1",
"parking_lot 0.11.1", "parking_lot 0.11.1",
@ -2044,7 +2055,7 @@ dependencies = [
"gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glow", "glow",
"js-sys", "js-sys",
"khronos-egl", "khronos-egl 3.0.2",
"libloading 0.6.7", "libloading 0.6.7",
"log", "log",
"naga 0.3.2", "naga 0.3.2",
@ -2058,7 +2069,7 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-metal" name = "gfx-backend-metal"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bitflags", "bitflags",
@ -2066,14 +2077,15 @@ dependencies = [
"cocoa-foundation", "cocoa-foundation",
"copyless", "copyless",
"foreign-types", "foreign-types",
"gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "fxhash",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-auxil 0.8.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"log", "log",
"metal 0.21.0 (git+https://github.com/gfx-rs/metal-rs?rev=439c986eb7a9b91e88b61def2daa66e4043fcbef)", "metal 0.21.0 (git+https://github.com/gfx-rs/metal-rs?rev=439c986eb7a9b91e88b61def2daa66e4043fcbef)",
"naga 0.3.1", "naga 0.3.1",
"objc", "objc",
"parking_lot 0.11.1", "parking_lot 0.11.1",
"range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"raw-window-handle", "raw-window-handle",
"spirv_cross", "spirv_cross",
"storage-map", "storage-map",
@ -2107,13 +2119,13 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-vulkan" name = "gfx-backend-vulkan"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"ash", "ash",
"byteorder", "byteorder",
"core-graphics-types", "core-graphics-types",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"inplace_it", "inplace_it",
"log", "log",
"naga 0.3.1", "naga 0.3.1",
@ -2148,7 +2160,7 @@ dependencies = [
[[package]] [[package]]
name = "gfx-hal" name = "gfx-hal"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"naga 0.3.1", "naga 0.3.1",
@ -2802,6 +2814,16 @@ dependencies = [
"libloading 0.6.7", "libloading 0.6.7",
] ]
[[package]]
name = "khronos-egl"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3"
dependencies = [
"libc",
"libloading 0.7.0",
]
[[package]] [[package]]
name = "lazy-bytes-cast" name = "lazy-bytes-cast"
version = "5.0.1" version = "5.0.1"
@ -3237,7 +3259,7 @@ checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238"
[[package]] [[package]]
name = "naga" name = "naga"
version = "0.3.1" version = "0.3.1"
source = "git+https://github.com/gfx-rs/naga?tag=gfx-9#c12003f5648fcade5f20c01debc4cb12bd47073e" source = "git+https://github.com/gfx-rs/naga?tag=gfx-12#fa7d4d8b51d4eeffe9f648d285466637f733a4a1"
dependencies = [ dependencies = [
"bit-set", "bit-set",
"bitflags", "bitflags",
@ -4302,7 +4324,7 @@ dependencies = [
[[package]] [[package]]
name = "range-alloc" name = "range-alloc"
version = "0.1.2" version = "0.1.2"
source = "git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7#d54cdcfac68711a91b55682c56da09f8e5b6f4e7" source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8"
[[package]] [[package]]
name = "range-alloc" name = "range-alloc"
@ -6703,7 +6725,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu" name = "wgpu"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/wgpu-rs.git?rev=1f1a7e5dd47a1610733bbc3989414acb62395359#1f1a7e5dd47a1610733bbc3989414acb62395359" source = "git+https://github.com/gfx-rs/wgpu-rs.git?rev=fd4a9925334264725fda5c5d82fa16d7f8aaaa24#fd4a9925334264725fda5c5d82fa16d7f8aaaa24"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"js-sys", "js-sys",
@ -6716,7 +6738,7 @@ dependencies = [
"wasm-bindgen-futures", "wasm-bindgen-futures",
"web-sys", "web-sys",
"wgpu-core 0.7.0", "wgpu-core 0.7.0",
"wgpu-types 0.7.0 (git+https://github.com/gfx-rs/wgpu?rev=3ebe198911b46cb77fcdc481f7d0daf9a962b82e)", "wgpu-types 0.7.0 (git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3)",
] ]
[[package]] [[package]]
@ -6743,20 +6765,20 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=3ebe198911b46cb77fcdc481f7d0daf9a962b82e#3ebe198911b46cb77fcdc481f7d0daf9a962b82e" source = "git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3#ecbddedfaf67299bc2c507f69d138b2c3e3226b3"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bitflags", "bitflags",
"cfg_aliases", "cfg_aliases",
"copyless", "copyless",
"fxhash", "fxhash",
"gfx-backend-dx11 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-backend-dx11 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-backend-dx12 0.7.0", "gfx-backend-dx12 0.7.0",
"gfx-backend-empty 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-backend-empty 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-backend-gl 0.7.0", "gfx-backend-gl 0.7.0",
"gfx-backend-metal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-backend-metal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-backend-vulkan 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-backend-vulkan 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=d54cdcfac68711a91b55682c56da09f8e5b6f4e7)", "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)",
"gpu-alloc", "gpu-alloc",
"gpu-descriptor", "gpu-descriptor",
"naga 0.3.1", "naga 0.3.1",
@ -6765,7 +6787,7 @@ dependencies = [
"smallvec", "smallvec",
"thiserror", "thiserror",
"tracing", "tracing",
"wgpu-types 0.7.0 (git+https://github.com/gfx-rs/wgpu?rev=3ebe198911b46cb77fcdc481f7d0daf9a962b82e)", "wgpu-types 0.7.0 (git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3)",
] ]
[[package]] [[package]]
@ -6810,7 +6832,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=3ebe198911b46cb77fcdc481f7d0daf9a962b82e#3ebe198911b46cb77fcdc481f7d0daf9a962b82e" source = "git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3#ecbddedfaf67299bc2c507f69d138b2c3e3226b3"
dependencies = [ dependencies = [
"bitflags", "bitflags",
] ]

View File

@ -108,4 +108,4 @@ key = "veloren-nix.cachix.org-1:zokfKJqVsNV6kI/oJdLF6TYBdNPYGSb+diMVQPn/5Rc="
winit = { git = "https://gitlab.com/veloren/winit.git", branch = "macos-test-spiffed" } winit = { git = "https://gitlab.com/veloren/winit.git", branch = "macos-test-spiffed" }
vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics2" } vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics2" }
# patch wgpu so we can use wgpu-profiler crate # patch wgpu so we can use wgpu-profiler crate
wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "1f1a7e5dd47a1610733bbc3989414acb62395359" } wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "fd4a9925334264725fda5c5d82fa16d7f8aaaa24" }

View File

@ -42,7 +42,7 @@ anim = {package = "veloren-voxygen-anim", path = "anim"}
# Graphics # Graphics
winit = {version = "0.24.0", features = ["serde"]} winit = {version = "0.24.0", features = ["serde"]}
wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "1f1a7e5dd47a1610733bbc3989414acb62395359" } wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "fd4a9925334264725fda5c5d82fa16d7f8aaaa24" }
wgpu-profiler = "0.2.1" wgpu-profiler = "0.2.1"
bytemuck = { version="1.4", features=["derive"] } bytemuck = { version="1.4", features=["derive"] }
shaderc = "0.6.2" shaderc = "0.6.2"

View File

@ -181,7 +181,7 @@ impl CloudsPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::None, cull_mode: None,
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: None, depth_stencil: None,
@ -195,8 +195,7 @@ impl CloudsPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
alpha_blend: wgpu::BlendState::REPLACE, blend: None,
color_blend: wgpu::BlendState::REPLACE,
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -211,7 +211,7 @@ impl FigurePipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -241,8 +241,7 @@ impl FigurePipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState::REPLACE, blend: None,
alpha_blend: wgpu::BlendState::REPLACE,
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -33,7 +33,7 @@ impl Vertex {
} }
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 1] = wgpu::vertex_attr_array![0 => Uint]; const ATTRIBUTES: [wgpu::VertexAttribute; 1] = wgpu::vertex_attr_array![0 => Uint32];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: Self::STRIDE, array_stride: Self::STRIDE,
step_mode: wgpu::InputStepMode::Vertex, step_mode: wgpu::InputStepMode::Vertex,
@ -153,7 +153,7 @@ impl FluidPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::None, cull_mode: None,
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -183,16 +183,18 @@ impl FluidPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState { blend: Some(wgpu::BlendState {
src_factor: wgpu::BlendFactor::SrcAlpha, color: wgpu::BlendComponent {
dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha, src_factor: wgpu::BlendFactor::SrcAlpha,
operation: wgpu::BlendOperation::Add, dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
}, operation: wgpu::BlendOperation::Add,
alpha_blend: wgpu::BlendState { },
src_factor: wgpu::BlendFactor::One, alpha: wgpu::BlendComponent {
dst_factor: wgpu::BlendFactor::One, src_factor: wgpu::BlendFactor::One,
operation: wgpu::BlendOperation::Add, dst_factor: wgpu::BlendFactor::One,
}, operation: wgpu::BlendOperation::Add,
},
}),
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -17,7 +17,7 @@ impl Vertex {
} }
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 1] = wgpu::vertex_attr_array![0 => Float2]; const ATTRIBUTES: [wgpu::VertexAttribute; 1] = wgpu::vertex_attr_array![0 => Float32x2];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: Self::STRIDE, array_stride: Self::STRIDE,
step_mode: wgpu::InputStepMode::Vertex, step_mode: wgpu::InputStepMode::Vertex,
@ -182,7 +182,7 @@ impl LodTerrainPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -212,8 +212,7 @@ impl LodTerrainPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState::REPLACE, blend: None,
alpha_blend: wgpu::BlendState::REPLACE,
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -34,7 +34,7 @@ impl Vertex {
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 2] = const ATTRIBUTES: [wgpu::VertexAttribute; 2] =
wgpu::vertex_attr_array![0 => Float3, 1 => Uint]; wgpu::vertex_attr_array![0 => Float32x3, 1 => Uint32];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: Self::STRIDE, array_stride: Self::STRIDE,
step_mode: wgpu::InputStepMode::Vertex, step_mode: wgpu::InputStepMode::Vertex,
@ -152,7 +152,7 @@ impl Instance {
} }
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 6] = wgpu::vertex_attr_array![2 => Float, 3 => Float, 4 => Float, 5 => Int, 6 => Float3, 7 => Float3]; const ATTRIBUTES: [wgpu::VertexAttribute; 6] = wgpu::vertex_attr_array![2 => Float32, 3 => Float32, 4 => Float32, 5 => Sint32, 6 => Float32x3, 7 => Float32x3];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: mem::size_of::<Self>() as wgpu::BufferAddress, array_stride: mem::size_of::<Self>() as wgpu::BufferAddress,
step_mode: wgpu::InputStepMode::Instance, step_mode: wgpu::InputStepMode::Instance,
@ -206,7 +206,7 @@ impl ParticlePipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -236,16 +236,18 @@ impl ParticlePipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState { blend: Some(wgpu::BlendState {
src_factor: wgpu::BlendFactor::SrcAlpha, color: wgpu::BlendComponent {
dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha, src_factor: wgpu::BlendFactor::SrcAlpha,
operation: wgpu::BlendOperation::Add, dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
}, operation: wgpu::BlendOperation::Add,
alpha_blend: wgpu::BlendState { },
src_factor: wgpu::BlendFactor::One, alpha: wgpu::BlendComponent {
dst_factor: wgpu::BlendFactor::One, src_factor: wgpu::BlendFactor::One,
operation: wgpu::BlendOperation::Add, dst_factor: wgpu::BlendFactor::One,
}, operation: wgpu::BlendOperation::Add,
},
}),
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -135,7 +135,7 @@ impl PostProcessPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::None, cull_mode: None,
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: None, depth_stencil: None,
@ -149,8 +149,7 @@ impl PostProcessPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState::REPLACE, blend: None,
alpha_blend: wgpu::BlendState::REPLACE,
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -166,7 +166,7 @@ impl ShadowFigurePipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Front, cull_mode: Some(wgpu::Face::Front),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -240,7 +240,7 @@ impl ShadowPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Front, cull_mode: Some(wgpu::Face::Front),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -316,7 +316,7 @@ impl PointShadowPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {

View File

@ -16,7 +16,7 @@ impl Vertex {
attributes: &[wgpu::VertexAttribute { attributes: &[wgpu::VertexAttribute {
offset: 0, offset: 0,
shader_location: 0, shader_location: 0,
format: wgpu::VertexFormat::Float3, format: wgpu::VertexFormat::Float32x3,
}], }],
} }
} }
@ -67,7 +67,7 @@ impl SkyboxPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -97,8 +97,7 @@ impl SkyboxPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState::REPLACE, blend: None,
alpha_blend: wgpu::BlendState::REPLACE,
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -62,7 +62,7 @@ impl Vertex {
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 3] = const ATTRIBUTES: [wgpu::VertexAttribute; 3] =
wgpu::vertex_attr_array![0 => Float3, 1 => Uint, 2 => Uint]; wgpu::vertex_attr_array![0 => Float32x3, 1 => Uint32, 2 => Uint32];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: Self::STRIDE, array_stride: Self::STRIDE,
step_mode: wgpu::InputStepMode::Vertex, step_mode: wgpu::InputStepMode::Vertex,
@ -114,7 +114,15 @@ impl Instance {
} }
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 7] = wgpu::vertex_attr_array![3 => Uint, 4 => Float4, 5 => Float4, 6 => Float4,7 => Float4, 8 => Float4, 9 => Float]; const ATTRIBUTES: [wgpu::VertexAttribute; 7] = wgpu::vertex_attr_array![
3 => Uint32,
4 => Float32x4,
5 => Float32x4,
6 => Float32x4,
7 => Float32x4,
8 => Float32x4,
9 => Float32,
];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: mem::size_of::<Self>() as wgpu::BufferAddress, array_stride: mem::size_of::<Self>() as wgpu::BufferAddress,
step_mode: wgpu::InputStepMode::Instance, step_mode: wgpu::InputStepMode::Instance,
@ -246,7 +254,7 @@ impl SpritePipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -276,16 +284,19 @@ impl SpritePipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState { // TODO: can we remove sprite transparency?
src_factor: wgpu::BlendFactor::SrcAlpha, blend: Some(wgpu::BlendState {
dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha, color: wgpu::BlendComponent {
operation: wgpu::BlendOperation::Add, src_factor: wgpu::BlendFactor::SrcAlpha,
}, dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
alpha_blend: wgpu::BlendState { operation: wgpu::BlendOperation::Add,
src_factor: wgpu::BlendFactor::One, },
dst_factor: wgpu::BlendFactor::One, alpha: wgpu::BlendComponent {
operation: wgpu::BlendOperation::Add, src_factor: wgpu::BlendFactor::One,
}, dst_factor: wgpu::BlendFactor::One,
operation: wgpu::BlendOperation::Add,
},
}),
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -121,7 +121,7 @@ impl Vertex {
pub fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { pub fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 2] = const ATTRIBUTES: [wgpu::VertexAttribute; 2] =
wgpu::vertex_attr_array![0 => Uint,1 => Uint]; wgpu::vertex_attr_array![0 => Uint32,1 => Uint32];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: Self::STRIDE, array_stride: Self::STRIDE,
step_mode: wgpu::InputStepMode::Vertex, step_mode: wgpu::InputStepMode::Vertex,
@ -245,7 +245,7 @@ impl TerrainPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: Some(wgpu::DepthStencilState { depth_stencil: Some(wgpu::DepthStencilState {
@ -275,8 +275,7 @@ impl TerrainPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState::REPLACE, blend: None,
alpha_blend: wgpu::BlendState::REPLACE,
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),

View File

@ -17,8 +17,7 @@ pub struct Vertex {
impl Vertex { impl Vertex {
fn desc<'a>() -> wgpu::VertexBufferLayout<'a> { fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
const ATTRIBUTES: [wgpu::VertexAttribute; 5] = const ATTRIBUTES: [wgpu::VertexAttribute; 5] = wgpu::vertex_attr_array![0 => Float32x2, 1 => Float32x2, 2 => Float32x4, 3 => Float32x2, 4 => Uint32];
wgpu::vertex_attr_array![0 => Float2, 1 => Float2, 2 => Float4, 3 => Float2, 4 => Uint];
wgpu::VertexBufferLayout { wgpu::VertexBufferLayout {
array_stride: Self::STRIDE, array_stride: Self::STRIDE,
step_mode: wgpu::InputStepMode::Vertex, step_mode: wgpu::InputStepMode::Vertex,
@ -212,7 +211,7 @@ impl UiPipeline {
topology: wgpu::PrimitiveTopology::TriangleList, topology: wgpu::PrimitiveTopology::TriangleList,
strip_index_format: None, strip_index_format: None,
front_face: wgpu::FrontFace::Ccw, front_face: wgpu::FrontFace::Ccw,
cull_mode: wgpu::CullMode::Back, cull_mode: Some(wgpu::Face::Back),
polygon_mode: wgpu::PolygonMode::Fill, polygon_mode: wgpu::PolygonMode::Fill,
}, },
depth_stencil: None, depth_stencil: None,
@ -226,16 +225,18 @@ impl UiPipeline {
entry_point: "main", entry_point: "main",
targets: &[wgpu::ColorTargetState { targets: &[wgpu::ColorTargetState {
format: sc_desc.format, format: sc_desc.format,
color_blend: wgpu::BlendState { blend: Some(wgpu::BlendState {
src_factor: wgpu::BlendFactor::SrcAlpha, color: wgpu::BlendComponent {
dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha, src_factor: wgpu::BlendFactor::SrcAlpha,
operation: wgpu::BlendOperation::Add, dst_factor: wgpu::BlendFactor::OneMinusSrcAlpha,
}, operation: wgpu::BlendOperation::Add,
alpha_blend: wgpu::BlendState { },
src_factor: wgpu::BlendFactor::One, alpha: wgpu::BlendComponent {
dst_factor: wgpu::BlendFactor::One, src_factor: wgpu::BlendFactor::One,
operation: wgpu::BlendOperation::Add, dst_factor: wgpu::BlendFactor::One,
}, operation: wgpu::BlendOperation::Add,
},
}),
write_mask: wgpu::ColorWrite::ALL, write_mask: wgpu::ColorWrite::ALL,
}], }],
}), }),