Fix union order to simplify empty initializers

This is a followup to PR #101344 (commit
0e06eb80bc).

Some of them were not an issue because Godot was initializing all
members, but they were "fixed" just in case since it could become a
problem in the future.

Valgrind was specifically complaining about HashMapData &
GlobalPipelineData.
This commit is contained in:
Matias N. Goldberg
2025-01-14 19:01:30 -03:00
parent 4ce466d7fa
commit 7b2f1e1d09
6 changed files with 19 additions and 19 deletions

View File

@ -250,6 +250,10 @@ private:
};
union {
struct {
uint64_t sort_key1;
uint64_t sort_key2;
};
struct {
uint64_t lod_index : 8;
uint64_t surface_index : 8;
@ -265,10 +269,6 @@ private:
uint64_t depth_layer : 4;
uint64_t priority : 8;
};
struct {
uint64_t sort_key1;
uint64_t sort_key2;
};
} sort;
RS::PrimitiveType primitive = RS::PRIMITIVE_MAX;