Sodium

Sodium

44M Downloads

RenderImmediate is not thread-safe in Sodium 0.5.x

fayer3 opened this issue ยท 1 comments

commented

having multiple threads try to render blocks causes issues with sodium, seems to be fine with vanilla though
we do this here, to speed up the initial load times of our menu world a bit:
https://github.com/ferriarnus/VivecraftMod/blob/db92701765e2af34e31adc25edfb267b343cde78/common/src/main/java/org/vivecraft/client_vr/menuworlds/MenuWorldRenderer.java#L257-L260

currently have a detection if sodium is present and do it in series then.

tested with sodium 1.20.1 0.5.0 Beta 3.1

log: latest.log

commented

This is caused by the shared memory stack in RenderImmediate. We should just get rid of it, since using it instead of the thread-local MemoryStack is a micro-optimization at best. The only thing we have to be careful of is not exploding the stack size.