bgfx: Linux/NVIDIA/vulkan: fullscreen window stops updating
Describe the bug This was originally reported against mame (https://github.com/mamedev/mame/issues/7820) but I have finally managed to reproduce it with bgfx examples. In brief, with examples built with --enable-sdl, fullscreen window will stop updating a few moments after hitting ctrl-f.
To Reproduce Steps to reproduce the behavior:
- Edit makefile as follows:
diff --git a/makefile b/makefile
index 667852910..193884fe4 100644
--- a/makefile
+++ b/makefile
@@ -104,7 +104,7 @@ wasm-release: .build/projects/gmake-wasm ## Build - Emscripten Release
wasm: wasm-debug wasm-release ## Build - Emscripten Debug and Release
.build/projects/gmake-linux:
- $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
+ $(GENIE) --with-tools --with-combined-examples --with-shared-lib --with-sdl --gcc=linux-gcc gmake
linux-debug64: .build/projects/gmake-linux ## Build - Linux x64 Debug
$(MAKE) -R -C .build/projects/gmake-linux config=debug64
linux-release64: .build/projects/gmake-linux ## Build - Linux x64 Release
- Start examples
- Switch to full screen with ctrl-f
- Wait until screen stops updating
Expected behavior Screen keeps updating as it does when --gl is passed
Screenshots N/A
Additional context This appears to only happen with nvidia binary drivers, my amd laptop is not affected.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- Fix crash when switching to fullscreen with vulkan Without this change, running examples under XWayland, SDL and vulkan renderer results in a crash. Credit goes to @pezcode: https://github.com/bkarad... — committed to belegdol/bgfx by belegdol 3 years ago
- Fix crash when switching to fullscreen with vulkan (#2598) Without this change, running examples under XWayland, SDL and vulkan renderer results in a crash. Credit goes to @pezcode: https://github.... — committed to bkaradzic/bgfx by belegdol 3 years ago
- Fix crash when switching to fullscreen with vulkan (#2598) Without this change, running examples under XWayland, SDL and vulkan renderer results in a crash. Credit goes to @pezcode: https://github.co... — committed to belegdol/mame by belegdol 3 years ago
- Fix crash when switching to fullscreen with vulkan (#2598) Without this change, running examples under XWayland, SDL and vulkan renderer results in a crash. Credit goes to @pezcode: https://github.... — committed to jazzbre/bgfx by belegdol 3 years ago
- Fix crash when switching to fullscreen with vulkan (#2598) Without this change, running examples under XWayland, SDL and vulkan renderer results in a crash. Credit goes to @pezcode: https://github.... — committed to mipek/bgfx by belegdol 3 years ago
This seems fixed as of 510.47.03 nvidia driver. From 510.39.01 changelog [1]:
[1] https://forums.developer.nvidia.com/t/linux-solaris-and-freebsd-driver-510-39-01-beta/200220
Sorry for the delay… I tried the Live USB a while back and the experience was questionable, but I got a new SSD the other day so I can properly dual boot into Pop OS now.
Good news is I can reproduce a crash when going fullscreen. Bad news is that’s about as much info as I got. For some reason Vulkan validation layers aren’t working and I just get
VK_ERROR_DEVICE_LOST
which is about as helpful as “something went wrong”. Also getting device lost simply when resizing, something fishy going on with SDL2 that the X11 entry is not triggering. I’ll try to find some time over the weekend to debug this, will let you know if I find anything else.That crash is probably an unrelated bug 🙊 Can you add
case VK_SUBOPTIMAL_KHR:
here: https://github.com/bkaradzic/bgfx/blob/ee0fbea72662f702d7a95fba793a1c7371cfde5f/src/renderer_vk.cpp#L7322 (so bothSUBOPTIMAL
andOUT_OF_DATE
setm_needToRefreshSwapchain = true
). That should at least fix that.Thanks for the pointer on the live USB, might work better than a VM.