From f5dc871c5945a2f7d0592a76066c3811141d747d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Wed, 17 Mar 2021 13:56:40 +0000 Subject: [PATCH] Update to the most recent wgpu --- Cargo.lock | 323 +++----------------- Cargo.toml | 7 +- voxygen/Cargo.toml | 2 +- voxygen/src/render/pipelines/clouds.rs | 1 + voxygen/src/render/pipelines/figure.rs | 1 + voxygen/src/render/pipelines/fluid.rs | 1 + voxygen/src/render/pipelines/lod_terrain.rs | 3 +- voxygen/src/render/pipelines/particle.rs | 1 + voxygen/src/render/pipelines/postprocess.rs | 1 + voxygen/src/render/pipelines/shadow.rs | 5 +- voxygen/src/render/pipelines/skybox.rs | 1 + voxygen/src/render/pipelines/sprite.rs | 1 + voxygen/src/render/pipelines/terrain.rs | 1 + voxygen/src/render/pipelines/ui.rs | 1 + voxygen/src/render/renderer.rs | 12 +- voxygen/src/render/renderer/drawer.rs | 5 +- voxygen/src/render/texture.rs | 14 +- voxygen/src/scene/terrain.rs | 2 +- 18 files changed, 81 insertions(+), 301 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8862695e9..5f64f9f72b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1210,16 +1210,6 @@ dependencies = [ "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]] name = "d3d12" version = "0.3.2" @@ -1873,16 +1863,6 @@ dependencies = [ "wasi 0.10.2+wasi-snapshot-preview1", ] -[[package]] -name = "gfx-auxil" -version = "0.8.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "fxhash", - "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "spirv_cross", -] - [[package]] name = "gfx-auxil" version = "0.8.0" @@ -1890,31 +1870,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7b33ecf067f2117668d91c9b0f2e5f223ebd1ffec314caa2f3de27bb580186d" dependencies = [ "fxhash", - "gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-hal", "spirv_cross", ] -[[package]] -name = "gfx-backend-dx11" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "arrayvec", - "bitflags", - "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)", - "libloading 0.7.0", - "log", - "parking_lot 0.11.1", - "range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "raw-window-handle", - "smallvec", - "spirv_cross", - "thunderdome", - "winapi 0.3.9", - "wio", -] - [[package]] name = "gfx-backend-dx11" version = "0.7.0" @@ -1923,12 +1882,12 @@ checksum = "f851d03c2e8f117e3702bf41201a4fafa447d5cb1276d5375870ae7573d069dd" dependencies = [ "arrayvec", "bitflags", - "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-auxil", + "gfx-hal", "libloading 0.6.7", "log", "parking_lot 0.11.1", - "range-alloc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "range-alloc", "raw-window-handle", "smallvec", "spirv_cross", @@ -1937,26 +1896,6 @@ dependencies = [ "wio", ] -[[package]] -name = "gfx-backend-dx12" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "arrayvec", - "bit-set", - "bitflags", - "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=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "log", - "parking_lot 0.11.1", - "range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "raw-window-handle", - "smallvec", - "spirv_cross", - "winapi 0.3.9", -] - [[package]] name = "gfx-backend-dx12" version = "0.7.1" @@ -1966,12 +1905,12 @@ dependencies = [ "arrayvec", "bit-set", "bitflags", - "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-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "d3d12", + "gfx-auxil", + "gfx-hal", "log", "parking_lot 0.11.1", - "range-alloc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "range-alloc", "raw-window-handle", "smallvec", "spirv_cross", @@ -1979,50 +1918,17 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "gfx-backend-empty" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "log", - "raw-window-handle", -] - [[package]] name = "gfx-backend-empty" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f07ef26a65954cfdd7b4c587f485100d1bb3b0bd6a51b02d817d6c87cca7a91" dependencies = [ - "gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-hal", "log", "raw-window-handle", ] -[[package]] -name = "gfx-backend-gl" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "arrayvec", - "bitflags", - "fxhash", - "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", - "js-sys", - "khronos-egl 4.1.0", - "libloading 0.7.0", - "log", - "naga 0.3.1", - "parking_lot 0.11.1", - "raw-window-handle", - "spirv_cross", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "gfx-backend-gl" version = "0.7.1" @@ -2031,14 +1937,14 @@ checksum = "c6717c50ab601efe4a669bfb44db615e3888695ac8263222aeaa702642b9fbc2" dependencies = [ "arrayvec", "bitflags", - "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-auxil", + "gfx-hal", "glow", "js-sys", - "khronos-egl 3.0.2", + "khronos-egl", "libloading 0.6.7", "log", - "naga 0.3.2", + "naga", "parking_lot 0.11.1", "raw-window-handle", "spirv_cross", @@ -2046,31 +1952,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "gfx-backend-metal" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "arrayvec", - "bitflags", - "block", - "cocoa-foundation", - "copyless", - "foreign-types", - "fxhash", - "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", - "metal 0.21.0 (git+https://github.com/gfx-rs/metal-rs?rev=439c986eb7a9b91e88b61def2daa66e4043fcbef)", - "naga 0.3.1", - "objc", - "parking_lot 0.11.1", - "range-alloc 0.1.2 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "raw-window-handle", - "spirv_cross", - "storage-map", -] - [[package]] name = "gfx-backend-metal" version = "0.7.0" @@ -2083,39 +1964,19 @@ dependencies = [ "cocoa-foundation", "copyless", "foreign-types", - "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-auxil", + "gfx-hal", "log", - "metal 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", - "naga 0.3.2", + "metal", + "naga", "objc", "parking_lot 0.11.1", - "range-alloc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "range-alloc", "raw-window-handle", "spirv_cross", "storage-map", ] -[[package]] -name = "gfx-backend-vulkan" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "arrayvec", - "ash", - "byteorder", - "core-graphics-types", - "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "inplace_it", - "log", - "naga 0.3.1", - "objc", - "parking_lot 0.11.1", - "raw-window-handle", - "smallvec", - "winapi 0.3.9", -] - [[package]] name = "gfx-backend-vulkan" version = "0.7.0" @@ -2126,10 +1987,10 @@ dependencies = [ "ash", "byteorder", "core-graphics-types", - "gfx-hal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "gfx-hal", "inplace_it", "log", - "naga 0.3.2", + "naga", "objc", "parking_lot 0.11.1", "raw-window-handle", @@ -2137,17 +1998,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "gfx-hal" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" -dependencies = [ - "bitflags", - "naga 0.3.1", - "raw-window-handle", - "thiserror", -] - [[package]] name = "gfx-hal" version = "0.7.0" @@ -2155,7 +2005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1d9cc8d3b573dda62d0baca4f02e0209786e22c562caff001d77c389008781d" dependencies = [ "bitflags", - "naga 0.3.2", + "naga", "raw-window-handle", "thiserror", ] @@ -2796,16 +2646,6 @@ dependencies = [ "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]] name = "lazy-bytes-cast" version = "5.0.1" @@ -3080,19 +2920,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "metal" -version = "0.21.0" -source = "git+https://github.com/gfx-rs/metal-rs?rev=439c986eb7a9b91e88b61def2daa66e4043fcbef#439c986eb7a9b91e88b61def2daa66e4043fcbef" -dependencies = [ - "bitflags", - "block", - "cocoa-foundation", - "foreign-types", - "log", - "objc", -] - [[package]] name = "metal" version = "0.21.0" @@ -3222,21 +3049,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" -[[package]] -name = "naga" -version = "0.3.1" -source = "git+https://github.com/gfx-rs/naga?tag=gfx-12#fa7d4d8b51d4eeffe9f648d285466637f733a4a1" -dependencies = [ - "bit-set", - "bitflags", - "fxhash", - "log", - "num-traits", - "petgraph 0.5.1", - "spirv_headers", - "thiserror", -] - [[package]] name = "naga" version = "0.3.2" @@ -4324,11 +4136,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "range-alloc" -version = "0.1.2" -source = "git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8#0a201d1c406b5119ec11068293a40e50ec0be4c8" - [[package]] name = "range-alloc" version = "0.1.2" @@ -6221,7 +6028,7 @@ dependencies = [ "veloren-server", "veloren-voxygen-anim", "veloren-world", - "wgpu 0.7.0", + "wgpu", "wgpu-profiler", "window_clipboard 0.2.0", "winit", @@ -6795,25 +6602,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "wgpu" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/wgpu-rs.git?rev=fd4a9925334264725fda5c5d82fa16d7f8aaaa24#fd4a9925334264725fda5c5d82fa16d7f8aaaa24" -dependencies = [ - "arrayvec", - "js-sys", - "naga 0.3.1", - "parking_lot 0.11.1", - "raw-window-handle", - "smallvec", - "tracing", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "wgpu-core 0.7.0", - "wgpu-types 0.7.0 (git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3)", -] - [[package]] name = "wgpu" version = "0.7.1" @@ -6822,7 +6610,7 @@ checksum = "79a0a0a63fac9492cfaf6e7e4bdf9729c128f1e94124b9e4cbc4004b8cb6d1d8" dependencies = [ "arrayvec", "js-sys", - "naga 0.3.2", + "naga", "parking_lot 0.11.1", "raw-window-handle", "smallvec", @@ -6831,36 +6619,8 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core 0.7.1", - "wgpu-types 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "wgpu-core" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3#ecbddedfaf67299bc2c507f69d138b2c3e3226b3" -dependencies = [ - "arrayvec", - "bitflags", - "cfg_aliases", - "copyless", - "fxhash", - "gfx-backend-dx11 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "gfx-backend-dx12 0.7.0", - "gfx-backend-empty 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "gfx-backend-gl 0.7.0", - "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=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "gfx-hal 0.7.0 (git+https://github.com/gfx-rs/gfx?rev=0a201d1c406b5119ec11068293a40e50ec0be4c8)", - "gpu-alloc", - "gpu-descriptor", - "naga 0.3.1", - "parking_lot 0.11.1", - "raw-window-handle", - "smallvec", - "thiserror", - "tracing", - "wgpu-types 0.7.0 (git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3)", + "wgpu-core", + "wgpu-types", ] [[package]] @@ -6874,22 +6634,22 @@ dependencies = [ "cfg_aliases", "copyless", "fxhash", - "gfx-backend-dx11 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-backend-dx12 0.7.1", - "gfx-backend-empty 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-backend-gl 0.7.1", - "gfx-backend-metal 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gfx-backend-vulkan 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)", + "gfx-backend-dx11", + "gfx-backend-dx12", + "gfx-backend-empty", + "gfx-backend-gl", + "gfx-backend-metal", + "gfx-backend-vulkan", + "gfx-hal", "gpu-alloc", "gpu-descriptor", - "naga 0.3.2", + "naga", "parking_lot 0.11.1", "raw-window-handle", "smallvec", "thiserror", "tracing", - "wgpu-types 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wgpu-types", ] [[package]] @@ -6899,15 +6659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98580e756637420f660385d6ec86e97080b588325daa3326d0229b39307d5aa3" dependencies = [ "futures", - "wgpu 0.7.1", -] - -[[package]] -name = "wgpu-types" -version = "0.7.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=ecbddedfaf67299bc2c507f69d138b2c3e3226b3#ecbddedfaf67299bc2c507f69d138b2c3e3226b3" -dependencies = [ - "bitflags", + "wgpu", ] [[package]] @@ -7192,3 +6944,8 @@ checksum = "0de7bff972b4f2a06c85f6d8454b09df153af7e3a4ec2aac81db1b105b684ddb" dependencies = [ "chrono", ] + +[[patch.unused]] +name = "wgpu" +version = "0.7.0" +source = "git+https://github.com/gfx-rs/wgpu-rs.git?rev=a7e03546c1584cefef5b926f923108ea2cd1c146#a7e03546c1584cefef5b926f923108ea2cd1c146" diff --git a/Cargo.toml b/Cargo.toml index c4a7b4cfce..0a88868bdb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -114,4 +114,9 @@ nativeBuildInputs = ["pkg-config"] winit = { git = "https://gitlab.com/veloren/winit.git", branch = "macos-test-spiffed" } vek = { git = "https://gitlab.com/veloren/vek.git", branch = "fix_intrinsics2" } # patch wgpu so we can use wgpu-profiler crate -wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "fd4a9925334264725fda5c5d82fa16d7f8aaaa24" } +wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "a7e03546c1584cefef5b926f923108ea2cd1c146" } + +# Uncomment this to use a local fork of wgpu (for testing purposes) +# [patch.'https://github.com/gfx-rs/wgpu'] +# wgpu-core = { path = "../wgpu/wgpu-core" } +# wgpu-types = { path = "../wgpu/wgpu-types" } \ No newline at end of file diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index cf604d61a8..ea3f21b43d 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -45,7 +45,7 @@ i18n = {package = "veloren-i18n", path = "i18n"} # Graphics winit = {version = "0.24.0", features = ["serde"]} -wgpu = { git = "https://github.com/gfx-rs/wgpu-rs.git", rev = "fd4a9925334264725fda5c5d82fa16d7f8aaaa24" } +wgpu = "0.7.0" wgpu-profiler = "0.2.1" bytemuck = { version="1.4", features=["derive"] } shaderc = "0.6.2" diff --git a/voxygen/src/render/pipelines/clouds.rs b/voxygen/src/render/pipelines/clouds.rs index b605f23819..f304a293d1 100644 --- a/voxygen/src/render/pipelines/clouds.rs +++ b/voxygen/src/render/pipelines/clouds.rs @@ -183,6 +183,7 @@ impl CloudsPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: None, polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: None, multisample: wgpu::MultisampleState { diff --git a/voxygen/src/render/pipelines/figure.rs b/voxygen/src/render/pipelines/figure.rs index 1a18976010..1d808db6c0 100644 --- a/voxygen/src/render/pipelines/figure.rs +++ b/voxygen/src/render/pipelines/figure.rs @@ -213,6 +213,7 @@ impl FigurePipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/fluid.rs b/voxygen/src/render/pipelines/fluid.rs index 0624e90978..8d60de7729 100644 --- a/voxygen/src/render/pipelines/fluid.rs +++ b/voxygen/src/render/pipelines/fluid.rs @@ -156,6 +156,7 @@ impl FluidPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: None, polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/lod_terrain.rs b/voxygen/src/render/pipelines/lod_terrain.rs index 5d18ea8c02..edc891d2bf 100644 --- a/voxygen/src/render/pipelines/lod_terrain.rs +++ b/voxygen/src/render/pipelines/lod_terrain.rs @@ -73,7 +73,7 @@ impl LodData { size: wgpu::Extent3d { width: map_size.x, height: map_size.y, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: 1, sample_count: 1, @@ -185,6 +185,7 @@ impl LodTerrainPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/particle.rs b/voxygen/src/render/pipelines/particle.rs index d7c703c964..c89de1e476 100644 --- a/voxygen/src/render/pipelines/particle.rs +++ b/voxygen/src/render/pipelines/particle.rs @@ -212,6 +212,7 @@ impl ParticlePipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/postprocess.rs b/voxygen/src/render/pipelines/postprocess.rs index d3a1c92c7c..2f28621395 100644 --- a/voxygen/src/render/pipelines/postprocess.rs +++ b/voxygen/src/render/pipelines/postprocess.rs @@ -137,6 +137,7 @@ impl PostProcessPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: None, polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: None, multisample: wgpu::MultisampleState { diff --git a/voxygen/src/render/pipelines/shadow.rs b/voxygen/src/render/pipelines/shadow.rs index 4bf8e23214..c5924bf7de 100644 --- a/voxygen/src/render/pipelines/shadow.rs +++ b/voxygen/src/render/pipelines/shadow.rs @@ -84,7 +84,7 @@ pub fn create_col_lights( size: wgpu::Extent3d { width: col_lights_size.x, height: col_lights_size.y, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: 1, sample_count: 1, @@ -168,6 +168,7 @@ impl ShadowFigurePipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Front), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth24Plus, @@ -242,6 +243,7 @@ impl ShadowPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Front), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth24Plus, @@ -318,6 +320,7 @@ impl PointShadowPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth24Plus, diff --git a/voxygen/src/render/pipelines/skybox.rs b/voxygen/src/render/pipelines/skybox.rs index 83de768459..794a8612e6 100644 --- a/voxygen/src/render/pipelines/skybox.rs +++ b/voxygen/src/render/pipelines/skybox.rs @@ -70,6 +70,7 @@ impl SkyboxPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/sprite.rs b/voxygen/src/render/pipelines/sprite.rs index 91cfebede8..b57fae6aed 100644 --- a/voxygen/src/render/pipelines/sprite.rs +++ b/voxygen/src/render/pipelines/sprite.rs @@ -321,6 +321,7 @@ impl SpritePipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/terrain.rs b/voxygen/src/render/pipelines/terrain.rs index bc25d1c4b2..ff434f5a1b 100644 --- a/voxygen/src/render/pipelines/terrain.rs +++ b/voxygen/src/render/pipelines/terrain.rs @@ -250,6 +250,7 @@ impl TerrainPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: Some(wgpu::DepthStencilState { format: wgpu::TextureFormat::Depth32Float, diff --git a/voxygen/src/render/pipelines/ui.rs b/voxygen/src/render/pipelines/ui.rs index 90beee96e4..b5181a3433 100644 --- a/voxygen/src/render/pipelines/ui.rs +++ b/voxygen/src/render/pipelines/ui.rs @@ -214,6 +214,7 @@ impl UiPipeline { front_face: wgpu::FrontFace::Ccw, cull_mode: Some(wgpu::Face::Back), polygon_mode: wgpu::PolygonMode::Fill, + conservative: false, }, depth_stencil: None, multisample: wgpu::MultisampleState { diff --git a/voxygen/src/render/renderer.rs b/voxygen/src/render/renderer.rs index 98e9c30b06..dc9a5a4549 100644 --- a/voxygen/src/render/renderer.rs +++ b/voxygen/src/render/renderer.rs @@ -466,7 +466,7 @@ impl Renderer { size: wgpu::Extent3d { width, height, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: levels, sample_count, @@ -496,7 +496,7 @@ impl Renderer { size: wgpu::Extent3d { width, height, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: levels, sample_count, @@ -520,7 +520,7 @@ impl Renderer { size: wgpu::Extent3d { width: size.0, height: size.1, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: levels, sample_count, @@ -555,7 +555,7 @@ impl Renderer { size: wgpu::Extent3d { width: 4, height: 4, - depth, + depth_or_array_layers: depth, }, mip_level_count: 1, sample_count: 1, @@ -681,7 +681,7 @@ impl Renderer { size: wgpu::Extent3d { width: diag_two_size / 4, height: diag_two_size / 4, - depth: 6, + depth_or_array_layers: 6, }, mip_level_count: levels, sample_count: 1, @@ -707,7 +707,7 @@ impl Renderer { size: wgpu::Extent3d { width: diag_two_size, height: diag_two_size, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: levels, sample_count: 1, diff --git a/voxygen/src/render/renderer/drawer.rs b/voxygen/src/render/renderer/drawer.rs index 059408f573..29791bed18 100644 --- a/voxygen/src/render/renderer/drawer.rs +++ b/voxygen/src/render/renderer/drawer.rs @@ -713,11 +713,12 @@ impl<'pass_ref, 'pass: 'pass_ref> PreparedUiDrawer<'pass_ref, 'pass> { pub fn set_scissor<'data: 'pass>(&mut self, scissor: Aabr) { let Aabr { min, max } = scissor; + dbg!(&scissor); self.render_pass.set_scissor_rect( min.x as u32, min.y as u32, - (max.x - min.x) as u32, - (max.y - min.y) as u32, + dbg!((max.x - min.x) as u32), + dbg!((max.y - min.y) as u32), ); } diff --git a/voxygen/src/render/texture.rs b/voxygen/src/render/texture.rs index 2429695e7e..b55606ea60 100644 --- a/voxygen/src/render/texture.rs +++ b/voxygen/src/render/texture.rs @@ -43,7 +43,7 @@ impl Texture { let size = Extent3d { width: image.width(), height: image.height(), - depth: 1, + depth_or_array_layers: 1, }; let tex = device.create_texture(&wgpu::TextureDescriptor { @@ -74,7 +74,7 @@ impl Texture { wgpu::Extent3d { width: image.width(), height: image.height(), - depth: 1, + depth_or_array_layers: 1, }, ); @@ -112,7 +112,7 @@ impl Texture { let size = wgpu::Extent3d { width, height, - depth: 1, + depth_or_array_layers: 1, }; let tex_info = wgpu::TextureDescriptor { @@ -201,13 +201,17 @@ impl Texture { wgpu::Extent3d { width: size[0], height: size[1], - depth: 1, + depth_or_array_layers: 1, }, ); } /// Get dimensions of the represented image. pub fn get_dimensions(&self) -> vek::Vec3 { - vek::Vec3::new(self.size.width, self.size.height, self.size.depth) + vek::Vec3::new( + self.size.width, + self.size.height, + self.size.depth_or_array_layers, + ) } } diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index 7f75e01fb4..fc2abad223 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -602,7 +602,7 @@ impl Terrain { size: wgpu::Extent3d { width: max_texture_size, height: max_texture_size, - depth: 1, + depth_or_array_layers: 1, }, mip_level_count: 1, sample_count: 1,