Advertisement
Guest User

Untitled

a guest
Dec 8th, 2024
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.91 KB | None | 0 0
  1. Compiling wgpu-hello-world v0.1.0 (/home/vboxuser/Downloads/wgpu-hello-world-play-gltf-r2)
  2. warning: unused import: `iter`
  3. --> src/lib.rs:1:11
  4. |
  5. 1 | use std::{iter, time::Instant};
  6. | ^^^^
  7. |
  8. = note: `#[warn(unused_imports)]` on by default
  9.  
  10. warning: unused import: `wgpu::util::DeviceExt`
  11. --> src/lib.rs:7:5
  12. |
  13. 7 | use wgpu::util::DeviceExt;
  14. | ^^^^^^^^^^^^^^^^^^^^^
  15.  
  16. warning: unused imports: `ControlFlow` and `EventLoop`
  17. --> src/lib.rs:11:18
  18. |
  19. 11 | event_loop::{ControlFlow, EventLoop},
  20. | ^^^^^^^^^^^ ^^^^^^^^^
  21.  
  22. warning: unused import: `Point3`
  23. --> src/camera.rs:1:26
  24. |
  25. 1 | use cgmath::{prelude::*, Point3};
  26. | ^^^^^^
  27.  
  28. warning: unused import: `texture`
  29. --> src/context.rs:1:13
  30. |
  31. 1 | use crate::{texture, window::Window};
  32. | ^^^^^^^
  33.  
  34. warning: unused import: `model::Model`
  35. --> src/pass/mod.rs:3:13
  36. |
  37. 3 | use crate::{model::Model, node::Node};
  38. | ^^^^^^^^^^^^
  39.  
  40. warning: unused import: `iter`
  41. --> src/pass/phong.rs:1:33
  42. |
  43. 1 | use std::{collections::HashMap, iter, mem};
  44. | ^^^^
  45.  
  46. warning: unused imports: `InnerSpace`, `Rotation3`, and `Zero`
  47. --> src/pass/phong.rs:3:14
  48. |
  49. 3 | use cgmath::{InnerSpace, Rotation3, Zero};
  50. | ^^^^^^^^^^ ^^^^^^^^^ ^^^^
  51.  
  52. warning: unused imports: `Model` and `context::create_render_pipeline`
  53. --> src/pass/phong.rs:8:5
  54. |
  55. 8 | context::create_render_pipeline,
  56. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  57. 9 | instance::{Instance, InstanceRaw},
  58. 10 | model::{self, DrawLight, DrawModel, Model, Vertex},
  59. | ^^^^^
  60.  
  61. warning: unnecessary parentheses around `if` condition
  62. --> src/pass/phong.rs:384:16
  63. |
  64. 384 | if (self.uniform_pool.buffers.len() < nodes.len()) {
  65. | ^ ^
  66. |
  67. = note: `#[warn(unused_parens)]` on by default
  68. help: remove these parentheses
  69. |
  70. 384 - if (self.uniform_pool.buffers.len() < nodes.len()) {
  71. 384 + if self.uniform_pool.buffers.len() < nodes.len() {
  72. |
  73.  
  74. warning: unused imports: `Material`, `Vertex`, and `texture::Texture`
  75. --> src/primitives/mod.rs:2:19
  76. |
  77. 2 | model::{self, Material, ModelVertex},
  78. | ^^^^^^^^
  79. 3 | resources::load_texture,
  80. 4 | texture::Texture,
  81. | ^^^^^^^^^^^^^^^^
  82. 5 | Vertex,
  83. | ^^^^^^
  84.  
  85. warning: unused import: `std::ops::Range`
  86. --> src/primitives/mod.rs:7:5
  87. |
  88. 7 | use std::ops::Range;
  89. | ^^^^^^^^^^^^^^^
  90.  
  91. warning: unused import: `EventLoopWindowTarget`
  92. --> src/window.rs:4:42
  93. |
  94. 4 | event_loop::{ControlFlow, EventLoop, EventLoopWindowTarget},
  95. | ^^^^^^^^^^^^^^^^^^^^^
  96.  
  97. warning: unused imports: `CameraUniform` and `context::create_render_pipeline`
  98. --> src/lib.rs:28:40
  99. |
  100. 28 | camera::{Camera, CameraController, CameraUniform},
  101. | ^^^^^^^^^^^^^
  102. 29 | context::create_render_pipeline,
  103. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  104.  
  105. warning: unused import: `InstanceRaw`
  106. --> src/lib.rs:36:26
  107. |
  108. 36 | instance::{Instance, InstanceRaw},
  109. | ^^^^^^^^^^^
  110.  
  111. warning: unused imports: `DrawLight` and `DrawModel`
  112. --> src/lib.rs:39:13
  113. |
  114. 39 | use model::{DrawLight, DrawModel, Vertex};
  115. | ^^^^^^^^^ ^^^^^^^^^
  116.  
  117. warning: unused variable: `plane_primitive`
  118. --> src/lib.rs:108:13
  119. |
  120. 108 | let plane_primitive = PrimitiveMesh::new(
  121. | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_plane_primitive`
  122. |
  123. = note: `#[warn(unused_variables)]` on by default
  124.  
  125. warning: unused variable: `other`
  126. --> src/resources.rs:221:21
  127. |
  128. 221 | other => {
  129. | ^^^^^ help: if this is intentional, prefix it with an underscore: `_other`
  130.  
  131. warning: unused variable: `base_color_texture`
  132. --> src/resources.rs:246:13
  133. |
  134. 246 | let base_color_texture = &pbr.base_color_texture();
  135. | ^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_base_color_texture`
  136.  
  137. warning: unused variable: `mime_type`
  138. --> src/resources.rs:257:47
  139. |
  140. 257 | gltf::image::Source::View { view, mime_type } => {
  141. | ^^^^^^^^^ help: try ignoring the field: `mime_type: _`
  142.  
  143. warning: unused variable: `mime_type`
  144. --> src/resources.rs:271:45
  145. |
  146. 271 | gltf::image::Source::Uri { uri, mime_type } => {
  147. | ^^^^^^^^^ help: try ignoring the field: `mime_type: _`
  148.  
  149. warning: unused variable: `err`
  150. --> src/lib.rs:484:21
  151. |
  152. 484 | Err(err) => println!("Error in rendering"),
  153. | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
  154.  
  155. warning: unused variable: `device_id`
  156. --> src/camera.rs:159:9
  157. |
  158. 159 | device_id: &DeviceId,
  159. | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_device_id`
  160.  
  161. warning: unused variable: `forward_mag`
  162. --> src/camera.rs:192:13
  163. |
  164. 192 | let forward_mag = forward.magnitude();
  165. | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_forward_mag`
  166.  
  167. warning: unused variable: `material`
  168. --> src/model.rs:115:9
  169. |
  170. 115 | material: &'b Material,
  171. | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_material`
  172.  
  173. warning: unused variable: `color_format`
  174. --> src/pass/phong.rs:244:13
  175. |
  176. 244 | let color_format = texture::Texture::DEPTH_FORMAT;
  177. | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_color_format`
  178.  
  179. warning: unused variable: `queue`
  180. --> src/pass/phong.rs:84:9
  181. |
  182. 84 | queue: &wgpu::Queue,
  183. | ^^^^^ help: if this is intentional, prefix it with an underscore: `_queue`
  184.  
  185. warning: unused variable: `sampler`
  186. --> src/texture.rs:36:13
  187. |
  188. 36 | let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
  189. | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler`
  190.  
  191. warning: unused variable: `sampler`
  192. --> src/texture.rs:105:13
  193. |
  194. 105 | let sampler = device.create_sampler(&wgpu::SamplerDescriptor {
  195. | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_sampler`
  196.  
  197. warning: unused variable: `err`
  198. --> src/lib.rs:432:17
  199. |
  200. 432 | Err(err) => println!("Error in rendering"),
  201. | ^^^ help: if this is intentional, prefix it with an underscore: `_err`
  202.  
  203. warning: field `clear_color` is never read
  204. --> src/lib.rs:47:5
  205. |
  206. 41 | struct State {
  207. | ----- field in this struct
  208. ...
  209. 47 | clear_color: wgpu::Color,
  210. | ^^^^^^^^^^^
  211. |
  212. = note: `#[warn(dead_code)]` on by default
  213.  
  214. warning: function `create_render_pipeline` is never used
  215. --> src/context.rs:69:8
  216. |
  217. 69 | pub fn create_render_pipeline(
  218. | ^^^^^^^^^^^^^^^^^^^^^^
  219.  
  220. warning: field `name` is never read
  221. --> src/model.rs:45:9
  222. |
  223. 44 | pub struct Material {
  224. | -------- field in this struct
  225. 45 | pub name: String,
  226. | ^^^^
  227.  
  228. warning: field `name` is never read
  229. --> src/model.rs:51:9
  230. |
  231. 50 | pub struct Mesh {
  232. | ---- field in this struct
  233. 51 | pub name: String,
  234. | ^^^^
  235.  
  236. warning: field `name` is never read
  237. --> src/model.rs:64:9
  238. |
  239. 63 | pub struct AnimationClip {
  240. | ------------- field in this struct
  241. 64 | pub name: String,
  242. | ^^^^
  243.  
  244. warning: methods `draw_mesh` and `draw_model` are never used
  245. --> src/model.rs:76:8
  246. |
  247. 75 | pub trait DrawModel<'a> {
  248. | --------- methods in this trait
  249. 76 | fn draw_mesh(
  250. | ^^^^^^^^^
  251. ...
  252. 90 | fn draw_model(&mut self, model: &'a Model, local_bind_group: &'a wgpu::BindGroup);
  253. | ^^^^^^^^^^
  254.  
  255. warning: method `draw_light_mesh` is never used
  256. --> src/model.rs:143:8
  257. |
  258. 142 | pub trait DrawLight<'a> {
  259. | --------- method in this trait
  260. 143 | fn draw_light_mesh(
  261. | ^^^^^^^^^^^^^^^
  262.  
  263. warning: field `parent` is never read
  264. --> src/node.rs:7:9
  265. |
  266. 5 | pub struct Node {
  267. | ---- field in this struct
  268. 6 | // ID of parent Node
  269. 7 | pub parent: u32,
  270. | ^^^^^^
  271.  
  272. warning: fields `max_lights` and `ambient` are never read
  273. --> src/pass/phong.rs:51:9
  274. |
  275. 50 | pub struct PhongConfig {
  276. | ----------- fields in this struct
  277. 51 | pub max_lights: usize,
  278. | ^^^^^^^^^^
  279. 52 | pub ambient: [u32; 4],
  280. | ^^^^^^^
  281.  
  282. warning: field `global_bind_group_layout` is never read
  283. --> src/pass/phong.rs:58:9
  284. |
  285. 56 | pub struct PhongPass {
  286. | --------- field in this struct
  287. 57 | // Uniforms
  288. 58 | pub global_bind_group_layout: BindGroupLayout,
  289. | ^^^^^^^^^^^^^^^^^^^^^^^^
  290.  
  291. warning: field `texture` is never read
  292. --> src/texture.rs:7:9
  293. |
  294. 6 | pub struct Texture {
  295. | ------- field in this struct
  296. 7 | pub texture: wgpu::Texture,
  297. | ^^^^^^^
  298.  
  299. warning: unused borrow that must be used
  300. --> src/lib.rs:416:13
  301. |
  302. 416 | / &self
  303. 417 | | .pass
  304. 418 | | .uniform_pool
  305. 419 | | .update_uniform(node_index, node.locals, &self.ctx.queue);
  306. | |_________________________________________________________________________^ the borrow produces a value
  307. |
  308. = note: `#[warn(unused_must_use)]` on by default
  309. help: use `let _ = ...` to ignore the resulting value
  310. |
  311. 416 | let _ = &self
  312. | +++++++
  313.  
  314. warning: `wgpu-hello-world` (lib) generated 42 warnings (run `cargo fix --lib -p wgpu-hello-world` to apply 16 suggestions)
  315. Finished `dev` profile [unoptimized + debuginfo] target(s) in 37.55s
  316. warning: the following packages contain code that will be rejected by a future version of Rust: fs_extra v1.2.0
  317. note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
  318. Running `target/debug/wgpu-hello-world`
  319. thread 'main' panicked at core/src/panicking.rs:221:5:
  320. 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`
  321. stack backtrace:
  322. 0: rust_begin_unwind
  323. at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
  324. 1: core::panicking::panic_nounwind_fmt::runtime
  325. at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:112:18
  326. 2: core::panicking::panic_nounwind_fmt
  327. at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:122:5
  328. 3: core::panicking::panic_nounwind
  329. at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:221:5
  330. 4: core::slice::raw::from_raw_parts::precondition_check
  331. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ub_checks.rs:70:21
  332. 5: core::slice::raw::from_raw_parts
  333. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ub_checks.rs:77:17
  334. 6: freetype::bitmap::Bitmap::buffer
  335. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/freetype-rs-0.26.0/src/bitmap.rs:67:13
  336. 7: crossfont::ft::FreeTypeRasterizer::normalize_buffer
  337. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossfont-0.5.0/src/ft/mod.rs:491:19
  338. 8: <crossfont::ft::FreeTypeRasterizer as crossfont::Rasterize>::get_glyph
  339. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossfont-0.5.0/src/ft/mod.rs:255:13
  340. 9: sctk_adwaita::title::crossfont_renderer::CrossfontTitleText::rerender::{{closure}}
  341. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title/crossfont_renderer.rs:124:17
  342. 10: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  343. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:294:13
  344. 11: core::iter::traits::iterator::Iterator::find_map::check::{{closure}}
  345. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2903:32
  346. 12: core::iter::traits::iterator::Iterator::try_fold
  347. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2406:21
  348. 13: core::iter::traits::iterator::Iterator::find_map
  349. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2909:9
  350. 14: <core::iter::adapters::filter_map::FilterMap<I,F> as core::iter::traits::iterator::Iterator>::next
  351. 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
  352. 15: alloc::vec::Vec<T,A>::extend_desugared
  353. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3492:35
  354. 16: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
  355. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_extend.rs:17:9
  356. 17: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
  357. 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
  358. 18: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  359. 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
  360. 19: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
  361. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3388:9
  362. 20: core::iter::traits::iterator::Iterator::collect
  363. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:2001:9
  364. 21: sctk_adwaita::title::crossfont_renderer::CrossfontTitleText::rerender
  365. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title/crossfont_renderer.rs:114:30
  366. 22: sctk_adwaita::title::crossfont_renderer::CrossfontTitleText::update_title
  367. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title/crossfont_renderer.rs:102:13
  368. 23: sctk_adwaita::title::TitleText::update_title
  369. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/title.rs:36:9
  370. 24: <sctk_adwaita::AdwaitaFrame as smithay_client_toolkit::window::Frame>::set_title
  371. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sctk-adwaita-0.4.2/src/lib.rs:351:13
  372. 25: smithay_client_toolkit::window::Window<F>::set_title
  373. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smithay-client-toolkit-0.16.0/src/window/mod.rs:471:9
  374. 26: winit::platform_impl::platform::wayland::window::Window::new
  375. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.3/src/platform_impl/linux/wayland/window/mod.rs:216:9
  376. 27: winit::platform_impl::platform::Window::new
  377. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.3/src/platform_impl/linux/mod.rs:317:17
  378. 28: winit::window::WindowBuilder::build
  379. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.3/src/window.rs:349:9
  380. 29: wgpu_hello_world::window::Window::new
  381. at ./src/window.rs:37:22
  382. 30: wgpu_hello_world::run::{{closure}}
  383. at ./src/lib.rs:451:18
  384. 31: pollster::block_on
  385. at /home/vboxuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pollster-0.2.5/src/lib.rs:125:15
  386. 32: wgpu_hello_world::main
  387. at ./src/main.rs:4:5
  388. 33: core::ops::function::FnOnce::call_once
  389. at /home/vboxuser/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  390. note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
  391. thread caused non-unwinding panic. aborting.
  392. * Terminal will be reused by tasks, press any key to close it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement