e-nguyen / e-nguyen

The Music Visualization
GNU Lesser General Public License v3.0
20 stars 1 forks source link

Crash in fullscreen mode #23

Open lnicola opened 5 years ago

lnicola commented 5 years ago

Is Something Broken?

Type of Support Being Sought

Before you submit

[2019-03-28T21:28:41Z WARN  e_nguyen::ewin] No discrete device was found.
[2019-03-28T21:28:41Z INFO  e_nguyen::ewin] Using device: Intel(R) HD Graphics 530 (Skylake GT2) (type: IntegratedGpu)
[2019-03-28T21:28:41Z DEBUG e_nguyen::audio] Input devices detected [
    (
        ServerStream {
            name: "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor",
            index: 0,
            desc: "Monitor of Built-in Audio Analog Stereo",
            spec: Spec {
                format: S16le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor",
            index: 0,
            rate: 44100,
            channels: 2,
            sample_format: S16le
        }
    ),
    (
        ServerStream {
            name: "alsa_input.pci-0000_00_1f.3.analog-stereo",
            index: 1,
            desc: "Built-in Audio Analog Stereo",
            spec: Spec {
                format: S16le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "alsa_input.pci-0000_00_1f.3.analog-stereo",
            index: 1,
            rate: 44100,
            channels: 2,
            sample_format: S16le
        }
    ),
    (
        ServerStream {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.monitor",
            index: 28,
            desc: "Monitor Source of AudioQuest DragonFly Black v1.5 Analog Stereo on pulse@ubik.home",
            spec: Spec {
                format: S24le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.monitor",
            index: 28,
            rate: 44100,
            channels: 2,
            sample_format: S24le
        }
    ),
    (
        ServerStream {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.2.monitor",
            index: 29,
            desc: "Monitor Source of AudioQuest DragonFly Black v1.5 Analog Stereo on pulse@ubik.home",
            spec: Spec {
                format: S24le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.2.monitor",
            index: 29,
            rate: 44100,
            channels: 2,
            sample_format: S24le
        }
    )
]
[2019-03-28T21:28:41Z DEBUG e_nguyen::audio] Using monitor: "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"
[2019-03-28T21:28:41Z WARN  e_nguyen::audio] PA state callback for Stream called with lock held
INTEL-MESA: error: ../mesa-19.0.0/src/intel/vulkan/anv_queue.c:45: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST)
INTEL-MESA: error: ../mesa-19.0.0/src/intel/vulkan/anv_queue.c:244: vkQueueSubmit() failed (VK_ERROR_DEVICE_LOST)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLost', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLostError', src/libcore/result.rs:997:5
stack backtrace:
   0:     0x556028f00123 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h39625934646a062b
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:     0x556028efbd7b - std::sys_common::backtrace::_print::h5ed439e79e04d188
                               at src/libstd/sys_common/backtrace.rs:71
   2:     0x556028efec96 - std::panicking::default_hook::{{closure}}::h13bf33e40bf761d8
                               at src/libstd/sys_common/backtrace.rs:59
                               at src/libstd/panicking.rs:197
   3:     0x556028efea29 - std::panicking::default_hook::h7e24c700cb9d2623
                               at src/libstd/panicking.rs:211
   4:     0x556028eff39f - std::panicking::rust_panic_with_hook::h37915b26028fb081
                               at src/libstd/panicking.rs:474
   5:     0x556028efef21 - std::panicking::continue_panic_fmt::h940255bf34f40feb
                               at src/libstd/panicking.rs:381
   6:     0x556028efee05 - rust_begin_unwind
                               at src/libstd/panicking.rs:308
   7:     0x556028f1742c - core::panicking::panic_fmt::h3022c09ba47ed570
                               at src/libcore/panicking.rs:85
   8:     0x556028afcf60 - core::result::unwrap_failed::h3f22ac4de5ca2418
   9:     0x556028b437ed - core::ptr::real_drop_in_place::h4ae50795ed01f1c7
  10:     0x556028adac3f - core::ptr::real_drop_in_place::hb67e42d79d8e8d29
  11:     0x556028af4335 - <e_nguyen::mesmerize::MezFramer as e_nguyen::rendering::Framer<'a, 'f, e_nguyen::mesmerize::MezFramer, e_nguyen::mesmerize::MezState, e_nguyen::mesmerize::MezResources>>::render_one::h1cd4a107e5442ef5
  12:     0x556028aed5cc - e_nguyen::mesmerize::mezmerize::h1c9883e47eb9c487
  13:     0x556028b1e915 - e_nguyen::application::MezLauncher::launch::h091a108ea32a642f
  14:     0x556028f03c49 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:87
  15:     0x556028b7a99b - <F as alloc::boxed::FnBox<A>>::call_box::h0f750f672d168be4
  16:     0x556028f02fdd - std::sys::unix::thread::Thread::new::thread_start::h0b141bcf37c246b9
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/boxed.rs:759
                               at src/libstd/sys_common/thread.rs:14
                               at src/libstd/sys/unix/thread.rs:80
  17:     0x7fd44be32a9c - start_thread
  18:     0x7fd44bd48b22 - clone
  19:                0x0 - <unknown>
thread panicked while panicking. aborting.

Black window for about 2 seconds, then crashes. Crashes more quickly when audio is playing. Running on Arch Linux, Gnome, Wayland. Note how, as opposed to #22, it's detecting the audio source.

knappador commented 5 years ago

\o/ Glad you found the fullscreen option. Sorry for the crash

INTEL-MESA: error: ../mesa-19.0.0/src/intel/vulkan/anv_queue.c:45: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST) Since you can run the Vulkano examples and I saw that you were able to open the settings window, I can almost guess that I will need to finish syncing the memory to fix the issue on your platform -or- that I failed to check the image format before attempting to do some copying.

lnicola commented 5 years ago

\o/ Glad you found the fullscreen option.

Well, it was in the README. I tried without it because of this crash.

Since you can run the Vulkano examples and I saw that you were able to open the settings window, I can almost guess that I will need to finish syncing the memory to fix the issue on your platform -or- that I failed to check the image format before attempting to do some copying.

Yeah, all of the examples work except debug. Here, take this debug trace, it may help:

[2019-03-28T21:53:31Z WARN  e_nguyen::ewin] No discrete device was found.
[2019-03-28T21:53:31Z INFO  e_nguyen::ewin] Using device: Intel(R) HD Graphics 530 (Skylake GT2) (type: IntegratedGpu)
[2019-03-28T21:53:31Z DEBUG e_nguyen::audio] Input devices detected [
    (
        ServerStream {
            name: "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor",
            index: 0,
            desc: "Monitor of Built-in Audio Analog Stereo",
            spec: Spec {
                format: S16le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor",
            index: 0,
            rate: 44100,
            channels: 2,
            sample_format: S16le
        }
    ),
    (
        ServerStream {
            name: "alsa_input.pci-0000_00_1f.3.analog-stereo",
            index: 1,
            desc: "Built-in Audio Analog Stereo",
            spec: Spec {
                format: S16le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "alsa_input.pci-0000_00_1f.3.analog-stereo",
            index: 1,
            rate: 44100,
            channels: 2,
            sample_format: S16le
        }
    ),
    (
        ServerStream {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.monitor",
            index: 28,
            desc: "Monitor Source of AudioQuest DragonFly Black v1.5 Analog Stereo on pulse@ubik.home",
            spec: Spec {
                format: S24le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.monitor",
            index: 28,
            rate: 44100,
            channels: 2,
            sample_format: S24le
        }
    ),
    (
        ServerStream {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.2.monitor",
            index: 29,
            desc: "Monitor Source of AudioQuest DragonFly Black v1.5 Analog Stereo on pulse@ubik.home",
            spec: Spec {
                format: S24le,
                rate: 44100,
                channels: 2
            }
        },
        SimpleSource {
            name: "tunnel.ubik.local.alsa_output.usb-AudioQuest_AudioQuest_DragonFly_Black_v1.5_AQDFBL0100004381-01.analog-stereo.2.monitor",
            index: 29,
            rate: 44100,
            channels: 2,
            sample_format: S24le
        }
    )
]
[2019-03-28T21:53:31Z DEBUG e_nguyen::audio] Using monitor: "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor"
[2019-03-28T21:53:31Z WARN  e_nguyen::audio] PA state callback for Stream called with lock held
INTEL-MESA: error: ../mesa-19.0.1/src/intel/vulkan/anv_queue.c:45: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST)
INTEL-MESA: error: ../mesa-19.0.1/src/intel/vulkan/anv_queue.c:244: vkQueueSubmit() failed (VK_ERROR_DEVICE_LOST)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLost', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`', /home/grayshade/.cargo/registry/src/github.com-1ecc6299db9ec823/vulkano-0.11.1/src/buffer/cpu_pool.rs:703:13
stack backtrace:
   0:     0x55c0db04be43 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h39625934646a062b
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:     0x55c0db047a9b - std::sys_common::backtrace::_print::h5ed439e79e04d188
                               at src/libstd/sys_common/backtrace.rs:71
   2:     0x55c0db04a9b6 - std::panicking::default_hook::{{closure}}::h13bf33e40bf761d8
                               at src/libstd/sys_common/backtrace.rs:59
                               at src/libstd/panicking.rs:197
   3:     0x55c0db04a749 - std::panicking::default_hook::h7e24c700cb9d2623
                               at src/libstd/panicking.rs:211
   4:     0x55c0db04b0bf - std::panicking::rust_panic_with_hook::h37915b26028fb081
                               at src/libstd/panicking.rs:474
   5:     0x55c0db04ac41 - std::panicking::continue_panic_fmt::h940255bf34f40feb
                               at src/libstd/panicking.rs:381
   6:     0x55c0db04ab8e - std::panicking::begin_panic_fmt::h1304ab385b97fc1d
                               at src/libstd/panicking.rs:336
   7:     0x55c0da1f1cb5 - <vulkano::buffer::cpu_pool::CpuBufferPoolChunk<T, A> as core::ops::drop::Drop>::drop::h92be2d2a1116ccc3
                               at /home/grayshade/e-nguyen/<::std::macros::panic macros>:8
   8:     0x55c0da032be0 - core::ptr::real_drop_in_place::hd31faafa68e38e91
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
   9:     0x55c0da02d49d - core::ptr::real_drop_in_place::h895a6d7d1d7a05ab
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  10:     0x55c0da02306d - core::ptr::real_drop_in_place::h097ae4eef16e03de
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  11:     0x55c0da022cc0 - core::ptr::real_drop_in_place::h0610609b929667d5
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  12:     0x55c0da029570 - core::ptr::real_drop_in_place::h5948aa2ffa928232
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  13:     0x55c0da02fd25 - core::ptr::real_drop_in_place::haaf7a1fc62244ec1
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  14:     0x55c0da333c8f - <alloc::sync::Arc<T>>::drop_slow::h140f0df706a4e858
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:183
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/sync.rs:553
  15:     0x55c0da338ff5 - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h305896f0d6d07cb5
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/sync.rs:1011
  16:     0x55c0da025d4d - core::ptr::real_drop_in_place::h2f332ec25b6cf7b7
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  17:     0x55c0da02e186 - core::ptr::real_drop_in_place::h944e2ea0981e27c1
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  18:     0x55c0da02e186 - core::ptr::real_drop_in_place::h944e2ea0981e27c1
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  19:     0x55c0da02af82 - core::ptr::real_drop_in_place::h6ae489aeace045aa
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  20:     0x55c0da13fa14 - <smallvec::SmallVec<A> as core::ops::drop::Drop>::drop::h85ffa6247e8729ac
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:183
                               at /home/grayshade/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-0.6.9/lib.rs:1404
  21:     0x55c0da0339cd - core::ptr::real_drop_in_place::hdd2e5e4ec856dadb
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  22:     0x55c0da02309d - core::ptr::real_drop_in_place::h09c9bc83f2595aee
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  23:     0x55c0da02bb86 - core::ptr::real_drop_in_place::h729bd598a41383e0
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  24:     0x55c0da026562 - core::ptr::real_drop_in_place::h37c3db35637b9c97
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  25:     0x55c0da1c65af - <alloc::vec::Vec<T> as core::ops::drop::Drop>::drop::h8f832e9789407efd
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:183
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/vec.rs:2135
  26:     0x55c0da02c890 - core::ptr::real_drop_in_place::h7eae5439578d5bba
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  27:     0x55c0da031c0d - core::ptr::real_drop_in_place::hc723a29f1f1b331e
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  28:     0x55c0da0365d3 - core::ptr::real_drop_in_place::hfb920842e6afda15
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  29:     0x55c0da33414f - <alloc::sync::Arc<T>>::drop_slow::h29ff5ae52030c889
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:183
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/sync.rs:553
  30:     0x55c0da338dc5 - <alloc::sync::Arc<T> as core::ops::drop::Drop>::drop::h1675fd3d614d35c9
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/sync.rs:1011
  31:     0x55c0da03478d - core::ptr::real_drop_in_place::he90a97951e10244f
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  32:     0x55c0da031dd7 - core::ptr::real_drop_in_place::hc8a97deb05eb7efa
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  33:     0x55c0da0323ed - core::ptr::real_drop_in_place::hcd2cd2271291c00b
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  34:     0x55c0da03234a - core::ptr::real_drop_in_place::hcd25eb4037f28b64
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  35:     0x55c0da02a0b6 - core::ptr::real_drop_in_place::h625144fc4b6a849e
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  36:     0x55c0da025175 - core::ptr::real_drop_in_place::h25b14797b70b205f
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libcore/ptr.rs:193
  37:     0x55c0da1b6c07 - <e_nguyen::mesmerize::MezFramer as e_nguyen::rendering::Framer<'a, 'f, e_nguyen::mesmerize::MezFramer, e_nguyen::mesmerize::MezState, e_nguyen::mesmerize::MezResources>>::render_one::hdd06c50e4fcb9529
                               at src/mesmerize.rs:303
  38:     0x55c0da1b2060 - e_nguyen::mesmerize::mezmerize::h2b494dc742f62e4d
                               at src/mesmerize.rs:63
  39:     0x55c0da2aaf35 - e_nguyen::application::MezLauncher::launch::h408cb0817475223f
                               at src/application.rs:46
  40:     0x55c0da144f4d - e_nguyen::application::App::launch_mez::{{closure}}::h6bd3164a246225d2
                               at src/application.rs:112
  41:     0x55c0da2e2d82 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf6972280cb3c9855
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/sys_common/backtrace.rs:136
  42:     0x55c0da144bad - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::hc83652cee478ed77
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/thread/mod.rs:469
  43:     0x55c0da201140 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h4b8501fdda2d164a
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/panic.rs:309
  44:     0x55c0da1d3374 - std::panicking::try::do_call::haba865bdc117a05c
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/panicking.rs:293
  45:     0x55c0db04f969 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:87
  46:     0x55c0da1d2edd - std::panicking::try::h4fcee9bccf31e266
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/panicking.rs:272
  47:     0x55c0da201242 - std::panic::catch_unwind::hed0c35130fd98c41
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/panic.rs:388
  48:     0x55c0da144305 - std::thread::Builder::spawn_unchecked::{{closure}}::h31b63a7767877c0d
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/libstd/thread/mod.rs:468
  49:     0x55c0da144d76 - <F as alloc::boxed::FnBox<A>>::call_box::h2f9dba3b056f6de0
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/boxed.rs:749
  50:     0x55c0db04ecfd - std::sys::unix::thread::Thread::new::thread_start::h0b141bcf37c246b9
                               at /rustc/e68bf8ae15ee6c052d0bcc9252386c5c5ee86de2/src/liballoc/boxed.rs:759
                               at src/libstd/sys_common/thread.rs:14
                               at src/libstd/sys/unix/thread.rs:80
  51:     0x7fb09a56aa9c - start_thread
  52:     0x7fb09a480b22 - clone
  53:                0x0 - <unknown>
thread panicked while panicking. aborting.
knappador commented 5 years ago

Very solid!

  37:     0x55c0da1b6c07 - <e_nguyen::mesmerize::MezFramer as e_nguyen::rendering::Framer<'a, 'f, e_nguyen::mesmerize::MezFramer, e_nguyen::mesmerize::MezState, e_nguyen::mesmerize::MezResources>>::render_one::hdd06c50e4fcb9529
                               at src/mesmerize.rs:303

During that frame, some things will get dropped at the end that probably wait for the GPU to finish. I bet if you comment out the image copy, the crash goes away. This area only has an automatic memory barrier created by Vulkano but I don't think it's sufficient to avoid problems. I've observed racing in the GPU memory before when the audio buffer underflows and the image result is late.

lnicola commented 5 years ago

Well, I'm not sure. I commented the copy from line 283 (is that the one you meant?), but it had no effect.

There's also the failing debug_assert_eq!(chunks_in_use_lock[chunk_num].num_gpu_accesses, 0);, but I'm not sure what it means (beside that there's been a GPU access when it shouldn't have).

knappador commented 5 years ago

It's the lack of synchronization on compute.rs and mesmerizer.rs, which both use the same Queue. They are not supposed to be used simultaneously in multiple threads ;-)

On Fri, Mar 29, 2019 at 7:29 AM Laurențiu Nicola notifications@github.com wrote:

Well, I'm not sure. I commented the copy from line 283 (is that the one you meant?), but it had no effect.

There's also the failing debug_assert_eq!(chunks_in_use_lock[chunk_num].num_gpu_accesses, 0);, but I'm not sure what it means (beside that there's been a GPU access when it shouldn't have).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/e-nguyen/e-nguyen/issues/23#issuecomment-477794536, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnIc32-ecP2JLhrbnJ0Me-YAe7ZroiQks5vbUJHgaJpZM4cRLU2 .

m4b commented 5 years ago

Ditto have same crash:

     Running `target/release/e-nguyen --fullscreen`
Xlib:  extension "NV-GLX" missing on display ":0".
Xlib:  extension "NV-GLX" missing on display ":0".
[2019-04-06T19:24:31Z WARN  e_nguyen::ewin] No discrete device was found.
[2019-04-06T19:24:31Z WARN  e_nguyen::audio] PA state callback for Stream called with lock held
INTEL-MESA: error: ../mesa-18.3.1/src/intel/vulkan/anv_queue.c:45: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST)
INTEL-MESA: error: ../mesa-18.3.1/src/intel/vulkan/anv_queue.c:244: vkQueueSubmit() failed (VK_ERROR_DEVICE_LOST)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLost', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLostError', src/libcore/result.rs:997:5
stack backtrace:
   0:     0x558008ba6b83 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h6f8485a99cd65235
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1:     0x558008ba26eb - std::sys_common::backtrace::_print::hda68df8ffdc8836b
                               at src/libstd/sys_common/backtrace.rs:70
   2:     0x558008ba5646 - std::panicking::default_hook::{{closure}}::h088b387b03e5cd19
                               at src/libstd/sys_common/backtrace.rs:58
                               at src/libstd/panicking.rs:200
   3:     0x558008ba53c4 - std::panicking::default_hook::h889d608b727a206d
                               at src/libstd/panicking.rs:215
   4:     0x558008ba5d4f - std::panicking::rust_panic_with_hook::h889dadbdd3febf8b
                               at src/libstd/panicking.rs:478
   5:     0x558008ba58d1 - std::panicking::continue_panic_fmt::hf98a0f6c31afda38
                               at src/libstd/panicking.rs:385
   6:     0x558008ba57b5 - rust_begin_unwind
                               at src/libstd/panicking.rs:312
   7:     0x558008bbddfc - core::panicking::panic_fmt::h6d42f244a7f13dd4
                               at src/libcore/panicking.rs:85
   8:     0x55800879b140 - core::result::unwrap_failed::h5db95520a96b15bd
   9:     0x5580087e782d - core::ptr::real_drop_in_place::h684f042bc8607d9d
  10:     0x55800876d24f - core::ptr::real_drop_in_place::h6095e1e7280725f0
  11:     0x558008782cb5 - <e_nguyen::mesmerize::MezFramer as e_nguyen::rendering::Framer<'a, 'f, e_nguyen::mesmerize::MezFramer, e_nguyen::mesmerize::MezState, e_nguyen::mesmerize::MezResources>>::render_one::h6192d38bc3fedf23
  12:     0x55800877bf8a - e_nguyen::mesmerize::mezmerize::hfdd8571d64dfbd9f
  13:     0x5580087a2815 - e_nguyen::application::MezLauncher::launch::hdfeb66dead44dd59
  14:     0x558008baa619 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:87
  15:     0x5580088460db - <F as alloc::boxed::FnBox<A>>::call_box::hb0f3eb30250ce48d
  16:     0x558008ba99fd - std::sys::unix::thread::Thread::new::thread_start::h728dfdf3af1e2960
                               at /rustc/eac09088e1a8fc8a293028764e4e84da29469205/src/liballoc/boxed.rs:744
                               at src/libstd/sys_common/thread.rs:14
                               at src/libstd/sys/unix/thread.rs:81
  17:     0x7fae579faa9c - start_thread
  18:     0x7fae57910b22 - clone
  19:                0x0 - <unknown>
thread panicked while panicking. aborting.
Illegal instruction (core dumped)
knappador commented 5 years ago

I'm addressing the outer contextual issue where I had to resort to using Queue's from one family by developing some resource reservation infrastructure.

Also going to add a command line switch to turn on validation layers. Nvidia graphics cards are just more tolerant of the current hackery, but validation will show why / where. Stay tuned.

lnicola commented 5 years ago

Yeah, good idea about the validation, see the fence errors.

[2019-04-10T07:06:54Z WARN  e_nguyen::ewin] No discrete device was found.
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74240830, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74211700, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74212370, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74212880, type: 10, name: NULL
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC): msgNum: 0 - Submitted command buffer expects image 0x7f8a742498c0 (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, image 0x7f8a742498c0's current layout is VK_IMAGE_LAYOUT_UNDEFINED.
    Objects: 1
        [0] 0x7f8a7422f6d0, type: 6, name: NULL
[2019-04-10T07:06:55Z WARN  e_nguyen::audio] PA state callback for Stream called with lock held
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74256b00, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a7422f8b0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742301d0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742306e0, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f8a74285a20 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f8a74285a20, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74211700, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74240830, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742386a0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74234790, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f8a74256720 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f8a74256720, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74256b00, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742301d0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742306e0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a7425ce10, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f8a74256860 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f8a74256860, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74240830, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742386a0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74234690, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742115f0, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f8a742323e0 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f8a742323e0, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74256b00, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a7425ce10, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742301d0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742306e0, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f8a74285a20 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f8a74285a20, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742115f0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74240830, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742386a0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a7425d920, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f8a74256720 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f8a74256720, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a74256b00, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a7425ce10, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742301d0, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7f8a742306e0, type: 10, name: NULL
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC): msgNum: 0 - Submitted command buffer expects image 0x7f8a6c09ace0 (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, image 0x7f8a6c09ace0's current layout is VK_IMAGE_LAYOUT_UNDEFINED.
    Objects: 1
        [0] 0x7f8a6c0856b0, type: 6, name: NULL
INTEL-MESA: error: ../mesa-19.0.1/src/intel/vulkan/anv_queue.c:45: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST)
INTEL-MESA: error: ../mesa-19.0.1/src/intel/vulkan/anv_queue.c:244: vkQueueSubmit() failed (VK_ERROR_DEVICE_LOST)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLost', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: 0 - Attempt to destroy command pool with command buffer (0x7f8a6c0856b0) which is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 1
        [0] 0x7f8a6c0856b0, type: 6, name: NULL
VUID-vkFreeDescriptorSets-pDescriptorSets-00309(ERROR / SPEC): msgNum: 0 - Cannot call vkFreeDescriptorSets() on descriptor set 0x7f8a6c07abe0 that is in use by a command buffer. The Vulkan spec states: All submitted commands that refer to any element of pDescriptorSets must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkFreeDescriptorSets-pDescriptorSets-00309)
    Objects: 1
        [0] 0x7f8a6c07abe0, type: 23, name: NULL
VUID-vkDestroyImage-image-01000(ERROR / SPEC): msgNum: 0 - Cannot call vkDestroyImage on Image 0x7f8a6c09ace0 that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000)
    Objects: 1
        [0] 0x7f8a6c09ace0, type: 10, name: NULL
