Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsync disabled results in OoM #1

Open
rukai opened this issue Aug 25, 2019 · 1 comment
Open

vsync disabled results in OoM #1

rukai opened this issue Aug 25, 2019 · 1 comment
Labels
type:bug Something isn't working

Comments

@rukai
Copy link

rukai commented Aug 25, 2019

Runs fine if I enable vsync.
This seems similar to other issues I have encountered on nvidia GPU's where there is no delay when vsync is disabled so it renders and queues frames way too fast until it ooms.
Quite possibly an issue with wgpu instead of rx, but I haven't investigated it at all.

Occurs on:
OS: Arch Linux
GPU: GTX 960
Driver: Nvidia proprietary driver, version 418
Backend: Vulkan

The validation errors repeat many times before hitting the panic, I omitted most of them.

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages (0)] : vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
object info: (type: SWAPCHAIN_KHR, hndl: 11880)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages (0)] : vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
object info: (type: SWAPCHAIN_KHR, hndl: 11904)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [UNASSIGNED-CoreValidation-DrawState-SwapchainTooManyImages (0)] : vkAcquireNextImageKHR: Application has already acquired the maximum number of images (0x1)
object info: (type: SWAPCHAIN_KHR, hndl: 11928)

[2019-08-25T10:44:59Z ERROR gfx_backend_vulkan] 
VALIDATION [VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 (0)] : vkCreateSwapchainKHR() called with imageExtent = (850,1402), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (851,1402), minImageExtent = (851,1402), maxImageExtent = (851,1402). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
object info: (type: DEVICE, hndl: 94080094017968)

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: OutOfMemory(OutOfHostMemory)', src/libcore/result.rs:999:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:384
   8: rust_begin_unwind
             at src/libstd/panicking.rs:311
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::result::unwrap_failed
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/macros.rs:18
  11: core::result::Result<T,E>::unwrap
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libcore/result.rs:800
  12: wgpu_native::device::device_create_swap_chain
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.3.3/src/device.rs:1905
  13: wgpu_swap_chain_get_next_texture
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-native-0.3.3/src/swap_chain.rs:150
  14: wgpu::SwapChain::get_next_texture
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.3.0/src/lib.rs:1369
  15: rgx::core::SwapChain::next
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/rgx-0.1.0/src/core/mod.rs:1150
  16: rx::renderer::Renderer::frame
             at src/renderer.rs:265
  17: rx::init::{{closure}}::{{closure}}
             at ./src/lib.rs:157
  18: rx::FrameTimer::run
             at ./src/lib.rs:56
  19: rx::init::{{closure}}
             at ./src/lib.rs:156
  20: rx::platform::backend::Events::run::{{closure}}
             at ./src/platform/winit.rs:26
  21: winit::platform_impl::platform::sticky_exit_callback
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/mod.rs:656
  22: winit::platform_impl::platform::x11::EventLoop<T>::run_return
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/x11/mod.rs:285
  23: winit::platform_impl::platform::x11::EventLoop<T>::run
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/x11/mod.rs:382
  24: winit::platform_impl::platform::EventLoop<T>::run
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/platform_impl/linux/mod.rs:603
  25: winit::event_loop::EventLoop<T>::run
             at /home/rubic/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.20.0-alpha3/src/event_loop.rs:140
  26: rx::platform::backend::Events::run
             at ./src/platform/winit.rs:24
  27: rx::init
             at ./src/lib.rs:116
  28: rx::main
             at src/main.rs:16
  29: std::rt::lang_start::{{closure}}
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/rt.rs:64
  30: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:49
  31: std::panicking::try::do_call
             at src/libstd/panicking.rs:296
  32: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:82
  33: std::panicking::try
             at src/libstd/panicking.rs:275
  34: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  35: std::rt::lang_start_internal
             at src/libstd/rt.rs:48
  36: std::rt::lang_start
             at /rustc/eae3437dfe991621e8afdc82734f4a172d7ddf9b/src/libstd/rt.rs:64
  37: main
  38: __libc_start_main
  39: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@cloudhead
Copy link
Owner

Thanks for the issue!

I have a configurable frame delay that should make things go slower, but it's already on by default at 8ms, so I guess it isn't helping in this case. You can set it higher with :set frame_delay = 12 for example. I wonder if that would make a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants