Fix #26475: Remove bounding box prefetch from sort functions (#26566)

This commit is contained in:
mix authored and GitHub committed 2026-05-19 19:18:44 +00:00
1 parent 4fc19c9ccc
commit f6cbe956f0
2 files changed
+1 -10

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
0.5.2 (in development)
------------------------------------------------------------------------
- Improved: [#26566] Improve the performance of sorting sprites.
- Fix: [#26583] The default tab is not highlighted when opening a ride window.
0.5.1 (2026-05-17)
-10
View File
@@ -23,7 +23,6 @@
#include "../localisation/LocalisationService.h"
#include "../localisation/StringIdType.h"
#include "../paint/Painter.h"
#include "../platform/Memory.h"
#include "../profiling/Profiling.h"
#include "Boundbox.h"
#include "Paint.Entity.h"
@@ -470,10 +469,6 @@ static void PaintStructsSortQuadrantLegacy(PaintStruct* parent, PaintStruct* chi
auto* ps = child;
child = child->NextQuadrantEntry;
if (child != nullptr)
{
PREFETCH(&child->Bounds);
}
if (child == nullptr || child->SortFlags & PaintSortFlags::OutsideQuadrant)
{
break;
@@ -518,11 +513,6 @@ static void PaintStructsSortQuadrantStable(PaintStruct* parent, PaintStruct* chi
{
PaintStruct* next = child->NextQuadrantEntry;
if (next != nullptr)
{
PREFETCH(&next->Bounds);
}
// Stop if at the end of the list or outside the quadrant range.
if (next == nullptr || next->SortFlags & PaintSortFlags::OutsideQuadrant)
{