VUID-vkDestroyImageView-imageView-01026(ERROR / SPEC): msgNum: 0 - Cannot call vkDestroyImageView on ImageView 0x7f8a6c06c7a0 that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to imageView must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyImageView-imageView-01026)
    Objects: 1
        [0] 0x7f8a6c06c7a0, type: 14, name: NULL
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLostError', src/libcore/result.rs:997:5
knappador commented 5 years ago

I've added a command line switch for activating layers. It has duplicated the validation messages on my highly tolerant nvidia graphics card.

lnicola commented 5 years ago

Just curious, is that any different from using the environment variable?

knappador commented 5 years ago

@lnicola which environment variable? Is Vulkano already supporting one? --verbose and RUST_LOG just tune the log level for info! style macros.

lnicola commented 5 years ago

VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_core_validation on Linux / Mesa (not sure about other OS support). There's a couple more:

VK_LAYER_LUNARG_device_limits
VK_LAYER_LUNARG_core_validation
VK_LAYER_LUNARG_image
VK_LAYER_LUNARG_object_tracker
VK_LAYER_LUNARG_parameter_validation
VK_LAYER_LUNARG_swapchain
VK_LAYER_GOOGLE_threading
VK_LAYER_GOOGLE_unique_objects
knappador commented 5 years ago

