hakolao / egui_winit_vulkano

Egui gui integration with winit and vulkano
Apache License 2.0
78 stars 36 forks source link

Cannot find `vulkano-shaders` in example #65

Closed freddycansic closed 5 months ago

freddycansic commented 6 months ago
 /tmp/egui_winit_vulkano │ master  ./run_all_examples.sh  
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling libc v0.2.153
   Compiling xml-rs v0.8.19
   Compiling smallvec v1.13.1
   Compiling once_cell v1.19.0
   Compiling pkg-config v0.3.30
   Compiling parking_lot_core v0.9.9
   Compiling bitflags v1.3.2
   Compiling scopeguard v1.2.0
   Compiling log v0.4.21
   Compiling serde v1.0.197
   Compiling libloading v0.8.3
   Compiling crossbeam-utils v0.8.19
   Compiling simd-adler32 v0.3.7
   Compiling hashbrown v0.14.3
   Compiling lock_api v0.4.11
   Compiling memoffset v0.6.5
   Compiling equivalent v1.0.1
   Compiling dlib v0.5.2
   Compiling memchr v2.7.1
   Compiling adler v1.0.2
   Compiling crc32fast v1.4.0
   Compiling wayland-sys v0.29.5
   Compiling ttf-parser v0.20.0
   Compiling quote v1.0.35
   Compiling lazy_static v1.4.0
   Compiling miniz_oxide v0.7.2
   Compiling ahash v0.8.11
   Compiling syn v2.0.53
   Compiling wayland-scanner v0.29.5
   Compiling indexmap v2.2.5
   Compiling aho-corasick v1.1.2
   Compiling serde_json v1.0.114
   Compiling thiserror v1.0.58
   Compiling regex-syntax v0.8.2
   Compiling ab_glyph_rasterizer v0.1.8
   Compiling getrandom v0.2.12
   Compiling slotmap v1.0.7
   Compiling downcast-rs v1.2.0
   Compiling zerocopy v0.7.32
   Compiling scoped-tls v1.0.1
   Compiling ryu v1.0.17
   Compiling itoa v1.0.10
   Compiling nix v0.24.3
   Compiling parking_lot v0.12.1
   Compiling flate2 v1.0.28
   Compiling vk-parse v0.12.0
   Compiling unicase v2.7.0
   Compiling heck v0.4.1
   Compiling wayland-client v0.29.5
   Compiling wayland-protocols v0.29.5
   Compiling ash v0.37.3+1.3.251
   Compiling nix v0.25.1
   Compiling crossbeam-epoch v0.9.18
   Compiling owned_ttf_parser v0.20.0
   Compiling smithay-client-toolkit v0.16.1
   Compiling wayland-commons v0.29.5
   Compiling ab_glyph v0.2.23
   Compiling fdeflate v0.3.4
   Compiling regex-automata v0.4.6
   Compiling xcursor v0.3.5
   Compiling vec_map v0.8.2
   Compiling rayon-core v1.12.1
   Compiling png v0.17.13
   Compiling crossbeam-deque v0.8.5
   Compiling memmap2 v0.5.10
   Compiling percent-encoding v2.3.1
   Compiling arrayref v0.3.7
   Compiling strict-num v0.1.1
   Compiling xmlparser v0.13.6
   Compiling tinyvec_macros v0.1.1
   Compiling nohash-hasher v0.2.0
   Compiling cc v1.0.90
   Compiling tinyvec v1.6.0
   Compiling roxmltree v0.14.1
   Compiling wayland-cursor v0.29.5
   Compiling cmake v0.1.50
   Compiling x11-dl v2.21.0
   Compiling num-traits v0.2.18
   Compiling rustix v0.38.31
   Compiling syn v1.0.109
   Compiling toml_datetime v0.6.5
   Compiling cfg_aliases v0.1.1
   Compiling winnow v0.5.40
   Compiling regex v1.10.3
   Compiling arrayvec v0.7.4
   Compiling shaderc-sys v0.8.3
   Compiling winit v0.28.7
   Compiling unicode-normalization v0.1.23
   Compiling bytemuck_derive v1.6.0
   Compiling serde_derive v1.0.197
   Compiling thiserror-impl v1.0.58
   Compiling linux-raw-sys v0.4.13
   Compiling either v1.10.0
   Compiling unicode-bidi v0.3.15
   Compiling raw-window-handle v0.5.2
   Compiling bitflags v2.5.0
   Compiling idna v0.5.0
   Compiling rayon v1.9.0
   Compiling toml_edit v0.19.15
   Compiling mime_guess2 v2.0.5
   Compiling bytemuck v1.15.0
   Compiling calloop v0.10.6
   Compiling tiny-skia-path v0.8.4
   Compiling half v2.4.0
   Compiling tiny-skia v0.8.4
   Compiling proc-macro-crate v1.3.1
   Compiling form_urlencoded v1.2.1
   Compiling mio v0.8.11
   Compiling spin v0.9.8
   Compiling libloading v0.7.4
   Compiling instant v0.1.12
   Compiling weezl v0.1.8
   Compiling x11rb-protocol v0.13.0
   Compiling flume v0.11.0
   Compiling jpeg-decoder v0.3.1
   Compiling vulkano-macros v0.34.0
   Compiling sctk-adwaita v0.5.4
   Compiling emath v0.24.1
   Compiling ecolor v0.24.1
   Compiling epaint v0.24.1
   Compiling vulkano v0.34.1
   Compiling x11rb v0.13.0
   Compiling crossbeam-queue v0.3.11
   Compiling url v2.5.0
   Compiling egui v0.24.1
   Compiling enum-map-derive v0.17.0
   Compiling thread_local v1.1.8
   Compiling zune-inflate v0.2.54
   Compiling color_quant v1.1.0
   Compiling home v0.5.9
   Compiling mime v0.3.17
   Compiling bit_field v0.10.2
   Compiling lebe v0.5.2
   Compiling webbrowser v0.8.13
   Compiling exr v1.72.0
   Compiling gif v0.13.1
   Compiling enum-map v2.7.3
   Compiling shaderc v0.8.3
   Compiling arboard v3.3.2
   Compiling smithay-clipboard v0.6.6
   Compiling tiff v0.9.1
   Compiling qoi v0.4.1
   Compiling cgmath v0.18.0
   Compiling web-time v0.2.4
   Compiling byteorder v1.5.0
   Compiling egui-winit v0.24.1
   Compiling egui_extras v0.24.2
   Compiling image v0.24.9
   Compiling egui_plot v0.24.2
   Compiling approx v0.4.0
   Compiling unicode_names2 v0.6.0
   Compiling egui_demo_lib v0.24.1
   Compiling vulkano-shaders v0.34.0
   Compiling vulkano-util v0.34.1
   Compiling egui_winit_vulkano v0.27.0 (/tmp/egui_winit_vulkano)
