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:
parent
3c7b01cd93
commit
76a43e4bdb
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue