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

ResizableBar broken on NVIDIA GPUs, causing Vulkan device lost #11

Open
Neo-Zhixing opened this issue Jul 2, 2023 · 0 comments
Open

Comments

@Neo-Zhixing
Copy link
Member

Neo-Zhixing commented Jul 2, 2023

It seems that ResizableBar simply doesn't work on NVIDIA GPUs. On my PC with Intel i9 10850k and RTX3060Ti, NVIDIA exposes DEVICE_LOCAL_BIT | HOST_VISIBLE_BIT | HOST_COHERENT_BIT on a 8G device local memory heap. Allocation and memcpy into this memory type is fine, but if ray tracing workload is running simultaneously, there is a 50% chance that the screen would freeze for a few seconds during startup when assets were copied into video memory with Rust's copy_from_slice. vkWaitForFences subsequently returns VK_ERROR_DEVICE_LOST. The fault seems to happens during memcpy.

To reproduce, run the castle example with debug settings. When using release, things happen so fast that the scene would be loaded into memory before the first frame shows up on the screen.

The workaround at the moment is that we disable ResizableBar entirely on NVIDIA GPUs. The codepath involving ResizableBar would therefore only apply to AMD discrete GPUs. (Intel discrete GPUs only expose 256MB of device-local, host visible memory at the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant