Skip to content

Update sodium compat#146

Merged
Awakened-Redstone merged 5 commits into
ModFest:26.1from
ekulxam:26.1
Jul 16, 2026
Merged

Update sodium compat#146
Awakened-Redstone merged 5 commits into
ModFest:26.1from
ekulxam:26.1

Conversation

@ekulxam

@ekulxam ekulxam commented Jul 14, 2026

Copy link
Copy Markdown

Update sodium and modmenu deps
Long2ReferenceMap<RenderSection> sectionByPosition became SectionStorage renderSections in CaffeineMC/sodium@7d86fa6
SectionCollector was removed in CaffeineMC/sodium@a327f63 and seems to have been functionally replaced by VisibleChunkCollector

Testing: uncommented runtime sodium dependency and it works:tm: so I think it's fine (probably)


while (!success) {
if (cancellationToken.isCancelled()) {
// In theory, this would never be reached - SkyNotTheLimit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spamming F3 + A is an edge case and race condition nightmare

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more of a comment of where we happen to inject. Since the target method returns early if the cancellationToken was cancelled, then that statement should never be triggered, and I don't think it ever has, because the handler was not marked as cancellable even thought we call CallbackInfoReturnable#setReturnValue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it has to wait for the buffer queue to free space if there isn't enough, it is possible that it gets cancelled while waiting
I just have never been able to fill the index buffer queue

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see what you mean now
Would you like me to remove the comment?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I'm fairly sure I was correct in marking the injector as cancellable, unless you want me to revert that too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I'm fairly sure I was correct in marking the injector as cancellable, unless you want me to revert that too.

The cancellable is fine, I missed it when working on the fixes

@Awakened-Redstone

Copy link
Copy Markdown
Member

The sodium changes seem to affect the transparency resorting significantly
It's better to have more testing of that, the resorting needs the right data and ended up being quite complex due to having to work in 2 different backends

@Awakened-Redstone

Copy link
Copy Markdown
Member

"Asynchronous Graph Culling" worries me, the baked BE resorting relies on having the graph at the right order, and I don't know what would happen if it has a graph with more sections then the current one

@Awakened-Redstone

Copy link
Copy Markdown
Member

Ok, from what I can see it should be fine. Just have to make sure that the task is cancelled and the index buffer dropped if the async culling removes a section that has been queued for baked BE resorting.
There is no need to test it, just checking the code should be fine

@Awakened-Redstone

Copy link
Copy Markdown
Member

huh, weird, the terraformersmc maven is failing to provide the jars

@ekulxam

ekulxam commented Jul 16, 2026

Copy link
Copy Markdown
Author

Oh, so it's not just me?

@Awakened-Redstone

Copy link
Copy Markdown
Member

not even github is being able to get it

@Awakened-Redstone
Awakened-Redstone merged commit 6a765f8 into ModFest:26.1 Jul 16, 2026
1 of 2 checks passed
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.

2 participants