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

Fix examples on nvidia linux #955

Closed
wants to merge 1 commit into from

Conversation

rukai
Copy link
Member

@rukai rukai commented May 4, 2018

The examples currently crash almost immediately on nvidia linux.
This is due to an OutOfHostMemory error as described in this issue: #923, #627
This PR changes the examples to wait on the previous frame before submitting the next frame.

I think this is the best solution but other solutions I thought of are:

  • call wait method immediately after submitting frame
    • Only need the Box<GpuFuture> variable (dont need the Option<Arc<vulkano::sync::FenceSignalFuture<_>>>)
    • Wastes time blocking
  • Add a wait method to GpuFuture trait that fails silently/panics/returns error enum if called on any future other than FenceSignalFuture
    • Only need the Box<GpuFuture> variable
    • Doesnt waste time blocking
    • More potential runtime errors

@rukai
Copy link
Member Author

rukai commented Aug 11, 2018

As mentioned in #627 this issue is caused by this unresolved bug in nvidia drivers (apparently windows as well as linux) https://vulkan.lunarg.com/app/issues/56ca3a477ef24d0001787448
Because its a driver bug, this PR should not be merged. However it should be kept open until the issue is resolved as it documents a work around.

@jonathansty
Copy link
Contributor

@rukai just as a heads up that driver bug seems to be closed. The validation message definitely sounds like it's not a bug but just wrong usage in our case?

22:44:41 [ERROR] "Fence 0x12 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)"

@rukai
Copy link
Member Author

rukai commented Oct 12, 2018

oh, good to know, we'd better figure out whats going wrong then.

@jonathansty
Copy link
Contributor

I don't have enough knowledge on how vulkano handles the GPU futures.

However I did give a try to using some raw functions and using fences instead of the GpuFutures to wait. In my application this commit fixed the issue.

Although probably not the most optimal fix as I'm waiting before doing the submit and present and then also immediately waiting after.

@knappador
Copy link
Contributor

Motion to close; expiration date seems lapsed (the examples run on Nvidia hardware)

I do suspect we are missing a lot of behavior on synchronization given the validation, but mainly I'm just having difficulty getting Intel chips to run like Nvidia ones right now.

@AustinJ235
Copy link
Member

I know at least the image example still has the issue haven't tested the others. It is probably a good idea to resolve this pull request or open another one to allow the examples to run on nvidia cards.

@AustinJ235
Copy link
Member

closed in favor of #1246

@AustinJ235 AustinJ235 closed this Oct 20, 2019
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

Successfully merging this pull request may close these issues.

4 participants