I didn't know the ICD had this namespace, but yeah, it should do basically the same stuff.

Neither one of our setups seems to particularly care about the image layouts being trash. (but this is quite annoying as the API intends to hide the details)

The attempted command buffer destruction would make sense to result in loss of device.

INTEL-MESA: error: ../mesa-19.0.1/src/intel/vulkan/anv_queue.c:244: vkQueueSubmit() failed (VK_ERROR_DEVICE_LOST)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLost', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
VUID-vkDestroyCommandPool-commandPool-00041(ERROR / SPEC): msgNum: 0 - Attempt to destroy command pool with command buffer (0x7f8a6c0856b0) which is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkDestroyCommandPool-commandPool-00041)
    Objects: 1
        [0] 0x7f8a6c0856b0, type: 6, name: NULL

Over here, I get a stream filled with:

UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC): msgNum: 0 - Submitted command buffer expects image 0x6a6 (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, image 0x6a6's current layout is VK_IMAGE_LAYOUT_UNDEFINED.
    Objects: 1
        [0] 0x7fd51c0ec160, type: 6, name: NULL
VUID-vkAcquireNextImageKHR-semaphore-01286(ERROR / SPEC): msgNum: 0 - vkAcquireNextImageKHR: Semaphore must not be currently signaled or in a wait state. The Vulkan spec states: If semaphore is not VK_NULL_HANDLE it must be unsignaled (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-semaphore-01286)
    Objects: 1
knappador commented 5 years ago

I'm not sure how much of the synchronization API is actually implemented. I could not find a way to get a semaphore to be waited on. Using fences and the overkill wait on the future, I was able to get synchronization that runs but is still not super duper valid.

On the examples, I only see one validation error.

@lnicola can you pull this branch and see if it works? https://github.com/e-nguyen/e-nguyen/tree/fixing-synchronization

lnicola commented 5 years ago

No, it still complains about stuff and crashes:

VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7f164808a1a0 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7f164808a1a0, type: 7, name: NULL
    Objects: 1
        [0] 0x7f1648041bd0, type: 10, name: NULL
    Objects: 1
        [0] 0x7f1648066000, type: 10, name: NULL
    Objects: 1
        [0] 0x7f1648066510, type: 10, name: NULL
    Objects: 1
        [0] 0x7f16480701b0, type: 10, name: NULL
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC): msgNum: 0 - Submitted command buffer expects image 0x7f304407ad90 (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, image 0x7f304407ad90's current layout is VK_IMAGE_LAYOUT_UNDEFINED.
    Objects: 1
        [0] 0x7f3044042050, type: 6, name: NULL
INTEL-MESA: error: ../mesa-19.0.2/src/intel/vulkan/anv_queue.c:45: execbuf2 failed: Invalid argument (VK_ERROR_DEVICE_LOST)
INTEL-MESA: error: ../mesa-19.0.2/src/intel/vulkan/anv_queue.c:244: vkQueueSubmit() failed (VK_ERROR_DEVICE_LOST)
UNASSIGNED-CoreValidation-DrawState-InvalidFence(ERROR / SPEC): msgNum: 0 - Fence 0x7f3040064eb0 is already in use by another submission.
    Objects: 1
        [0] 0x7f3040064eb0, type: 7, name: NULL
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: DeviceLost', src/libcore/result.rs:997:5
knappador commented 5 years ago

Well, it's at least different. I'll have to dive into Vulkano's guts on the semaphores and barriers etc, which I'm not convinced are 100% implemented yet.

m4b commented 5 years ago

I actually just got a similar device lost error during the drop call on another project when constructing an immutable image. I tested the project on an older Linux laptop, Ubuntu 18.04 using Mesa Vulcan drivers, and it dies when creating the image. The same code works fine on my newer laptop running archlinux with explicit intel Vulkan drivers.

Can paste the failure location later (along with validation errors), wonder if it’s the same issue?

knappador commented 5 years ago

@m4b We should have only storage images, but there may be a pattern that leads us to a bug.

I'm going to crack open the semaphore bits and see what we actually implement today and whether we follow spec in upstream, vulkano

m4b commented 5 years ago

Cool ! Looking forward. Got kind of sad when same code failed on some slightly older hardware but so it goes. I’ll try to find some time to run with validation layers and report back here if it helps :)

