Skip to content

Fix GLES3 new batch condition on adding to batch #107319

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kleonc
Copy link
Member

@kleonc kleonc commented Jun 9, 2025

Fixes #107297.

AFAICT both r_index and state.last_item_index used in the changed condition are actual item counts (they're one past the last used index; they start at 0, not -1). Meaning r_index + state.last_item_index is a valid item count and doesn't need to trigger new buffer creation.

Haven't dived much deeper but seems like this led to some index mismatching elsewhere, as the change fixes the crash for me. Absolutely not very familiar with that batching code so @clayjohn please check thoroughly. 🙂

Update: this seems to actually not fix the issue (#107297 (comment)), will need to dig deeper.

@kleonc kleonc added this to the 4.5 milestone Jun 9, 2025
@kleonc kleonc requested a review from clayjohn June 9, 2025 12:28
@kleonc kleonc requested a review from a team as a code owner June 9, 2025 12:28
@kleonc kleonc added bug topic:rendering crash topic:2d cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Jun 9, 2025
@kleonc kleonc removed the request for review from clayjohn June 13, 2025 14:49
@kleonc kleonc marked this pull request as draft June 13, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release crash topic:rendering topic:2d
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple TileMaps under SubViewport causes crash in Compatibility Mode
1 participant