Skip to content

Commit 9cebd44

Browse files
committed
minor fixes
1 parent a103391 commit 9cebd44

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

engine/l_studio.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "materialsystem/materialsystem_config.h"
4141
#include "materialsystem/itexture.h"
4242
#include "IHammer.h"
43-
#if defined( _WIN32 ) && !defined( _X360 ) && !defined(_M_ARM)
43+
#if defined( _WIN32 ) && defined( _M_IX86 )
4444
#include <xmmintrin.h>
4545
#endif
4646
#include "staticpropmgr.h"

public/materialsystem/imesh.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX7_t &vertex )
12201220
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
12211221
Assert( m_nCurrentVertex < m_nMaxVertexCount );
12221222

1223-
#if defined( _WIN32 ) && !defined( _X360 ) && defined( _M_IX86 )
1223+
#if defined( _WIN32 ) && defined( _M_IX86 )
12241224
const void *pRead = &vertex;
12251225
void *pCurrPos = m_pCurrPosition;
12261226
__asm
@@ -1265,7 +1265,7 @@ inline void CVertexBuilder::Fast4VerticesSSE(
12651265
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
12661266
Assert( m_nCurrentVertex < m_nMaxVertexCount-3 );
12671267

1268-
#if defined( _WIN32 ) && !defined( _X360 ) && defined( _M_IX86 )
1268+
#if defined( _WIN32 ) && defined( _M_IX86 )
12691269
void *pCurrPos = m_pCurrPosition;
12701270
__asm
12711271
{
@@ -1426,7 +1426,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX8_t &vertex )
14261426
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
14271427
Assert( m_nCurrentVertex < m_nMaxVertexCount );
14281428

1429-
#if defined( _WIN32 ) && !defined( _X360 ) && defined( _M_IX86 )
1429+
#if defined( _WIN32 ) && defined( _M_IX86 )
14301430
const void *pRead = &vertex;
14311431
void *pCurrPos = m_pCurrPosition;
14321432
__asm

public/mathlib/mathlib.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ inline float SimpleSplineRemapValClamped( float val, float A, float B, float C,
11881188

11891189
FORCEINLINE int RoundFloatToInt(float f)
11901190
{
1191-
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__)
1191+
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(PLATFORM_WINDOWS_PC64)
11921192
return _mm_cvtss_si32(_mm_load_ss(&f));
11931193
#elif defined( _X360 )
11941194
#ifdef Assert

public/mathlib/ssemath.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ FORCEINLINE fltx4 ReplicateX4( float flValue )
18341834
FORCEINLINE float SubFloat( const fltx4 & a, int idx )
18351835
{
18361836
// NOTE: if the output goes into a register, this causes a Load-Hit-Store stall (don't mix fpu/vpu math!)
1837-
#if defined(_WIN32) && defined(__i386__) || defined(__x86_64__)
1837+
#if defined(_WIN32) && (defined(__i386__) || defined(__x86_64__))
18381838
return a.m128_f32[ idx ];
18391839
#else
18401840
return (reinterpret_cast<float const *>(&a))[idx];
@@ -1843,7 +1843,7 @@ FORCEINLINE float SubFloat( const fltx4 & a, int idx )
18431843

18441844
FORCEINLINE float & SubFloat( fltx4 & a, int idx )
18451845
{
1846-
#if defined(_WIN32) && defined(__i386__) || defined(__x86_64__)
1846+
#if defined(_WIN32) && (defined(__i386__) || defined(__x86_64__))
18471847
return a.m128_f32[ idx ];
18481848
#else
18491849
return (reinterpret_cast<float *>(&a))[idx];
@@ -1857,7 +1857,7 @@ FORCEINLINE uint32 SubFloatConvertToInt( const fltx4 & a, int idx )
18571857

18581858
FORCEINLINE uint32 SubInt( const fltx4 & a, int idx )
18591859
{
1860-
#if defined(_WIN32) && defined(__i386__) || defined(__x86_64__)
1860+
#if defined(_WIN32) && (defined(__i386__) || defined(__x86_64__))
18611861
return a.m128_u32[ idx ];
18621862
#else
18631863
return (reinterpret_cast<uint32 const *>(&a))[idx];
@@ -1866,7 +1866,7 @@ FORCEINLINE uint32 SubInt( const fltx4 & a, int idx )
18661866

18671867
FORCEINLINE uint32 & SubInt( fltx4 & a, int idx )
18681868
{
1869-
#if defined(_WIN32) && defined(__i386__) || defined(__x86_64__)
1869+
#if defined(_WIN32) && (defined(__i386__) || defined(__x86_64__))
18701870
return a.m128_u32[ idx ];
18711871
#else
18721872
return (reinterpret_cast<uint32 *>(&a))[idx];

public/tier0/tslist.h

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#if defined( PLATFORM_64BITS ) && !defined(_M_ARM64)
3838

3939
#if defined (PLATFORM_WINDOWS)
40-
typedef __int128 int128;
4140
//typedef __m128i int128;
4241
//inline int128 int128_zero() { return _mm_setzero_si128(); }
4342
#else // PLATFORM_WINDOWS

studiorender/r_studiodraw.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ static matrix3x4_t *ComputeSkinMatrix( mstudioboneweight_t &boneweights, matrix3
657657
static matrix3x4_t *ComputeSkinMatrixSSE( mstudioboneweight_t &boneweights, matrix3x4_t *pPoseToWorld, matrix3x4_t &result )
658658
{
659659
// NOTE: pPoseToWorld, being cache aligned, doesn't need explicit initialization
660-
#if defined( _WIN32 ) && !defined( _X360 ) && defined(_M_IX86)
660+
#if defined( _WIN32 ) && defined(_M_IX86)
661661
switch( boneweights.numbones )
662662
{
663663
default:

tier0/cpu.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const tchar* GetProcessorVendorId();
2222

2323
static bool cpuid(uint32 function, uint32& out_eax, uint32& out_ebx, uint32& out_ecx, uint32& out_edx)
2424
{
25-
#if !defined(__i386__) && !defined(__x86_64) || defined( _X360 )
25+
#if !defined(__i386__) && !defined(__x86_64)
2626
return false;
2727
#elif defined(GNUC)
2828

tier0/stacktools.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ int GetCallStack_Fast( void **pReturnAddressesOut, int iArrayCount, int iSkipCou
175175
{
176176
//Only tested in windows. This function won't work with frame pointer omission enabled. "vpc /nofpo" all projects
177177
#if (defined( TIER0_FPO_DISABLED ) || defined( _DEBUG )) &&\
178-
(defined( WIN32 ) && !defined( _X360 ) && defined(_M_X86))
178+
(defined( WIN32 ) && defined(_M_X86))
179179
void *pStackCrawlEBP;
180180
__asm
181181
{
@@ -1467,7 +1467,7 @@ CStackTop_CopyParentStack::CStackTop_CopyParentStack( void * const *pParentStack
14671467
#if defined( ENABLE_RUNTIME_STACK_TRANSLATION )
14681468
//miniature version of GetCallStack_Fast()
14691469
#if (defined( TIER0_FPO_DISABLED ) || defined( _DEBUG )) &&\
1470-
(defined( WIN32 ) && !defined( _X360 ) && defined(_M_X86))
1470+
(defined( WIN32 ) && defined(_M_X86))
14711471
void *pStackCrawlEBP;
14721472
__asm
14731473
{
@@ -1525,7 +1525,7 @@ CStackTop_ReferenceParentStack::CStackTop_ReferenceParentStack( void * const *pP
15251525
#if defined( ENABLE_RUNTIME_STACK_TRANSLATION )
15261526
//miniature version of GetCallStack_Fast()
15271527
#if (defined( TIER0_FPO_DISABLED ) || defined( _DEBUG )) &&\
1528-
(defined( WIN32 ) && !defined( _X360 ) && defined(_M_X86))
1528+
(defined( WIN32 ) && defined(_M_X86))
15291529
void *pStackCrawlEBP;
15301530
__asm
15311531
{

0 commit comments

Comments
 (0)