error[E0463]: can't find crate for `vulkano_shaders`
    --> src/renderer.rs:1024:5
     |
1024 |     vulkano_shaders::shader! {
     |     ^^^^^^^^^^^^^^^ can't find crate

error: cannot determine resolution for the macro `vulkano_shaders::shader`
    --> src/renderer.rs:1024:5
     |
1024 |     vulkano_shaders::shader! {
     |     ^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: import resolution is stuck, try simplifying macro imports

error[E0463]: can't find crate for `vulkano_shaders`
    --> src/renderer.rs:1055:5
     |
1055 |     vulkano_shaders::shader! {
     |     ^^^^^^^^^^^^^^^ can't find crate

error: cannot determine resolution for the macro `vulkano_shaders::shader`
    --> src/renderer.rs:1055:5
     |
1055 |     vulkano_shaders::shader! {
     |     ^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: import resolution is stuck, try simplifying macro imports

error[E0425]: cannot find function `load` in module `vs`
   --> src/renderer.rs:220:22
    |
220 |         let vs = vs::load(gfx_queue.device().clone())
    |                      ^^^^ not found in `vs`
    |
help: consider importing this function
    |
10  + use image::load;
    |
help: if you import `load`, refer to it directly
    |
220 -         let vs = vs::load(gfx_queue.device().clone())
220 +         let vs = load(gfx_queue.device().clone())
    |

error[E0425]: cannot find function `load` in module `fs`
   --> src/renderer.rs:224:22
    |
224 |         let fs = fs::load(gfx_queue.device().clone())
    |                      ^^^^ not found in `fs`
    |
help: consider importing this function
    |
10  + use image::load;
    |
help: if you import `load`, refer to it directly
    |
224 -         let fs = fs::load(gfx_queue.device().clone())
224 +         let fs = load(gfx_queue.device().clone())
    |

error[E0422]: cannot find struct, variant or union type `PushConstants` in module `vs`
   --> src/renderer.rs:775:34
    |
775 |         let push_constants = vs::PushConstants {
    |                                  ^^^^^^^^^^^^^ not found in `vs`

Some errors have detailed explanations: E0422, E0425, E0463.
For more information about an error, try `rustc --explain E0422`.
error: could not compile `egui_winit_vulkano` (lib) due to 7 previous errors
warning: build failed, waiting for other jobs to finish...
    Building [=======================> ] 252/254: vulkano 

Expected

Example runs

Observed

Example crashes


I just cloned the repo directly without modification. Thanks.

Also, what do you think about including an example which does not use vulkano-util, for example only using the triangle example from the vulkano repo. This would be useful for users who do not use vulkano-util.

hakolao commented 5 months ago

Also, what do you think about including an example which does not use vulkano-util, for example only using the triangle example from the vulkano repo.

Mostly the purpose of vulkano-util here is to reduce the code. It is just a wrapper for some functionality and it should still be fairly clear how to use this lib :).

I'm unable to reproduce the error though! Could you cargo clean and retry?

freddycansic commented 5 months ago

Sorry for the late reply.

Cloned the repo again and it worked. Idk

Thanks though