Skip to content

Conversation

ggcrunchy
Copy link
Contributor

Versions >= 3713 stream some smaller-than-int data to GLCommandBuffer: bool in the FBO case, and then there are U16s elsewhere. Some platforms seem to be choking on the unaligned reads that result.

This is the fix posted in #760. I suspect it's also what #751 is about—captures and snapshots both touch FBOs—but still waiting on word there.

This replaces the reinterpret_cast + dereference with a (fixed-size, per template instantiation) memcpy(). From various C++ discussions I've followed it sounds like all the compilers we use will do the obvious (safe) peephole optimization here.

@ggcrunchy ggcrunchy requested a review from Shchvova as a code owner February 20, 2025 19:41
@Shchvova Shchvova merged commit fab8a5e into coronalabs:master Feb 21, 2025
1 check 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