Add a double-precision editor build to CI#55572
Conversation
fire
left a comment
There was a problem hiding this comment.
This is required to keep float=64 from breaking.
|
A common request is to combine it with one of the existing cicd builds, but will wait for that request. |
I think we need to keep the number of builds the same. |
|
For nonstandard builds, I would probably look at moving them to a separate CI workflow that run according to a weekly schedule. This way, we don't have to worry about stealing CI time from other commits and pull requests. We can also do this to provide fully optimized builds for various platforms 🙂 |
|
The point is to prevent merges that fail this test and have the contributors attend to the breakage. Having them be non fatal would defeat this goal. |
bruvzg
left a comment
There was a problem hiding this comment.
TextServer still have a few more real_t variables used, it won't break a build, but should be eventually changed to avoid unnecessary conversions.
|
I would prefer enabling double support in the existing linux + sanitizers build instead of duplicating it. |
d4929c1 to
025a8a0
Compare
|
@akien-mga Done, it's now modifying that build instrad of adding a new one. |
There was a problem hiding this comment.
I see here you're changing float to real_t for the width parameter, but in TextServer it's changed the other way around. How do you decide? (In both cases it's small numbers a very high precision pixel values don't really make sense so float would be good enough precision wise.)
There was a problem hiding this comment.
I was going for the minimum changes to make it compile, but it's better to just make this float.
There was a problem hiding this comment.
It doesn't need to, it has the same behavior as (real_t)1.0 or similar. float - double will implicitly make the float become double, and 1.0f is represented exactly.
025a8a0 to
e9808e3
Compare
|
Thanks! |
|
Bit of a question about this PR. Can we still use float with GDscript or do we have to use double? Either way very happy to see this merged :) |
|
Scalar floats in GDScript are always double-precision, but packed arrays can store either 32-bit or 64-bit floats in Godot 4.0 (PackedFloat32Array vs PackedFloat64Array). In Godot 3.x, PoolRealArray always stores 32-bit floats. The same thing applies to packed/pooled integer arrays. |
Ok good to know. Thank you for the very insightful reply :) |
This PR fixes enough of Godot's code so that it compiles with
float=64again and adds a double-precision editor build to the CI. Some of the code changes are for the OpenGL support, some are in the text server, and some are in GLTF. Once this is in CI, this will checkfloat=64for every commit so that it will keep compiling.