mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
- now that SSE2 is a required feature for compiling on x86, DoBlending_MMX has no use anymore and could be removed, as could the checks for bRDTSC, which is an older hardware feature than SSE2. There's also little point printing pre-SSE2 hardware features because they can be assumed to be present on anything the code can run on.
This commit is contained in:
parent
63e0310961
commit
ace0568d09
5 changed files with 11 additions and 42 deletions
|
@ -14,11 +14,7 @@ extern double gl_MillisecPerCycle;
|
|||
|
||||
__forceinline int64_t GetClockCycle ()
|
||||
{
|
||||
#if _M_X64
|
||||
return __rdtsc();
|
||||
#else
|
||||
return CPU.bRDTSC ? __rdtsc() : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined __APPLE__ && (defined __i386__ || defined __x86_64__)
|
||||
|
|
|
@ -115,13 +115,7 @@ extern "C" unsigned __int64 __rdtsc(void);
|
|||
#pragma intrinsic(__rdtsc)
|
||||
inline unsigned __int64 rdtsc()
|
||||
{
|
||||
#ifndef _M_X64
|
||||
if (CPU.bRDTSC)
|
||||
#endif
|
||||
{
|
||||
return __rdtsc();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
inline uint64_t rdtsc()
|
||||
|
|
|
@ -410,7 +410,6 @@ void InitPalette ()
|
|||
R_InitColormaps ();
|
||||
}
|
||||
|
||||
void DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
||||
void DoBlending_SSE2 (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
|
||||
|
||||
void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a)
|
||||
|
@ -435,9 +434,7 @@ void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, in
|
|||
return;
|
||||
}
|
||||
#if defined(_M_X64) || defined(_M_IX86) || defined(__i386__) || defined(__amd64__)
|
||||
else if (CPU.bSSE2)
|
||||
{
|
||||
if (count >= 4)
|
||||
else if (count >= 4)
|
||||
{
|
||||
int not3count = count & ~3;
|
||||
DoBlending_SSE2 (from, to, not3count, r, g, b, a);
|
||||
|
@ -449,24 +446,6 @@ void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, in
|
|||
from += not3count;
|
||||
to += not3count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(_M_IX86) || defined(__i386__)
|
||||
else if (CPU.bMMX)
|
||||
{
|
||||
if (count >= 4)
|
||||
{
|
||||
int not3count = count & ~3;
|
||||
DoBlending_MMX (from, to, not3count, r, g, b, a);
|
||||
count &= 3;
|
||||
if (count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
from += not3count;
|
||||
to += not3count;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
int i, ia;
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ void CalculateCPUSpeed()
|
|||
|
||||
QueryPerformanceFrequency (&freq);
|
||||
|
||||
if (freq.QuadPart != 0 && CPU.bRDTSC)
|
||||
if (freq.QuadPart != 0)
|
||||
{
|
||||
LARGE_INTEGER count1, count2;
|
||||
cycle_t ClockCalibration;
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
Win32GLVideo::Win32GLVideo(int parm) : m_Modes(NULL), m_IsFullscreen(false)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (CPU.bRDTSC) gl_CalculateCPUSpeed();
|
||||
gl_CalculateCPUSpeed();
|
||||
#endif
|
||||
I_SetWndProc();
|
||||
m_DisplayWidth = vid_defwidth;
|
||||
|
|
Loading…
Reference in a new issue