knappador commented 5 years ago

I may have found some proper documentation on the intended use of the sync primitives in the msaa examples in Vulkano. I'll try to push out some better tests & docstrings upstream. It's not quite straightforward to map the raw Vulkan primitives to the Vulkano futures.

knappador commented 5 years ago

Progress! https://github.com/e-nguyen/e-nguyen/tree/fixing-synchronization

There were no validation errors on my machine other than what have seemed to be ignorable layout errors. It does crash pretty often and can't be resized etc. If people get it running in the current state, I will write up a proper PR based on the changes..

Looking forward to shipping a crate that at least most Linux users can run.

lnicola commented 5 years ago
[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!"
[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!"
[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!"
[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!"
[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!"
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: AccessError { error: AlreadyInUse, command_name: "vkCmdCopyImage", command_param: "destination", command_offset: 0 }', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:381
   6: rust_begin_unwind
             at src/libstd/panicking.rs:308
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: <e_nguyen::mesmerize::MezFramer as e_nguyen::rendering::Framer<e_nguyen::mesmerize::MezFramer,e_nguyen::mesmerize::MezState,e_nguyen::mesmerize::MezResources>>::render_one
  10: e_nguyen::application::MezLauncher::launch

Still seeing some fence errors:

    Objects: 1
        [0] 0x7fcc740762a0, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7fcc7405ba00 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7fcc7405ba00, type: 7, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7fcc74157660, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7fcc7404e140, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7fcc74075d90, type: 10, name: NULL
VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275)
    Objects: 1
        [0] 0x7fcc74158270, type: 10, name: NULL
VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7fcc74064330 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123)
    Objects: 1
        [0] 0x7fcc74064330, type: 7, name: NULL
[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!"
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: AccessError { error: AlreadyInUse, command_name: "vkCmdCopyImage", command_param: "destination", command_offset: 0 }', src/libcore/result.rs:997:5
knappador commented 5 years ago

F. Will ship my remaining changes tomorrow. Didn't think the image useage could possibly be related.

https://docs.rs/vulkano/0.7/vulkano/image/struct.ImageUsage.html

On Mon, Apr 22, 2019, 11:48 PM Laurențiu Nicola notifications@github.com wrote:

[src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!" [src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!" [src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!" [src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!" [src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!" thread '' panicked at 'called Result::unwrap() on an Err value: AccessError { error: AlreadyInUse, command_name: "vkCmdCopyImage", command_param: "destination", command_offset: 0 }', src/libcore/result.rs:997:5 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39 1: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:71 2: std::panicking::default_hook::{{closure}} at src/libstd/sys_common/backtrace.rs:59 at src/libstd/panicking.rs:197 3: std::panicking::default_hook at src/libstd/panicking.rs:211 4: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:474 5: std::panicking::continue_panic_fmt at src/libstd/panicking.rs:381 6: rust_begin_unwind at src/libstd/panicking.rs:308 7: core::panicking::panic_fmt at src/libcore/panicking.rs:85 8: core::result::unwrap_failed 9: <e_nguyen::mesmerize::MezFramer as e_nguyen::rendering::Framer<e_nguyen::mesmerize::MezFramer,e_nguyen::mesmerize::MezState,e_nguyen::mesmerize::MezResources>>::render_one 10: e_nguyen::application::MezLauncher::launch

Still seeing some fence errors:

Objects: 1
    [0] 0x7fcc740762a0, type: 10, name: NULL

VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7fcc7405ba00 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123) Objects: 1 [0] 0x7fcc7405ba00, type: 7, name: NULL VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275) Objects: 1 [0] 0x7fcc74157660, type: 10, name: NULL VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275) Objects: 1 [0] 0x7fcc7404e140, type: 10, name: NULL VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275) Objects: 1 [0] 0x7fcc74075d90, type: 10, name: NULL VUID-VkImageViewCreateInfo-usage-02275(ERROR / SPEC): msgNum: 0 - vkCreateImageView(): pCreateInfo->format VK_FORMAT_B8G8R8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL does not support usage that includes VK_IMAGE_USAGE_STORAGE_BIT. The Vulkan spec states: If usage contains VK_IMAGE_USAGE_STORAGE_BIT, then the image view's format features must contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkImageViewCreateInfo-usage-02275) Objects: 1 [0] 0x7fcc74158270, type: 10, name: NULL VUID-vkResetFences-pFences-01123(ERROR / SPEC): msgNum: 0 - Fence 0x7fcc74064330 is in use. The Vulkan spec states: Each element of pFences must not be currently associated with any queue command that has not yet completed execution on that queue (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkResetFences-pFences-01123) Objects: 1 [0] 0x7fcc74064330, type: 7, name: NULL [src/mesmerize.rs:339] "Tex was ready!" = "Tex was ready!" thread '' panicked at 'called Result::unwrap() on an Err value: AccessError { error: AlreadyInUse, command_name: "vkCmdCopyImage", command_param: "destination", command_offset: 0 }', src/libcore/result.rs:997:5

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/e-nguyen/e-nguyen/issues/23#issuecomment-485642139, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE4Q474GSEENUYGBPNPOADPR2IIZANCNFSM4HCEWU3A .

m4b commented 5 years ago

Are we sure the crash isn't here? https://github.com/e-nguyen/e-nguyen/blob/56d47a244c988a02252d25e487273832664d656b/src/settings.rs#L276 I thought I saw it during immutable image construction, and I'm also seeing vulkano crash there on an older linux laptop (on a separate project) as well...

knappador commented 5 years ago

Settings is only relevant if you launch without the -f flag right now

On Mon, Apr 22, 2019, 11:56 PM m4b notifications@github.com wrote:

Are we sure the crash isn't here? https://github.com/e-nguyen/e-nguyen/blob/56d47a244c988a02252d25e487273832664d656b/src/settings.rs#L276 I thought I saw it during immutable image construction, and I'm also seeing vulkano crash there on an older linux laptop as well...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/e-nguyen/e-nguyen/issues/23#issuecomment-485643436, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE4Q447JGOUIPRBGG3X5ETPR2JHBANCNFSM4HCEWU3A .

lnicola commented 5 years ago

No, I used -f

knappador commented 5 years ago

I just noticed that I did see a validation error when running release but not on debug.

All in favor of ransacking upstream say "aye".

lnicola commented 5 years ago

Nah, for me it crashes the same way in debug mode.

knappador commented 5 years ago

I'm considering porting over to Ash to avoid having to work through the Vulkano design to fix these kinds of oddball growing pains. I can write 10k lines of boilerplate and then write lower level abstractions for it more easily than I can do all this archaeology.

lnicola commented 5 years ago

Trying out gfx-hal or rendy might be a good idea. gfx-hal is supposed to be pretty similar to Vulkan.