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

OpenGL: Fix uninitialized memory usage for GPUParticles interp_to_end #84189

Conversation

akien-mga
Copy link
Member

Fixes #84072.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just leaving a comment in there that ParticlesFrameParams doesn't initialize any scalar members at all.

Copy link
Member

Choose a reason for hiding this comment

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

ParticlesFramesParams initializes everything when it is used

ParticlesFrameParams frame_params;
Since every property is always set, it would be wasteful to default initialize as well

Copy link
Member Author

@akien-mga akien-mga Oct 30, 2023

Choose a reason for hiding this comment

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

Until we forget to set one new member added to the struct ;)

But I guess in that case we might prefer a bug than a safe default value that hides not properly respecting the configuration.

@akien-mga akien-mga merged commit 8c7e20d into godotengine:master Oct 30, 2023
15 checks passed
@akien-mga akien-mga deleted the opengl-gpuparticles-initialize-interp_to_end branch October 30, 2023 15:30
@akien-mga akien-mga changed the title OpenGL: Fix uninitialized memory usage for GPUPartciles interp_to_end OpenGL: Fix uninitialized memory usage for GPUParticles interp_to_end Oct 31, 2023
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.

GPU Particles 2D/3D in compatibility rendering sometimes don't emit on 4.2
3 participants