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

Thread safety documentation #32

Open
f6cd opened this issue Mar 16, 2023 · 1 comment
Open

Thread safety documentation #32

f6cd opened this issue Mar 16, 2023 · 1 comment

Comments

@f6cd
Copy link

f6cd commented Mar 16, 2023

I was looking at implementing multi-threading in my engine for uploading textures. I used the CommandList::writeTexture method. Unfortunately this causes a crash, as although it's a member of the command list (which should be able to be recorded in parallel?), behind the scenes it interfaces with the (Vulkan) device to allocate memory.

Some documentation on which methods are thread safe, and an overview of how to safely use them in the Programming Guide would be very helpful I think? Thanks

@apanteleev
Copy link
Contributor

Thanks for bringing this up. The intention is that all CommandList methods should be thread-safe, but apparently some things are broken in that sense. To my knowledge, we haven't done extensive multi-threaded testing of NVRHI to find those bugs, and that's something that should be done, and bugs should be fixed.

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

2 participants