Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling wgpu-hello-world v0.1.0 (/home/vboxuser/Downloads/wgpu-hello-world-play-gltf-r2)
- warning: unused import: `iter`
- --> src/lib.rs:1:11
- |
- 1 | use std::{iter, time::Instant};
- | ^^^^
- |
- = note: `#[warn(unused_imports)]` on by default
- warning: unused import: `wgpu::util::DeviceExt`
- --> src/lib.rs:7:5
- |
- 7 | use wgpu::util::DeviceExt;
- | ^^^^^^^^^^^^^^^^^^^^^
- warning: unused imports: `ControlFlow` and `EventLoop`
- --> src/lib.rs:11:18
- |
- 11 | event_loop::{ControlFlow, EventLoop},
- | ^^^^^^^^^^^ ^^^^^^^^^
- warning: unused import: `Point3`
- --> src/camera.rs:1:26
- |
- 1 | use cgmath::{prelude::*, Point3};
- | ^^^^^^
- warning: unused import: `texture`
- --> src/context.rs:1:13
- |
- 1 | use crate::{texture, window::Window};
- | ^^^^^^^
- warning: unused import: `model::Model`
- --> src/pass/mod.rs:3:13
- |
- 3 | use crate::{model::Model, node::Node};
- | ^^^^^^^^^^^^
- warning: unused import: `iter`
- --> src/pass/phong.rs:1:33
- |
- 1 | use std::{collections::HashMap, iter, mem};
- | ^^^^
- warning: unused imports: `InnerSpace`, `Rotation3`, and `Zero`
- --> src/pass/phong.rs:3:14
- |
- 3 | use cgmath::{InnerSpace, Rotation3, Zero};
- | ^^^^^^^^^^ ^^^^^^^^^ ^^^^
- warning: unused imports: `Model` and `context::create_render_pipeline`
- --> src/pass/phong.rs:8:5
- |
- 8 | context::create_render_pipeline,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 9 | instance::{Instance, InstanceRaw},
- 10 | model::{self, DrawLight, DrawModel, Model, Vertex},
- | ^^^^^
- warning: unnecessary parentheses around `if` condition
- --> src/pass/phong.rs:384:16
- |
- 384 | if (self.uniform_pool.buffers.len() < nodes.len()) {
- | ^ ^
- |
- = note: `#[warn(unused_parens)]` on by default
- help: remove these parentheses
- |
- 384 - if (self.uniform_pool.buffers.len() < nodes.len()) {
- 384 + if self.uniform_pool.buffers.len() < nodes.len() {
- |
- warning: unused imports: `Material`, `Vertex`, and `texture::Texture`
- --> src/primitives/mod.rs:2:19
- |
- 2 | model::{self, Material, ModelVertex},
- | ^^^^^^^^
- 3 | resources::load_texture,
- 4 | texture::Texture,
- | ^^^^^^^^^^^^^^^^
- 5 | Vertex,
- | ^^^^^^
- warning: unused import: `std::ops::Range`
- --> src/primitives/mod.rs:7:5
- |
- 7 | use std::ops::Range;
- | ^^^^^^^^^^^^^^^
- warning: unused import: `EventLoopWindowTarget`
- --> src/window.rs:4:42
- |
- 4 | event_loop::{ControlFlow, EventLoop, EventLoopWindowTarget},
- | ^^^^^^^^^^^^^^^^^^^^^
- warning: unused imports: `CameraUniform` and `context::create_render_pipeline`
- --> src/lib.rs:28:40
- |
- 28 | camera::{Camera, CameraController, CameraUniform},
- | ^^^^^^^^^^^^^
- 29 | context::create_render_pipeline,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- warning: unused import: `InstanceRaw`
- --> src/lib.rs:36:26
- |
- 36 | instance::{Instance, InstanceRaw},
- | ^^^^^^^^^^^
- warning: unused imports: `DrawLight` and `DrawModel`
- --> src/lib.rs:39:13
- |
- 39 | use model::{DrawLight, DrawModel, Vertex};
- | ^^^^^^^^^ ^^^^^^^^^
- warning: unused variable: `plane_primitive`
- --> src/lib.rs:108:13
- |
- 108 | let plane_primitive = PrimitiveMesh::new(
- | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_plane_primitive`
- |
- = note: `#[warn(unused_variables)]` on by default
- warning: unused variable: `other`
- --> src/resources.rs:221:21
- |
- 221 | other => {
- | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other`
- warning: unused variable: `base_color_texture`
- --> src/resources.rs:246:13
- |
- 246 | let base_color_texture = &pbr.base_color_texture();
- | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_base_color_texture`
- warning: unused variable: `mime_type`
- --> src/resources.rs:257:47
- |
- 257 | gltf::image::Source::View { view, mime_type } => {
- | ^^^^^^^^^ help: try ignoring the field: `mime_type: _`
- warning: unused variable: `mime_type`
- --> src/resources.rs:271:45
- |
- 271 | gltf::image::Source::Uri { uri, mime_type } => {
- | ^^^^^^^^^ help: try ignoring the field: `mime_type: _`
- warning: unused variable: `err`
- --> src/lib.rs:484:21
- |
- 484 | Err(err) => println!("Error in rendering"),
- | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
- warning: unused variable: `device_id`
- --> src/camera.rs:159:9
- |
- 159 | device_id: &DeviceId,
- | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_device_id`
- warning: unused variable: `forward_mag`
- --> src/camera.rs:192:13
- |
- 192 | let forward_mag = forward.magnitude();
- | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_forward_mag`
- warning: unused variable: `material`
- --> src/model.rs:115:9
- |
- 115 | material: &'b Material,
- | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_material`
- warning: unused variable: `color_format`
- --> src/pass/phong.rs:244:13
- |
- 244 | let color_format = texture::Texture::DEPTH_FORMAT;
- | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_format`
- warning: unused variable: `queue`
- --> src/pass/phong.rs:84:9
- |
- 84 | queue: &wgpu::Queue,
- | ^^^^^ help: if this is intentional, prefix it with an underscore: `_queue`
- warning: unused variable: `sampler`
- --> src/texture.rs:36:13
- |
- 36 | let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
- | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler`
- warning: unused variable: `sampler`
- --> src/texture.rs:105:13
- |
- 105 | let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
- | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler`
- warning: unused variable: `err`
- --> src/lib.rs:432:17
- |
- 432 | Err(err) => println!("Error in rendering"),
- | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
- warning: field `clear_color` is never read
- --> src/lib.rs:47:5
- |
- 41 | struct State {
- | ----- field in this struct
- ...
- 47 | clear_color: wgpu::Color,
- | ^^^^^^^^^^^
- |
- = note: `#[warn(dead_code)]` on by default
- warning: function `create_render_pipeline` is never used
- --> src/context.rs:69:8
- |
- 69 | pub fn create_render_pipeline(
- | ^^^^^^^^^^^^^^^^^^^^^^
- warning: field `name` is never read
- --> src/model.rs:45:9
- |
- 44 | pub struct Material {
- | -------- field in this struct
- 45 | pub name: String,
- | ^^^^
- warning: field `name` is never read
- --> src/model.rs:51:9
- |
- 50 | pub struct Mesh {
- | ---- field in this struct
- 51 | pub name: String,
- | ^^^^
- warning: field `name` is never read
- --> src/model.rs:64:9
- |
- 63 | pub struct AnimationClip {
- | ------------- field in this struct
- 64 | pub name: String,
- | ^^^^
- warning: methods `draw_mesh` and `draw_model` are never used
- --> src/model.rs:76:8
- |
- 75 | pub trait DrawModel<'a> {
- | --------- methods in this trait
- 76 | fn draw_mesh(
- | ^^^^^^^^^
- ...
- 90 | fn draw_model(&mut self, model: &'a Model, local_bind_group: &'a wgpu::BindGroup);
- | ^^^^^^^^^^
- warning: method `draw_light_mesh` is never used
- --> src/model.rs:143:8
- |
- 142 | pub trait DrawLight<'a> {
- | --------- method in this trait
- 143 | fn draw_light_mesh(
- | ^^^^^^^^^^^^^^^
- warning: field `parent` is never read
- --> src/node.rs:7:9
- |
- 5 | pub struct Node {
- | ---- field in this struct
- 6 | // ID of parent Node
- 7 | pub parent: u32,
- | ^^^^^^
- warning: fields `max_lights` and `ambient` are never read
- --> src/pass/phong.rs:51:9
- |
- 50 | pub struct PhongConfig {
- | ----------- fields in this struct
- 51 | pub max_lights: usize,
- | ^^^^^^^^^^
- 52 | pub ambient: [u32; 4],
- | ^^^^^^^
- warning: field `global_bind_group_layout` is never read
- --> src/pass/phong.rs:58:9
- |
- 56 | pub struct PhongPass {
- | --------- field in this struct
- 57 | // Uniforms
- 58 | pub global_bind_group_layout: BindGroupLayout,
- | ^^^^^^^^^^^^^^^^^^^^^^^^
- warning: field `texture` is never read
- --> src/texture.rs:7:9
- |
- 6 | pub struct Texture {
- | ------- field in this struct
- 7 | pub texture: wgpu::Texture,
- | ^^^^^^^
- warning: unused borrow that must be used
- --> src/lib.rs:416:13
- |
- 416 | / &self
- 417 | | .pass
- 418 | | .uniform_pool
- 419 | | .update_uniform(node_index, node.locals, &self.ctx.queue);
- | |_________________________________________________________________________^ the borrow produces a value
- |
- = note: `#[warn(unused_must_use)]` on by default
- help: use `let _ = ...` to ignore the resulting value
- |
- 416 | let _ = &self
- | +++++++
- warning: `wgpu-hello-world` (lib) generated 42 warnings (run `cargo fix --lib -p wgpu-hello-world` to apply 16 suggestions)
- Finished `dev` profile [unoptimized + debuginfo] target(s) in 37.55s
- warning: the following packages contain code that will be rejected by a future version of Rust: fs_extra v1.2.0
- note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
- Running `target/debug/wgpu-hello-world`
- thread 'main' panicked at core/src/panicking.rs:221:5:
- unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`
- stack backtrace:
- 0: rust_begin_unwind
- at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
- 1: core::panicking::panic_nounwind_fmt::runtime
- at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:112:18
- 2: core::panicking::panic_nounwind_fmt
- at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:122:5
- 3: core::panicking::panic_nounwind
- at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:221:5
- 4: core::slice::raw::from_raw_parts::precondition_check
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ub_checks.rs:70:21
- 5: core::slice::raw::from_raw_parts
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ub_checks.rs:77:17
- 6: freetype::bitmap::Bitmap::buffer
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/freetype-rs-0.26.0/src/bitmap.rs:67:13
- 7: crossfont::ft::FreeTypeRasterizer::normalize_buffer
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossfont-0.5.0/src/ft/mod.rs:491:19
- 8: <crossfont::ft::FreeTypeRasterizer as crossfont::Rasterize>::get_glyph
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossfont-0.5.0/src/ft/mod.rs:255:13
- 9: sctk_adwaita::title::crossfont_renderer::CrossfontTitleText::rerender::{{closure}}
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title/crossfont_renderer.rs:124:17
- 10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:294:13
- 11: core::iter::traits::iterator::Iterator::find_map::check::{{closure}}
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2903:32
- 12: core::iter::traits::iterator::Iterator::try_fold
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2406:21
- 13: core::iter::traits::iterator::Iterator::find_map
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2909:9
- 14: <core::iter::adapters::filter_map::FilterMap<I,F> as core::iter::traits::iterator::Iterator>::next
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter_map.rs:64:9
- 15: alloc::vec::Vec<T,A>::extend_desugared
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3492:35
- 16: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:17:9
- 17: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs:41:9
- 18: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs:33:9
- 19: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3388:9
- 20: core::iter::traits::iterator::Iterator::collect
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2001:9
- 21: sctk_adwaita::title::crossfont_renderer::CrossfontTitleText::rerender
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title/crossfont_renderer.rs:114:30
- 22: sctk_adwaita::title::crossfont_renderer::CrossfontTitleText::update_title
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title/crossfont_renderer.rs:102:13
- 23: sctk_adwaita::title::TitleText::update_title
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title.rs:36:9
- 24: <sctk_adwaita::AdwaitaFrame as smithay_client_toolkit::window::Frame>::set_title
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/lib.rs:351:13
- 25: smithay_client_toolkit::window::Window<F>::set_title
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.16.0/src/window/mod.rs:471:9
- 26: winit::platform_impl::platform::wayland::window::Window::new
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.3/src/platform_impl/linux/wayland/window/mod.rs:216:9
- 27: winit::platform_impl::platform::Window::new
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.3/src/platform_impl/linux/mod.rs:317:17
- 28: winit::window::WindowBuilder::build
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.3/src/window.rs:349:9
- 29: wgpu_hello_world::window::Window::new
- at ./src/window.rs:37:22
- 30: wgpu_hello_world::run::{{closure}}
- at ./src/lib.rs:451:18
- 31: pollster::block_on
- at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.2.5/src/lib.rs:125:15
- 32: wgpu_hello_world::main
- at ./src/main.rs:4:5
- 33: core::ops::function::FnOnce::call_once
- at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
- note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
- thread caused non-unwinding panic. aborting.
- * Terminal will be reused by tasks, press any key to close it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement