Game crashes with Vulkan graphics adapter on Geforce RTX
- Dominant language
- C++
- Stars
- 6.3k
- Forks
- 455
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 129
Description
**Describe the bug (REQUIRED)**
I decided to test my projects on Vulkan on Windows. On the Intel Arc B580, everything works perfectly, as well as on OpenGL. On the Geforce RTX 3090, the image jerks as if we have a very floating delta time. Plus the engine crashes on its own.
Drivers are latest, 576.52, and I tested previous versions as well.
No extra dependencies are used.
Vsync is on, 60 hz monitor.
Vulkan Cube demo from SDK runs well.
**To Reproduce (REQUIRED)**
Steps to reproduce the behavior:
1. Run the attached project.
**Expected behavior (REQUIRED)**
The project should run well.
**Defold version (REQUIRED):**
- Version: 1.10.1, 1.10.2 beta
**Platforms (REQUIRED):**
- Platforms: Windows 10
**Minimal repro case project (OPTIONAL):**
[vulkan_issue_on_rtx.zip](https://github.com/user-attachments/files/20674112/vulkan_issue_on_rtx.zip)
**Logs (OPTIONAL):**
```
INFO:DLIB: Log server started on port 51923
INFO:ENGINE: Target listening with name: ARTSIOM-PC - fe80::9bf4:6333:d43f:a6ef - Windows
INFO:ENGINE: Engine service started on port 51924
INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_VULKAN'
INFO:ENGINE: Defold Engine 1.10.2 (649461c)
INFO:DLIB: Initialized Remotery (ws://127.0.0.1:17815/rmt)
INFO:GRAPHICS: Vulkan device selected: NVIDIA GeForce RTX 3090
ERROR:ENGINE: Could not find '@render' socket.
ERROR:DLIB: Invalid cache index file 'C:/Users/Artsiom/AppData/Roaming/Defold/http-cache/index'. Removing file.
INFO:ENGINE: Loading data from: build/default
INFO:SOUND: Mix format:
INFO:SOUND: wFormatTag: fffe IEEE_FLOAT/PCM/EXTENSIBLE: 3 / 1 / fffe
INFO:SOUND: nChannels: 2
INFO:SOUND: nSamplesPerSec: 48000
INFO:SOUND: nAvgBytesPerSec: 384000
INFO:SOUND: nBlockAlign: 8
INFO:SOUND: wBitsPerSample: 32
INFO:SOUND: -> Format: 3 IEEE_FLOAT/PCM/EXTENSIBLE: 3 / 1 / fffe
INFO:SOUND: DSP backend: SSE
INFO:SOUND: Sound
INFO:SOUND: nSamplesPerSec: 48000
INFO:ENGINE: Initialised sound device 'default'
INFO:DLIB: SSDP: Started on address 172.21.160.1
INFO:DLIB: SSDP: Started on address 172.24.192.1
INFO:DLIB: SSDP: Started on address 192.168.56.1
INFO:DLIB: SSDP: Started on address 192.168.100.140
INFO:DLIB: SSDP: Started on address 192.168.198.1
INFO:DLIB: SSDP: Started on address 192.168.241.1
ERROR:GRAPHICS: Vulkan Error (..\src\vulkan\graphics_vulkan.cpp:1385) VK_ERROR_DEVICE_LOST
Assertion failed: 0, file ..\src\vulkan\graphics_vulkan.cpp, line 1385
INFO:CRASH: Successfully wrote Crashdump to file: C:/Users/Artsiom/AppData/Roaming/Defold/_crash
ERROR:CRASH: CALL STACK:
ERROR:CRASH: 0 0x7FF7AFCD0FB0 dmCrash::GenerateCallstack D:\a\defold\defold\engine\crash\src\backtrace_win32.cpp:144
ERROR:CRASH: 1 0x7FF7B00BCA9C raise /tmp/job4595122215750182228/minkernel/crts/ucrt/src/appcrt/misc/signal.cpp:547
ERROR:CRASH: 2 0x7FF7B00AD084 abort /tmp/job4595122215750182228/minkernel/crts/ucrt/src/appcrt/startup/abort.cpp:71
ERROR:CRASH: 3 0x7FF7B00AC030 common_assert_to_stderr /tmp/job4595122215750182228/minkernel/crts/ucrt/src/appcrt/startup/assert.cpp:186
ERROR:CRASH: 4 0x7FF7B00ABB48 _wassert /tmp/job4595122215750182228/minkernel/crts/ucrt/src/appcrt/startup/assert.cpp:443
ERROR:CRASH: 5 0x7FF7AFCB0D40 dmGraphics::VulkanFlip D:\a\defold\defold\engine\graphics\src\vulkan\graphics_vulkan.cpp:1393
ERROR:CRASH: 6 0x7FF7AFDC5A60 dmEngine::StepFrame D:\a\defold\defold\engine\engine\src\engine.cpp:2001
ERROR:CRASH: 7 0x7FF7AFDBFC00 dmEngineUpdate D:\a\defold\defold\engine\engine\src\engine.cpp:2449
ERROR:CRASH: 8 0x7FF7AFDC67D0 dmEngine::RunLoop D:\a\defold\defold\engine\engine\src\engine_loop.cpp:83
ERROR:CRASH: 9 0x7FF7AFCBA500 engine_main D:\a\defold\defold\engine\engine\src\engine_main.cpp:152
ERROR:CRASH: 10 0x7FF7B0065EA4 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
ERROR:CRASH: 11 0x7FF9AB787360 BaseThreadInitThunk :0
ERROR:CRASH: 12 0x7FF9AD15CC70 RtlUserThreadStart :0
ERROR:CRASH:
```
Crash dump:
[_crash.zip](https://github.com/user-attachments/files/20673351/_crash.zip)
**Screenshots (OPTIONAL):**
OpenGL - everything is okay
https://github.com/user-attachments/assets/5271b873-82d6-423c-a824-d52d8a95098d
Vulkan - jittering or it's like we're at 40 fps instead of 60 fps:
https://github.com/user-attachments/assets/01e9c2ee-cc13-4dd4-a5fe-2487bc0c8008
I hope the video shows the non-uniformity of image movement on Vulkan. I note that the "dt" in update is a bit "floating":
```
DEBUG:SCRIPT: update 0.016685999929905
DEBUG:SCRIPT: update 0.016660999506712
DEBUG:SCRIPT: update 0.016657000407577
DEBUG:SCRIPT: update 0.016659999266267
DEBUG:SCRIPT: update 0.01664499938488
DEBUG:SCRIPT: update 0.016702000051737
DEBUG:SCRIPT: update 0.016695000231266
DEBUG:SCRIPT: update 0.016653999686241
DEBUG:SCRIPT: update 0.016798999160528
DEBUG:SCRIPT: update 0.016914999112487
DEBUG:SCRIPT: update 0.016394000500441
DEBUG:SCRIPT: update 0.016548000276089
DEBUG:SCRIPT: update 0.016698999330401
DEBUG:SCRIPT: update 0.01668299920857
DEBUG:SCRIPT: update 0.016620999202132
DEBUG:SCRIPT: update 0.01672999933362
```
**Additional context (OPTIONAL):**
There is no extra software like RTSS installed, only Steam and RenderDoc. The screenshot from Vulkan Configurator (just to be sure that there are no hooks from RTSS etc):

Contributor guide
Assessment
This issue has not been assessed yet.