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 MultiMesh errors in editor and resource duplication #98541

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

ydeltastar
Copy link
Contributor

@ydeltastar ydeltastar commented Oct 26, 2024

The buffer property of a MultiMesh can't be set when there are no instances, but no instances are the default so it causes issues with the editor and resource duplication.

Trying to set the property in the editor gives this error:

rendering/renderer_rd/storage_rd/mesh_storage.cpp:1935 - Condition "p_buffer.size() != (multimesh->instances * (int)multimesh->stride_cache)" is true.

When the MultiMesh is a resource_local_to_scene, the engine gives this error every time it instantiates a scene with it:

Buffer argument is not a valid buffer of any type.

@ydeltastar ydeltastar requested review from a team as code owners October 26, 2024 06:19
@AThousandShips AThousandShips added bug topic:rendering cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Oct 26, 2024
@AThousandShips AThousandShips added this to the 4.4 milestone Oct 26, 2024
Copy link

@adadgio adadgio left a comment

Choose a reason for hiding this comment

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

Hi ! Any ETA for this issue to be merged ?

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 to me. Tested locally and I didn't notice any issues. I confirmed that the MRP is fixed

@akien-mga akien-mga merged commit 7f5ffdf into godotengine:master Nov 29, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@ydeltastar ydeltastar deleted the zero-multi-fix branch March 11, 2025 18:03
@akien-mga akien-mga removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instancing MultiMesh with local to scene flag set throws Vulkan buffer argument error
5 participants