Skip to content

Fix buffer size calculations in lightmapper_rd.cpp to account for element sizes #107820

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

Merged
merged 1 commit into from
Jun 22, 2025

Conversation

Meowcat285
Copy link
Contributor

@Meowcat285 Meowcat285 commented Jun 21, 2025

Fixes an issue where the buffer size passed into storage_buffer_create didn't equal the actual size of the data.

Fixes #107805

I'm not 100% sure if this is the best way to go about fixing this, but it worked for me at least. Let me know if there's a better way to do this

@Meowcat285 Meowcat285 requested a review from a team as a code owner June 21, 2025 20:10
@akien-mga akien-mga requested review from Ivorforce and clayjohn June 21, 2025 21:33
@akien-mga akien-mga added this to the 4.5 milestone Jun 21, 2025
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

Ohh, I totally should have caught that. Thanks for finding and fixing!
I just have some suggestions for to avoid the later allocations :)

@Meowcat285
Copy link
Contributor Author

@Ivorforce I applied all of your suggestions, thanks!

Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

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

I'm approving assuming the fix still works after the changes. Code looks good to me.

Before this can be merged, please squash your commits down into one. You can read up on the workflow here: https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html

@Meowcat285
Copy link
Contributor Author

@Ivorforce squash is all set, but let me double check just to be sure that it still works before you merge it

@Meowcat285
Copy link
Contributor Author

@Ivorforce Yep works perfect, ready to merge ✔️

@akien-mga akien-mga merged commit a5ccacd into godotengine:master Jun 22, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to bake lightmaps on newest master build
4 participants