mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-21 23:53:51 +00:00
Added support for AMD Chips
This commit is contained in:
parent
7bf99e38ec
commit
ff7f48be6f
3 changed files with 27 additions and 3 deletions
|
|
@ -74,6 +74,9 @@ enum ProcessorType
|
|||
CPU_AMD_K6_2,
|
||||
CPU_AMD_K6_3,
|
||||
CPU_AMD_Athlon,
|
||||
CPU_AMD_Phenom,
|
||||
CPU_AMD_PhenomII,
|
||||
CPU_AMD_Bulldozer,
|
||||
CPU_AMD_Unknown,
|
||||
CPU_Cyrix_6x86,
|
||||
CPU_Cyrix_MediaGX,
|
||||
|
|
@ -510,7 +513,7 @@ extern void* dRealloc_r(void* in_pResize, dsize_t in_size, const char*, const ds
|
|||
extern void* dRealMalloc(dsize_t);
|
||||
extern void dRealFree(void*);
|
||||
|
||||
extern void *dMalloc_aligned(dsize_t in_size, S32 alignment);
|
||||
extern void *dMalloc_aligned(dsize_t in_size, intptr_t alignment);
|
||||
extern void dFree_aligned(void *);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ public:
|
|||
exit conditions.
|
||||
*/
|
||||
#define AssertFatal(x, y) \
|
||||
{ if (((bool)(x))==(bool)0) \
|
||||
{ if ( ::PlatformAssert::processAssert(::PlatformAssert::Fatal, __FILE__, __LINE__, y) ) { ::Platform::debugBreak(); } } }
|
||||
{ if (((bool)(x))==false) \
|
||||
{ if ( ::PlatformAssert::processAssert(::PlatformAssert::Fatal, __FILE__, __LINE__, y) ) { ::Platform::debugBreak(); } } }
|
||||
|
||||
#else
|
||||
#define AssertFatal(x, y) { TORQUE_UNUSED(x); TORQUE_UNUSED(y); }
|
||||
|
|
|
|||
|
|
@ -178,6 +178,9 @@ void SetProcessorInfo(Platform::SystemInfo_struct::Processor& pInfo,
|
|||
pInfo.properties |= (properties & BIT_SSE) ? CPU_PROP_SSE : 0;
|
||||
pInfo.properties |= ( properties & BIT_SSE2 ) ? CPU_PROP_SSE2 : 0;
|
||||
pInfo.properties |= (properties & BIT_3DNOW) ? CPU_PROP_3DNOW : 0;
|
||||
// Phenom and PhenomII support SSE3, SSE4a
|
||||
pInfo.properties |= ( properties2 & BIT_SSE3 ) ? CPU_PROP_SSE3 : 0;
|
||||
pInfo.properties |= ( properties2 & BIT_SSE4_1 ) ? CPU_PROP_SSE4_1 : 0;
|
||||
// switch on processor family code
|
||||
switch ((processor >> 8) & 0xf)
|
||||
{
|
||||
|
|
@ -223,6 +226,24 @@ void SetProcessorInfo(Platform::SystemInfo_struct::Processor& pInfo,
|
|||
pInfo.name = StringTable->insert("AMD Athlon");
|
||||
break;
|
||||
|
||||
// Phenom Family
|
||||
case 15:
|
||||
pInfo.type = CPU_AMD_Phenom;
|
||||
pInfo.name = StringTable->insert("AMD Phenom");
|
||||
break;
|
||||
|
||||
// Phenom II Family
|
||||
case 16:
|
||||
pInfo.type = CPU_AMD_PhenomII;
|
||||
pInfo.name = StringTable->insert("AMD Phenom II");
|
||||
break;
|
||||
|
||||
// Bulldozer Family
|
||||
case 17:
|
||||
pInfo.type = CPU_AMD_Bulldozer;
|
||||
pInfo.name = StringTable->insert("AMD Bulldozer");
|
||||
break;
|
||||
|
||||
default:
|
||||
pInfo.type = CPU_AMD_Unknown;
|
||||
pInfo.name = StringTable->insert("AMD (unknown)");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue