-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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 TextureStorage
not assigning default scale
#83199
Fix TextureStorage
not assigning default scale
#83199
Conversation
I think this should be fixed by ensuring the value is valid, and have an error in the |
I would be fine with that route, but I was mirroring the implementation of another function that also handles scale. Would that mean the error case should be applied there as well? |
That case doesn't cover all the values though it looks like Or wait it's a different enum |
I think it's more important to identify how an invalid value could have gotten in, that indicates problems, and shouldn't just be patched over |
It'd be more involved to try and replicate the scenario that caused it, but that's a very valid point. It was happening often (exclusively?) when experimenting with double-precision int structs (godotengine/godot-proposals#7210), so I'll try to work backwards from there |
Alright, figured it out! I recreated the scenario by making Vector2i use
So line 2320 was the culprit, not strictly because a default case was passed, but because it was using the Vector2i So while the proposed change in this PR is technically appropriate, it wasn't actually reaching that stage in practice. Instead, I'll shift direction to your initial proposal and assign an error to the default cases |
• Print errors if an invalid value is passed
3b911ad
to
9ee41c7
Compare
Thanks! |
While I don't know the exact conditions to cause it, I've had builds occasionally fail when processing the
_render_target_get_sdf_rect
functions, citing a value wasn't initalized (default switch case did nothing). The issue was fixed by mirroring the switch implementation in_render_target_allocate_sdf
for the two relevant files