unknownue / vulkan-tutorial-rust Goto Github PK
View Code? Open in Web Editor NEWFollowing the vulkan tutorial(https://vulkan-tutorial.com/) using the Rust programming language.
License: MIT License
Following the vulkan tutorial(https://vulkan-tutorial.com/) using the Rust programming language.
License: MIT License
When run example 17 on Windows, the program crashes and output the following message:
thread 'main' panicked at 'Failed to wait for Fence!: Result(-4)', src\libcore\result.rs:999:5
note: Run with 'RUST_BACKTRACE=1' environment variable to display a backtrace.
error: process didn't exit successfully: 'target\debug\17.exe' (exit code: 101)
Related issue: #10
I've found this out while debugging #14
winit 0.20 reorganized platform modules so the examples do not compile on Linux because winit::os::unix::WindowExt became winit::platform::unix::WindowExtUnix
I'll submit a PR to fix it.
Hi! Thanks for a great port of a vulkan-tutorial, it really helps!
I completed the fourth part of the tutorial (Logical Device) and forgot to call self.device.destroy_device(None)
. It didn't break anything, but now I wonder if validation layers should've complained about it?
They certainly do apply to the device creation process, because if I try to pass something silly to p_next
field of the vk::DeviceCreateInfo
, I get expected "unknown struct type" errors in the console.
UPD: Maybe this question is better be asked in the ash issue tracker ๐ค
Compiling vulkan-tutorial-rust v1.0.0 (C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust)
error: linking with link.exe
failed: exit code: 1120
|
= note: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe" "/NOLOGO" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.10dh8pskzmpkh2pr.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.11j54dpzq0oo1e9c.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.197y2q6dsls6oxhm.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1aihnkkbp36sjryt.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1bzsfytytsyk0iaw.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1mr4eenwobynnyp5.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1p7u3vjlklbwepmf.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1p9ov1t1x4rvl8w1.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1q5hb7jt2cnvaa7k.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1txo4dgb0m25vcq9.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1vrqw9o28mzrdv8m.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1vvq3sphfyj5ol1p.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1w4o7vx4n3sqxuqs.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1wi9a5517bshhz7m.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.1z9umdjz9qweqbnw.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.201dsfbvc7s1qzs0.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.21o22zy5kos86ovc.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2991pdf3r3tfmmvh.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2dmp93kedaavdhf5.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2hevjkowaag28d11.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2ig2p2roas5xp04e.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2l33b7ravtepubtc.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2ld6zbvq5sjzzvaw.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2p63f870lnapuyss.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2qphz10q63gt57k0.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2rtpmjc56m8n0nha.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2s76o9zoddnv7qo5.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2slxge44nbiqib7g.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2v037wsgclliff2c.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.2wk1mztui0qu9lxh.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.333g0y2sxgkz0jio.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3d4h4lpidfmsopv4.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3gzdk850f4iotgra.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3k41ut1i9h68vdtf.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3mh1gq6ydxn7klwe.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3r8dwd8jx1aq5rgn.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3selkpf791rkf12k.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3uf9ctu6j3zgbya6.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3wpo91vxaef01usy.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3xovvd59wv4935gr.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3yt249f6k298fiqo.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.3zxz89p1xt3a7z6e.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4015uhgjjqurtne1.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4690qgggyl766ygz.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4cl69cor87zowwge.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4d1446zrekkm4e06.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4d1f5cz9t5iwhlts.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4g2pk043v9nbxpos.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4gtlyo677ovje293.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4h9ug5hakwawxla6.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4mj2rwn286q1j9o7.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4ou62zf57tkj0ynb.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4t0afo9njisc4xhy.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4usdv642y0fcugop.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4xo7exydjnrywnsn.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.4yxc2c59eq4n3o3z.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.53mw7oo20to6hs9l.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.53xtpwvxxtjmll0z.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.53ytsye65ffsfk6f.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.54df9yvebnwmrlud.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.54q70si4eb3e09bq.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.567j9zzobrwpo4cf.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.58bbxjl4lhvdfsqo.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.58es8fja7zj17q7q.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.5a57k4rmi15f510.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.5cfryjn2grik8sqk.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.5dijubrq6s657qmd.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.5euvfogjbpbi47qd.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.5gmabjqiq4n8fbfk.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.5rgm5lew1k5g4t0.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.775e29w8cul4s40.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.95dofggvoza0rrw.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.akmengcvwsgzys7.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.fd0e0yraz3vpmgp.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.hz3p93t1zhuixtp.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.j40d17m8y4b6kbh.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.jsghga2w378zxiq.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.jw42q49r1fb5k4u.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.nhm7dy60dcx0ni9.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.ra7hci34c8k04pi.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.sotga7xybnnli3h.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.wfwsw4e8p7aynza.rcgu.o" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.21wqoadx6ych0g5v.rcgu.o" "/LIBPATH:C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps" "/LIBPATH:C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libwinit-3f33ff3e74710c93.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libraw_window_handle-c89df56b79f036d0.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libraw_window_handle-0b49e93e69cdba88.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libcty-1b17e6923086bbc2.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\liblibc-abae38cf18f501aa.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libparking_lot-d98fb281da8748ff.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libparking_lot_core-04b0204bb366cf2f.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libsmallvec-a687b909c86641e0.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libcfg_if-5312f1413f00c09c.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\liblock_api-26c480a040df62bc.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libscopeguard-7b19ecb091d03458.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libwinapi-b78690f8786419ea.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libinstant-6cf48be02b1f9d78.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libbitflags-56b04ecee242fa81.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\liblog-247aa2dc83e6785c.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\libcfg_if-b01931459ea167fc.rlib" "C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\liblazy_static-915917b7703ad76d.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd-0f7e1853181d29c2.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libpanic_unwind-ee8804a073a629b8.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd_detect-f320e82b0baaad6d.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_demangle-cede8d1fca99fc93.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libhashbrown-a6db156d99b5f701.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_std_workspace_alloc-31a385e2e15a7a71.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libunwind-c431fe701788effd.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcfg_if-9c55022353a90ed5.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liblibc-5c6e234e3431724c.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liballoc-c4009c6b42e3b42a.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_std_workspace_core-665ed95809278e59.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcore-c2100e40c13f915d.rlib" "C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcompiler_builtins-e57a7d82dcc1d66d.rlib" "advapi32.lib" "cfgmgr32.lib" "comctl32.lib" "credui.lib" "dwmapi.lib" "fwpuclnt.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "ntdll.lib" "ole32.lib" "opengl32.lib" "secur32.lib" "shcore.lib" "shell32.lib" "shlwapi.lib" "user32.lib" "uxtheme.lib" "winspool.lib" "ws2_32.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "/OUT:C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\etc\intrinsic.natvis" "/NATVIS:C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\etc\liballoc.natvis" "/NATVIS:C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\etc\libcore.natvis" "/NATVIS:C:\Users\liche\.rustup\toolchains\nightly-2022-01-13-x86_64-pc-windows-msvc\lib\rustlib\etc\libstd.natvis"
= note: 00.4yxc2c59eq4n3o3z.rcgu.o : error LNK2019: unresolved external symbol AdjustWindowRectExForDpi referenced in function _ZN5winit13platform_impl8platform10event_loop22public_window_callback17hc8b15db72c715712E
C:\Lee\Perosnal\Rust\Vulkan_Rust\vulkan-tutorial-rust\target\debug\deps\00.exe : fatal error LNK1120: 1 unresolved externals
error: could not compile vulkan-tutorial-rust
due to previous error
seems like with an lib issue?
thanks
$ cargo run --bin 01
Finished dev [unoptimized + debuginfo] target(s) in 0.15s
Running target/debug/01
Bus error: 10
I think vulkan-tutorial.com has switched to a different model and removed the original chalet assets: see e.g. https://vulkan-tutorial.com/Loading_models
The PR just grabs them from a github repo instead.
Thanks for this awesome repo. I'm trying to get started with Vulkan, but would much rather learn more Rust in the process than C++, so this is perfect for me ๐
I get the following error whenever I try to run an example
cargo run --bin 00
[wayland-client error] Attempted to dispatch unknown opcode 0 for wl_shm, aborting.
With the release of Vulkan SDK 1.1.106, VK_LAYER_KHRONOS_validation
layer is now available.
VK_LAYER_KHRONOS_validation
is the replacement of VK_LAYER_LUNARG_core_validation
layer.
Thus the code in this repo need to be updated. Keep this issue open to keep track of it.
Compiling vulkan-tutorial-rust v0.29.0 (/home/cat/Sync/projects/git/vulkan-tutorial-rust)
Running `rustc --edition=2018 --crate-name vulkan_tutorial_rust src/lib.rs --color always --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=898592ca9fc7d40e -C extra-filename=-898592ca9fc7d40e --out-dir /home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps -C incremental=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/incremental -L dependency=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps --extern ash=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libash-4f929e959ae2812b.rmeta --extern bitflags=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libbitflags-56157381bfd375cf.rmeta --extern cgmath=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libcgmath-0a821ec2280d5162.rmeta --extern image=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libimage-d7bbadc798add273.rmeta --extern memoffset=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libmemoffset-3c54f8811cfbf28e.rmeta --extern num=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libnum-f06d007bbf0fad7f.rmeta --extern tobj=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libtobj-d712aaba9dfc98b8.rmeta --extern winit=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/deps/libwinit-c1e2dd021d4f49df.rmeta -L native=/home/cat/Sync/projects/git/vulkan-tutorial-rust/target/debug/build/libloading-afea3faead076e88/out`
error[E0433]: failed to resolve: could not find `os` in `winit`
--> src/utility/platforms.rs:61:16
|
61 | use winit::os::unix::WindowExt;
| ^^ could not find `os` in `winit`
warning: unused import: `winit::os::unix::WindowExt`
--> src/utility/platforms.rs:61:9
|
61 | use winit::os::unix::WindowExt;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0599]: no method named `get_xlib_display` found for type `&winit::window::Window` in the current scope
--> src/utility/platforms.rs:63:30
|
63 | let x11_display = window.get_xlib_display().unwrap();
| ^^^^^^^^^^^^^^^^
error[E0599]: no method named `get_xlib_window` found for type `&winit::window::Window` in the current scope
--> src/utility/platforms.rs:64:29
|
64 | let x11_window = window.get_xlib_window().unwrap();
| ^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: Could not compile `vulkan-tutorial-rust`.
Rust, cargo and everything are latest versions, winit
0.20.0-alpha3
is being used as specified.
I cannot compile with stable or nightly with the following errors:
error[E0283]: type annotations needed: cannot resolve `_: std::convert::Into<winit::dpi::Size>`
--> src\utility\window.rs:16:10
|
16 | .with_inner_size((width, height).into())
| ^^^^^^^^^^^^^^^
error[E0599]: no variant or associated item named `EventsCleared` found for type `winit::event::Event<'_, _>` in the current scope
--> src\utility\window.rs:75:26
|
75 | | Event::EventsCleared => {
| ^^^^^^^^^^^^^
| |
| variant or associated item not found in `winit::event::Event<'_, _>`
| help: there is a variant with a similar name: `MainEventsCleared`
We're calling query_swapchain_support
here:
vulkan-tutorial-rust/src/tutorials/06_swap_chain_creation.rs
Lines 168 to 169 in e579b67
vulkan-tutorial-rust/src/tutorials/06_swap_chain_creation.rs
Lines 195 to 196 in e579b67
Vulkan Tutorial says:
"It is important that we only try to query for swap chain support after verifying that the extension is available."
I've asked around why is it important and found out this spec section:
https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#initialization-phys-dev-extensions
The spec says:
"Applications must not use a VkPhysicalDevice in any command added by an extension or core version that is not supported by that physical device."
So when we're calling get_physical_device_surface_capabilities
and friends without knowing in advance that VK_KHR_swapchain
is available, we're getting an undefined behavior.
I'll submit a PR to handle that.
The steps of creating vk::Instance
and vk::DebugUtilsMessengerExt
need to update. See this commit for detail.
the resize window size is const in Rust, so i suppose it's not changed according to the new size
also the callback function about if the window size is changed never actually works
which means the is_framebuffer_resized flag is always false
When I trying to build these examples following problem occurs
in utility/platforms.rs line 74 the method not found xlib_surface_loader.create_xlib_surface_khr
it is actually
xlib_surface_loader.create_xlib_surface
$ cargo run --bin 05
Finished dev [unoptimized + debuginfo] target(s) in 0.16s
Running target/debug/05
Segmentation fault: 11
Cannot implement Drop for VulkanApp in example01, because the usage of destroy_instance(None)
crashes the program on closing the window and produces error: process didn't exit successfully: `target\debug\01.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Without the Drop
implementation or the destroy_instance()
usage everything is fine.
I read the actual docs for Vulakn API for this function, and I'm assuming there's a dangling reference somewhere inside the instance fields, but couldnt confirm (I'm not even sure if I'm right). Any suggestions?
sto@darkstar vulkan-tutorial-rust % cargo run --bin 00
cargo run --bin 00
Compiling objc_exception v0.1.2
The following warnings were emitted during compilation:
warning: extern/exception.m: In function 'RustObjCExceptionThrow':
warning: extern/exception.m:5:5: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
warning: 5 | @throw exception;
warning: | ^~~~~~
warning: extern/exception.m:4:32: warning: parameter 'exception' set but not used [-Wunused-but-set-parameter]
warning: 4 | void RustObjCExceptionThrow(id exception) {
warning: | ~~~^~~~~~~~~
error: failed to run custom build command for objc_exception v0.1.2
Caused by:
process didn't exit successfully: /Users/sto/workspace/vulkan-tutorial-rust/target/debug/build/objc_exception-51f9f1f7ab098d80/build-script-build
(exit status: 1)
--- stdout
TARGET = Some("aarch64-apple-darwin")
OPT_LEVEL = Some("0")
HOST = Some("aarch64-apple-darwin")
cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
CC_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
CC_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = Some("gcc-12")
cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
CFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
CFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh")
running: "gcc-12" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-Wall" "-Wextra" "-o" "/Users/sto/workspace/vulkan-tutorial-rust/target/debug/build/objc_exception-748a59e70ea0f6bb/out/extern/exception.o" "-c" "extern/exception.m"
cargo:warning=extern/exception.m: In function 'RustObjCExceptionThrow':
cargo:warning=extern/exception.m:5:5: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
cargo:warning= 5 | @throw exception;
cargo:warning= | ^~~~~~
cargo:warning=extern/exception.m:4:32: warning: parameter 'exception' set but not used [-Wunused-but-set-parameter]
cargo:warning= 4 | void RustObjCExceptionThrow(id exception) {
cargo:warning= | ~~~^~~~~~~~~
exit status: 1
--- stderr
error occurred: Command "gcc-12" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-arch" "arm64" "-Wall" "-Wextra" "-o" "/Users/sto/workspace/vulkan-tutorial-rust/target/debug/build/objc_exception-748a59e70ea0f6bb/out/extern/exception.o" "-c" "extern/exception.m" with args "gcc-12" did not execute successfully (status code exit status: 1).
Without modification, running example 02 gives this output: (I edited out my println! statement)
Instance Available Layers:
VK_LAYER_NV_optimus
VK_LAYER_OBS_HOOK
VK_LAYER_VALVE_steam_overlay
VK_LAYER_VALVE_steam_fossilize
VK_LAYER_EOS_Overlay
VK_LAYER_EOS_Overlay
thread 'main' panicked at 'Validation layers requested, but not available!', src/tutorials/02_validation_layers.rs:83:13
stack backtrace:
0: 0x6302fb - std::backtrace_rs::backtrace::dbghelp::trace::h81f68c85e8a404bc
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98:5
1: 0x6302fb - std::backtrace_rs::backtrace::trace_unsynchronized::h38c8cbf83a2b340b
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66:5
2: 0x6302fb - std::sys_common::backtrace::_print_fmt::he83f99e5e7da91ec
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:67:5
3: 0x6302fb - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdca2d1f25a396476
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:46:22
4: 0x69bb6b - core::fmt::write::h15a44803aaa8cb9c
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\core\src\fmt\mod.rs:1078:17
5: 0x621ea3 - std::io::Write::write_fmt::h30650b0792e7e471
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\io\mod.rs:1519:15
6: 0x633f48 - std::sys_common::backtrace::_print::h8a896f01a2594c13
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:49:5
7: 0x633f48 - std::sys_common::backtrace::print::hdd949e22ad060cf7
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\sys_common\backtrace.rs:36:9
8: 0x633f48 - std::panicking::default_hook::{{closure}}::h7c4d2996f576da8d
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:208:50
9: 0x633b5c - std::panicking::default_hook::h6bfae4e54c8522ba
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:225:9
10: 0x6347d9 - std::panicking::rust_panic_with_hook::h39f01e8db1be2ade
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:591:17
11: 0x40f014 - std::panicking::begin_panic::{{closure}}::h0866a0a3edf0c304
12: 0x40ef2f - std::sys_common::backtrace::__rust_end_short_backtrace::h2debba070202f4d5
13: 0x406a1d - std::panicking::begin_panic::h6f8f5821fbf06777
14: 0x40eceb - _02::main::h8024fc558f3fed18
15: 0x40ef46 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd7b7017a0a872516
16: 0x40ef8c - std::rt::lang_start::{{closure}}::hcf719bb69b974c4c
17: 0x634a5c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h137dc4e3949337b2
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\library\core\src\ops/function.rs:259:13
18: 0x634a5c - std::panicking::try::do_call::h0e5552fee324fdbb
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:379:40
19: 0x634a5c - std::panicking::try::h6d54d70d12e29c0a
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panicking.rs:343:19
20: 0x634a5c - std::panic::catch_unwind::h8e874b49d2127ff8
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\panic.rs:396:14
21: 0x634a5c - std::rt::lang_start_internal::h79337b5f0625a1d5
at /rustc/eb4fc71dc9024f15a0c9cc44bcc10c861e9d585e\/library\std\src\rt.rs:51:25
22: 0x40ee88 - main
23: 0x4013b4 - __tmainCRTStartup
at E:\mingwbuild\mingw-w64-crt-git\src\crt-x86_64-w64-mingw32/E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:339:15
24: 0x40150b - mainCRTStartup
at E:\mingwbuild\mingw-w64-crt-git\src\crt-x86_64-w64-mingw32/E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:223:9
25: 0x7ffa0f617c24 - <unknown>
26: 0x7ffa0f7ed4d1 - <unknown>
So I added a println! to figure out what it wanted that it didn't have. It wants to find VK_LAYER_KHRONOS_validation which is not among the available things.
Perhaps I should have installed the Vulkan SDK first? Though I thought it was only necessary for C or C++ and whatnot.
I'm struggling with google trying to find out why that's not an available layer but to no avail thus far. I would like to work directly with Vulkan as opposed to a "safe wrapper" because I find it harder to understand things when part of the job is being done for me. I need to break a system down to its components to understand it.
The available layers all seem to be programs I'm running and nothing to do with the system itself.
MacBook Pro (16-inch, 2019)
CPU: 2.4 GHz 8-Core Intel Core i9
GPU: On a AMD Radeon Pro 5500M 8Gb
Cloned and downloaded assets, tried cargo run --bin 29
and this happened.
No available layers.
thread 'main' panicked at 'Validation layers requested, but not available!', src/utility/share/mod.rs:32:9
stack backtrace:
0: std::panicking::begin_panic
at /Users/manuel.gil/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:497
1: vulkan_tutorial_rust::utility::share::create_instance
at ./src/utility/share/mod.rs:32
2: _29::VulkanApp29::new
at ./src/tutorials/29_multisampling.rs:106
3: _29::main
at ./src/tutorials/29_multisampling.rs:1343
4: core::ops::function::FnOnce::call_once
at /Users/manuel.gil/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:227
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
MoltenVK vkcubeapp.app runs with no problem :(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.