R_FlushQuad: dont use 64bit/8byte copy on 32bit targets

on 32bit targets this will just compile into two 32bit copies which gcc cant optimize as well as it can with the byte copy (it seems to love to do some AVX stuff atleast in my tests)
so this is only useful for 64bit capable platforms (compiler does not seem to do 64bit copys for the byte copy case, so this ends up being faster)
This commit is contained in:
Alug committed 2025-10-20 16:32:39 +02:00
1 parent 119e022a55
commit 72ce4eea35
1 file changed
+2
+2
View File
@@ -156,6 +156,7 @@ static void R_FlushQuad(void)
if constexpr (Type & ColumnFlushType::FLUSH_OPAQUE)
{
#if __SIZEOF_POINTER__ >= 8 // does not make much sense on 32bit targets
// 8 byte aligned copy -- make sure our dest ptr, source ptr AND stride are a multiple of 8!
if ((((uintptr_t)dest | (uintptr_t)source | stride) & 7) == 0)
{
@@ -170,6 +171,7 @@ static void R_FlushQuad(void)
}
}
else
#endif
{
while (--count >= 0)
{