Skip to content
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

Fix incorrect buffer upload size in GLES2 draw_gui_primitive #58150

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

lawnjelly
Copy link
Member

The buffer upload size appears to have been incorrect for quite some time, which causes uploading from undefined memory.

May fix #58146

Notes

  • This appears to have been incorrect for at least 4 years
  • Be good to have @clayjohn double check this to make sure I'm not going mad(!)
  • Relies on p_points being equal to the number of points

@lawnjelly lawnjelly requested a review from a team as a code owner February 15, 2022 16:37
@timothyqiu
Copy link
Member

Tried this locally and the editor does not crash any more 👍

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Looks good!

If _draw_gui_primitive is called often, this may help relieve some of the pressure on the polygon buffer and could result in improved performance.

The buffer upload size appears to have been incorrect for quite some time, which causes uploading from undefined memory.
@akien-mga akien-mga merged commit 685d4b4 into godotengine:3.x Feb 15, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.4.4.

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.

4 participants