-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Make RID_Owner<Texture>
threadsafe in TextureStorage
for GLES3
#88205
Conversation
RID_Owner<Texture>
threadsafe in TextureStorage
for gles3RID_Owner<Texture>
threadsafe in TextureStorage
for GLES3
b2760e6
to
89c5609
Compare
89c5609
to
09d2c09
Compare
I'm not sure you can create textures from threads in the OpenGL ES backend. Also, there's some ongoing work (#77004) that may need to be aware of this change to potentially revert it if it turns out in the end to be possible to funnel all the renderer calls via a unique thread in the case of GL. |
It is (currently) possible to create textures from threads, atleast that is what I found while debugging my issue. Or atleast you can create the RID from a thread. |
Oh, right. Allocating a PS: I'm wondering if |
Like: Perhaps? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense, but I don't have time to repro and debug, and I'm not very familiar with the GL implementation. I'm approving, but TIWAGOS.
Not quite... The requirements here would be: 1) any thread can allocate uninitialized RIDs, 2) only the "owner" thread can do everything else. So, both usages involve writing, but with different constraints. |
Thanks! |
Cherry-picked for 4.2.2. |
Please also cherry pick this for Godot 4.1.5 next. thankyou! |
This seems to fix #88195. In the Vulkan driver the
RID_Owner<Texture>
is already thread safe and indeed, textures might be created from threads. Also theRID_Owner<CanvasTexture>
for gles3 is thread safe as well. I think this was just forgotten to add for theTexture
one in a refactor.