Skip to content

Commit a103391

Browse files
committed
it runs
1 parent ee04c66 commit a103391

34 files changed

+100
-517
lines changed

common/sse2neon.h

-44
Original file line numberDiff line numberDiff line change
@@ -9182,50 +9182,6 @@ FORCE_INLINE void _sse2neon_mm_set_denormals_zero_mode(unsigned int flag)
91829182
}
91839183
#endif
91849184

9185-
// Return the current 64-bit value of the processor's time-stamp counter.
9186-
// https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=rdtsc
9187-
FORCE_INLINE uint64_t _rdtsc(void)
9188-
{
9189-
#if defined(__aarch64__) || defined(_M_ARM64)
9190-
uint64_t val;
9191-
9192-
/* According to ARM DDI 0487F.c, from Armv8.0 to Armv8.5 inclusive, the
9193-
* system counter is at least 56 bits wide; from Armv8.6, the counter
9194-
* must be 64 bits wide. So the system counter could be less than 64
9195-
* bits wide and it is attributed with the flag 'cap_user_time_short'
9196-
* is true.
9197-
*/
9198-
#if defined(_MSC_VER)
9199-
val = _ReadStatusReg(ARM64_SYSREG(3, 3, 14, 0, 2));
9200-
#else
9201-
__asm__ __volatile__("mrs %0, cntvct_el0" : "=r"(val));
9202-
#endif
9203-
9204-
return val;
9205-
#elif defined(_M_ARM)
9206-
uint32_t val = _MoveFromCoprocessor(15,0, 9,13,0);
9207-
return ((uint64_t)val) << 6;
9208-
#else
9209-
uint32_t pmccntr, pmuseren, pmcntenset;
9210-
// Read the user mode Performance Monitoring Unit (PMU)
9211-
// User Enable Register (PMUSERENR) access permissions.
9212-
__asm__ __volatile__("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren));
9213-
if (pmuseren & 1) { // Allows reading PMUSERENR for user mode code.
9214-
__asm__ __volatile__("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset));
9215-
if (pmcntenset & 0x80000000UL) { // Is it counting?
9216-
__asm__ __volatile__("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr));
9217-
// The counter is set up to count every 64th cycle
9218-
return (uint64_t) (pmccntr) << 6;
9219-
}
9220-
}
9221-
9222-
// Fallback to syscall as we can't enable PMUSERENR in user mode.
9223-
struct timeval tv;
9224-
gettimeofday(&tv, NULL);
9225-
return (uint64_t) (tv.tv_sec) * 1000000 + tv.tv_usec;
9226-
#endif
9227-
}
9228-
92299185
#if defined(__GNUC__) || defined(__clang__)
92309186
#pragma pop_macro("ALIGN_STRUCT")
92319187
#pragma pop_macro("FORCE_INLINE")

engine/gl_lightmap.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,7 @@ void CacheAndUnloadLightmapData()
13331333
host_state.worldbrush->unloadedlightmaps = true;
13341334
}
13351335

1336+
#pragma optimize("", off)
13361337
//sorts the surfaces in place
13371338
static void SortSurfacesByLightmapID( SurfaceHandle_t *pToSort, int iSurfaceCount )
13381339
{
@@ -1448,6 +1449,7 @@ void R_RedownloadAllLightmaps()
14481449

14491450
g_RebuildLightmaps = false;
14501451
}
1452+
#pragma optimize("", on)
14511453

14521454
//-----------------------------------------------------------------------------
14531455
// Purpose: flag the lightmaps as needing to be rebuilt (gamma change)

engine/sys_engine.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ extern ConVar host_timer_spin_ms;
104104
extern float host_nexttick;
105105
extern IVEngineClient *engineClient;
106106

107-
#if defined(_WIN32) && !defined(_M_ARM)
107+
#if defined(_WIN32)
108108
static void cpu_frequency_monitoring_callback( IConVar *var, const char *pOldValue, float flOldValue )
109109
{
110110
// Set the specified interval for CPU frequency monitoring

game/client/client_virtualreality.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ CON_COMMAND( vr_toggle, "Toggles VR mode" )
152152
// --------------------------------------------------------------------
153153
// Purpose: Returns true if the matrix is orthonormal
154154
// --------------------------------------------------------------------
155-
bool IsOrthonormal ( VMatrix Mat, float fTolerance )
155+
bool IsOrthonormal ( VMatrix& Mat, float fTolerance )
156156
{
157157
float LenFwd = Mat.GetForward().Length();
158158
float LenUp = Mat.GetUp().Length();

inputsystem/inputsystem.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,8 @@ InitReturnVal_t CInputSystem::Init()
167167

168168
joy_xcontroller_found.SetValue( 0 );
169169

170-
#ifdef USE_SDL
171170
if( !m_bConsoleTextMode )
172171
InitializeTouch();
173-
#endif
174172

175173
if ( IsPC() && !m_bConsoleTextMode )
176174
{
@@ -977,9 +975,7 @@ void CInputSystem::SetPrimaryUserId( int userId )
977975
//-----------------------------------------------------------------------------
978976
void CInputSystem::SetRumble( float fLeftMotor, float fRightMotor, int userId )
979977
{
980-
#ifdef USE_SDL
981978
SetXDeviceRumble( fLeftMotor, fRightMotor, userId );
982-
#endif
983979
}
984980

985981

inputsystem/inputsystem.h

-9
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,10 @@ class CInputSystem : public CTier2AppSystem< IInputSystem >
145145

146146
struct JoystickInfo_t
147147
{
148-
#ifdef USE_SDL
149148
void *m_pDevice; // Really an SDL_GameController*, NULL if not present.
150149
void *m_pHaptic; // Really an SDL_Haptic*
151150
float m_fCurrentRumble;
152151
bool m_bRumbleEnabled;
153-
#elif defined(_WIN32)
154-
JOYINFOEX m_JoyInfoEx;
155-
#else
156-
#error
157-
#endif
158152
int m_nButtonCount;
159153
int m_nAxisFlags;
160154
int m_nDeviceId;
@@ -277,9 +271,6 @@ class CInputSystem : public CTier2AppSystem< IInputSystem >
277271

278272
//Added called and set to true when binding input and set to false once bound
279273
void SetNovintPure( bool bPure );
280-
#ifndef USE_SDL
281-
unsigned int AxisValue( JoystickAxis_t axis, JOYINFOEX& ji );
282-
#endif
283274
#else
284275
void SetNovintPure( bool bPure ) {} // to satify the IInput virtual interface
285276
#endif

0 commit comments

Comments
 (0)