GPU: Shader: Fix parser not being consistent

Using `std::sort` does not garantee the initial
order is kept for items with the same ranking value.

Using `std::stable_sort` fixes the issue.
This commit is contained in:
Clément Foucault
2025-08-14 20:42:54 +02:00
parent 0c69fb5f9f
commit 13d25a5cfc

View File

@@ -997,7 +997,7 @@ struct Parser {
}
/* Order mutations so that they can be applied in one pass. */
std::sort(mutations_.begin(), mutations_.end());
std::stable_sort(mutations_.begin(), mutations_.end());
int64_t offset = 0;
for (const Mutation &mut : mutations_) {