Revert "Merge branch 'xvar/wgpu-0.9' into 'master'"

This reverts merge request !2566
This commit is contained in:
Joshua Barretto 2021-07-07 22:07:00 +00:00
parent 9333afc6f1
commit ad1f6a5304
5 changed files with 69 additions and 114 deletions

142
Cargo.lock generated
View File

@ -443,9 +443,9 @@ checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631"
[[package]]
name = "bytemuck"
version = "1.7.0"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9966d2ab714d0f785dbac0a0396251a35280aeb42413281617d0209ab4898435"
checksum = "bed57e2090563b83ba8f83366628ce535a7584c9afa4c9fc0612a03925c6df58"
dependencies = [
"bytemuck_derive",
]
@ -1443,29 +1443,19 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]]
name = "drm-fourcc"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebbf3a5ed4671aabffefce172ff43d69c1f27dd2c6aea28e5212a70f32ada0cf"
dependencies = [
"serde",
]
[[package]]
name = "egui"
version = "0.13.1"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77f9b394ccacc0cccb30f6de7371038a116931aa3186acd908b9ec61f405f15c"
checksum = "788148861d80b87d28d64440a3d31cae190e50ccc3ea585597466d38428365d7"
dependencies = [
"epaint",
]
[[package]]
name = "egui_wgpu_backend"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c405dd33ce1a2dc81e6cded24080157da7d95ae6231522c9cce2829cdc974346"
version = "0.8.0"
source = "git+https://github.com/hasenbanck/egui_wgpu_backend.git?rev=63a002c6a9b6c016e45806dd065864431caab621#63a002c6a9b6c016e45806dd065864431caab621"
dependencies = [
"bytemuck",
"epi",
@ -1474,9 +1464,9 @@ dependencies = [
[[package]]
name = "egui_winit_platform"
version = "0.9.0"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "783f6cf2246f553718a0bd28e8dfc3ae331085762020ac993ab2b68f7c2d81ae"
checksum = "cd4cf17c0cd4dbcf2f8fef55a3592b9b7cfd970576c7302d8ba5c521b8560371"
dependencies = [
"egui",
"winit",
@ -1490,9 +1480,9 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "emath"
version = "0.13.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80eea7508c08a7b4e2a041adcdca6f400d8606622c6bb980ecbbdc5f1aff9a4c"
checksum = "3e73d6c8c70eadb71756fbbc3c303ab25e163b46b656886dd250de5636efea12"
[[package]]
name = "encoding_rs"
@ -1552,22 +1542,22 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.13.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "132e30d483d9fa252fe06aa112de777d068503c379fa51bc5834204ee3258fce"
checksum = "80e2db640801230bdda80629bc3a063927a462f5eaf38a98da676954e78ccb99"
dependencies = [
"ab_glyph",
"ahash 0.7.4",
"atomic_refcell",
"emath",
"ordered-float 2.5.1",
"rusttype 0.9.2",
]
[[package]]
name = "epi"
version = "0.13.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b04a4a240553fa9254d0569cf3aa22d9dbe77a66025e1f04b0785744629c9ec"
checksum = "59c4f6cbede1fc8f836384f85295a59199a4825940abcc3a8a29cfe2e3c37583"
dependencies = [
"egui",
]
@ -1606,16 +1596,6 @@ version = "2.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
[[package]]
name = "external-memory"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4dfe8d292b014422776a8c516862d2bff8a81b223a4461dfdc45f3862dc9d39"
dependencies = [
"bitflags",
"drm-fourcc",
]
[[package]]
name = "fallible-iterator"
version = "0.2.0"
@ -1956,9 +1936,8 @@ dependencies = [
[[package]]
name = "gfx-auxil"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1694991b11d642680e82075a75c7c2bd75556b805efa7660b705689f05b1ab1c"
version = "0.9.0"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"fxhash",
"gfx-hal",
@ -1967,15 +1946,13 @@ dependencies = [
[[package]]
name = "gfx-backend-dx11"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f9e453baf3aaef2b0c354ce0b3d63d76402e406a59b64b7182d123cfa6635ae"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"arrayvec",
"bitflags",
"gfx-auxil",
"gfx-hal",
"gfx-renderdoc",
"libloading 0.7.0",
"log",
"parking_lot 0.11.1",
@ -1990,9 +1967,8 @@ dependencies = [
[[package]]
name = "gfx-backend-dx12"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21506399f64a3c4d389182a89a30073856ae33eb712315456b4fd8f39ee7682a"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"arrayvec",
"bit-set",
@ -2000,7 +1976,6 @@ dependencies = [
"d3d12",
"gfx-auxil",
"gfx-hal",
"gfx-renderdoc",
"log",
"parking_lot 0.11.1",
"range-alloc",
@ -2013,9 +1988,8 @@ dependencies = [
[[package]]
name = "gfx-backend-empty"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29c8f813c47791918aa00dc9c9ddf961d23fa8c2a5d869e6cb8ea84f944820f4"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"gfx-hal",
"log",
@ -2024,9 +1998,8 @@ dependencies = [
[[package]]
name = "gfx-backend-gl"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bae057fc3a0ab23ecf97ae51d4017d27d5ddf0aab16ee6dcb58981af88c3152"
version = "0.8.1"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"arrayvec",
"bitflags",
@ -2048,16 +2021,14 @@ dependencies = [
[[package]]
name = "gfx-backend-metal"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0de85808e2a98994c6af925253f8a9593bc57180ef1ea137deab6d35cc949517"
version = "0.8.1"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"arrayvec",
"bitflags",
"block",
"cocoa-foundation",
"copyless",
"core-graphics-types",
"foreign-types",
"fxhash",
"gfx-auxil",
@ -2076,50 +2047,37 @@ dependencies = [
[[package]]
name = "gfx-backend-vulkan"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9861ec855acbbc65c0e4f966d761224886e811dc2c6d413a4776e9293d0e5c0"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"arrayvec",
"ash",
"byteorder",
"core-graphics-types",
"gfx-hal",
"gfx-renderdoc",
"inplace_it",
"libloading 0.7.0",
"log",
"naga",
"objc",
"parking_lot 0.11.1",
"raw-window-handle",
"renderdoc-sys",
"smallvec",
"winapi 0.3.9",
]
[[package]]
name = "gfx-hal"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fbb575ea793dd0507b3082f4f2cde62dc9f3cebd98f5cd49ba2a4da97a976fd"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
dependencies = [
"bitflags",
"external-memory",
"naga",
"raw-window-handle",
"thiserror",
]
[[package]]
name = "gfx-renderdoc"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8027995e247e2426d3a00d13f5191dd56c314bff02dc4b54cbf727f1ba9c40a"
dependencies = [
"libloading 0.7.0",
"log",
"renderdoc-sys",
]
[[package]]
name = "gilrs"
version = "0.8.1"
@ -3050,13 +3008,13 @@ dependencies = [
[[package]]
name = "metal"
version = "0.23.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79d7d769f1c104b8388294d6594d491d2e21240636f5f94d37f8a0f3d7904450"
checksum = "1c12e48c737ee9a55e8bb2352bcde588f79ae308d3529ee888f7cc0f469b5777"
dependencies = [
"bitflags",
"block",
"core-graphics-types",
"cocoa-foundation",
"foreign-types",
"log",
"objc",
@ -3191,9 +3149,8 @@ checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238"
[[package]]
name = "naga"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef670817eef03d356d5a509ea275e7dd3a78ea9e24261ea3cb2dfed1abb08f64"
version = "0.4.0"
source = "git+https://github.com/gfx-rs/naga?tag=gfx-25#057d03ad86f18e3bb3866b20901d8d4e892dd3d6"
dependencies = [
"bit-set",
"bitflags",
@ -4269,8 +4226,7 @@ dependencies = [
[[package]]
name = "range-alloc"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6"
source = "git+https://github.com/gfx-rs/gfx?rev=27a1dae3796d33d23812f2bb8c7e3b5aea18b521#27a1dae3796d33d23812f2bb8c7e3b5aea18b521"
[[package]]
name = "raw-window-handle"
@ -6856,9 +6812,8 @@ dependencies = [
[[package]]
name = "wgpu"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd247f8b26fd3d42ef2f320d378025cd6e84d782ef749fab45cc3b981fbe3275"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/wgpu.git?rev=a92b8549a8e2cb9dac781bafc5ed32828f3caf46#a92b8549a8e2cb9dac781bafc5ed32828f3caf46"
dependencies = [
"arrayvec",
"js-sys",
@ -6877,9 +6832,8 @@ dependencies = [
[[package]]
name = "wgpu-core"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2af5c8acd3ae5781a277cdf65a17f3a7135de5ae782775620e74ea16c9d47770"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/wgpu.git?rev=a92b8549a8e2cb9dac781bafc5ed32828f3caf46#a92b8549a8e2cb9dac781bafc5ed32828f3caf46"
dependencies = [
"arrayvec",
"bitflags",
@ -6909,9 +6863,8 @@ dependencies = [
[[package]]
name = "wgpu-profiler"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab823972ed6859f12ea7a44d130d45a295caf0764668fffdc3934a7f5a66ec26"
version = "0.4.0"
source = "git+https://github.com/Imberflur/wgpu-profiler?tag=wgpu-0.8#b156eb145bc223386ef344860d9b33b3c181650c"
dependencies = [
"futures",
"wgpu",
@ -6919,9 +6872,8 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f5c9678cd533558e28b416d66947b099742df1939307478db54f867137f1b60"
version = "0.8.0"
source = "git+https://github.com/gfx-rs/wgpu.git?rev=a92b8549a8e2cb9dac781bafc5ed32828f3caf46#a92b8549a8e2cb9dac781bafc5ed32828f3caf46"
dependencies = [
"bitflags",
"serde",

View File

@ -134,6 +134,8 @@ nativeBuildInputs = ["pkg-config"]
[patch.crates-io]
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.git", rev = "a92b8549a8e2cb9dac781bafc5ed32828f3caf46" }
# # use the latest fixes in naga (remove when updates trickle down to wgpu-rs)
# naga = { git = "https://github.com/gfx-rs/naga.git", rev = "3a0f0144112ff621dd7f731bf455adf6cab19164" }

View File

@ -51,8 +51,8 @@ voxygen-egui = {package = "veloren-voxygen-egui", path = "egui", optional = true
# Graphics
winit = {version = "0.25.0", features = ["serde"]}
wgpu = { version = "0.9.0", features = ["trace", "cross"] }
wgpu-profiler = "0.5.0"
wgpu = { version = "=0.8.0", features = ["trace", "cross"] }
wgpu-profiler = { git = "https://github.com/Imberflur/wgpu-profiler", tag = "wgpu-0.8" }
bytemuck = { version="1.4", features=["derive"] }
shaderc = "0.6.2"
@ -67,9 +67,9 @@ glyph_brush = "0.7.0"
keyboard-keynames = { git = "https://gitlab.com/Frinksy/keyboard-keynames.git", rev = "9ae8f89014d0b0c5b61d0e821c5aeb6140c5c0dc" }
# EGUI
egui = {version = "0.13", optional = true }
egui_wgpu_backend = { version = "0.10.0", optional = true }
egui_winit_platform = {version = "0.9", optional = true }
egui = {version = "0.12", optional = true }
egui_wgpu_backend = {git = "https://github.com/hasenbanck/egui_wgpu_backend.git", rev = "63a002c6a9b6c016e45806dd065864431caab621", optional = true }
egui_winit_platform = {version = "0.8", optional = true }
# ECS
specs = {git = "https://github.com/amethyst/specs.git", rev = "f985bec5d456f7b0dd8aae99848f9473c2cd9d46"}

View File

@ -11,8 +11,8 @@ be-dyn-lib = []
[dependencies]
client = {package = "veloren-client", path = "../../client"}
common = {package = "veloren-common", path = "../../common"}
egui = "0.13"
egui_winit_platform = "0.9"
egui = "0.12"
egui_winit_platform = "0.8"
voxygen-dynlib = {package = "veloren-voxygen-dynlib", path = "../dynlib", optional = true}
# Hot Reloading

View File

@ -5,20 +5,28 @@ compile_error!("Can't use both \"be-dyn-lib\" and \"use-dyn-lib\" features at on
mod character_states;
use crate::character_states::draw_char_state_group;
use client::{Client, Join, World, WorldExt};
use common::{
comp,
comp::{aura::AuraKind::Buff, Body, Fluid, Poise, PoiseState},
comp::{Poise, PoiseState},
};
use core::mem;
use egui::{
plot::{Line, Plot, Value, Values},
plot::{Plot, Value},
widgets::plot::Curve,
CollapsingHeader, Color32, Grid, Label, ScrollArea, Slider, Ui, Window,
};
fn two_col_row(ui: &mut Ui, label: impl Into<Label>, content: impl Into<Label>) {
ui.label(label);
ui.label(content);
ui.end_row();
}
use crate::character_states::draw_char_state_group;
use common::comp::{aura::AuraKind::Buff, Body, Fluid};
use egui_winit_platform::Platform;
use std::time::Duration;
#[cfg(feature = "use-dyn-lib")]
use {
lazy_static::lazy_static, std::ffi::CStr, std::sync::Arc, std::sync::Mutex,
@ -248,14 +256,13 @@ pub fn maintain_egui_inner(
.default_width(200.0)
.default_height(200.0)
.show(ctx, |ui| {
let line = Line::new(Values::from_values_iter(
let plot = Plot::new("Frame Time").curve(Curve::from_values_iter(
egui_state
.frame_times
.iter()
.enumerate()
.map(|(i, x)| Value::new(i as f64, *x)),
));
let plot = Plot::new("Frame Time").line(line);
ui.add(plot);
});
@ -669,12 +676,6 @@ fn body_species(body: &Body) -> String {
}
}
fn two_col_row(ui: &mut Ui, label: impl Into<Label>, content: impl Into<Label>) {
ui.label(label);
ui.label(content);
ui.end_row();
}
fn poise_state_label(ui: &mut Ui, poise: &Poise) {
match poise.poise_state() {
PoiseState::Normal => {