Compare commits

..

1 Commits

Author SHA1 Message Date
nillerusr
89941c6dee upload bullshit for armv8.2 2023-08-26 15:28:45 +03:00
47 changed files with 200 additions and 179 deletions

View File

@ -2,7 +2,6 @@ name: Build
on: [push, pull_request]
jobs:
build-linux-i386:
runs-on: ubuntu-latest
@ -39,7 +38,7 @@ jobs:
- name: Build windows-i386
run: |
git submodule init && git submodule update
./waf.bat configure -T debug --32bits
./waf.bat configure -T debug
./waf.bat build
build-windows-amd64:
@ -50,7 +49,7 @@ jobs:
- name: Build windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug
./waf.bat configure -T debug -8
./waf.bat build
build-dedicated-windows-i386:
@ -72,7 +71,7 @@ jobs:
- name: Build dedicated windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -d
./waf.bat configure -T debug -d -8
./waf.bat build
build-dedicated-linux-i386:

View File

@ -38,7 +38,7 @@ jobs:
- name: Run tests windows-i386
run: |
git submodule init && git submodule update
./waf.bat configure -T release --tests --prefix=out/ --32bits
./waf.bat configure -T release --tests --prefix=out/
./waf.bat install
cd out
$env:Path = "bin";
@ -52,7 +52,7 @@ jobs:
- name: Run tests windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T release --tests --prefix=out/
./waf.bat configure -T release --tests --prefix=out/ -8
./waf.bat install
cd out
$env:Path = "bin";

View File

@ -65,12 +65,9 @@ extern void longjmp( jmp_buf, int ) __attribute__((noreturn));
#define JPEGLIB_USE_STDIO
#if ANDROID
#include "android/jpeglib/jpeglib.h"
#elif defined WIN32
#include "jpeglib/jpeglib.h"
#else
#include <jpeglib.h>
#include "jpeglib/jpeglib.h"
#endif
#undef JPEGLIB_USE_STDIO

View File

@ -278,7 +278,7 @@ bool CDedicatedAppSystemGroup::PreInit( )
return false;
#ifdef _WIN32
g_bVGui = CommandLine()->CheckParm( "-vgui" );
g_bVGui = !CommandLine()->CheckParm( "-console" );
#endif
CreateInterfaceFn factory = GetFactory();

View File

@ -38,12 +38,7 @@ def build(bld):
if bld.env.DEST_OS == 'win32':
source += [
'sys_windows.cpp',
'vgui/CreateMultiplayerGameServerPage.cpp',
'vgui/MainPanel.cpp',
'../public/vgui_controls/vgui_controls.cpp',
'vgui/vguihelpers.cpp',
'console/TextConsoleWin32.cpp'
'sys_windows.cpp'
]
else:
source += [
@ -64,9 +59,6 @@ def build(bld):
libs = ['tier0','vpklib','tier1','tier2','tier3','vstdlib','steam_api','appframework','mathlib', 'EDIT']
if bld.env.DEST_OS == 'win32':
libs += ['vgui_controls', 'USER32', 'SHELL32']
install_path = bld.env.LIBDIR
bld.shlib(

View File

@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "windows.h"
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

View File

@ -199,7 +199,7 @@ bool CNetworkStringTableItem::SetUserData( int tick, int length, const void *use
if ( length > 0 )
{
m_pUserData = new unsigned char[ALIGN_VALUE( length, 4 )];
m_pUserData = new unsigned char[ length ];
Q_memcpy( m_pUserData, userData, length );
}
else

View File

@ -706,13 +706,11 @@ bool CBaseClient::SendServerInfo( void )
serverinfo.WriteToBuffer( msg );
#ifdef _X360
if ( serverinfo.m_nMaxClients > 1 )
if ( IsX360() && serverinfo.m_nMaxClients > 1 )
{
Msg( "Telling clients to connect" );
g_pMatchmaking->TellClientsToConnect();
}
#endif
// send first tick
m_nSignonTick = m_Server->m_nTickCount;

View File

@ -686,7 +686,7 @@ void CDemoRecorder::CloseDemoFile()
m_DemoFile.Close();
if( g_ClientDLL ) g_ClientDLL->OnDemoRecordStop();
g_ClientDLL->OnDemoRecordStop();
}
m_bCloseDemoFile = false;

View File

@ -6,7 +6,6 @@
#include "client_pch.h"
#ifdef SWDS
#include "igame.h"
#include "hltvclientstate.h"
#include "convar.h"
#include "enginestats.h"
@ -38,9 +37,9 @@ bool CL_IsPortalDemo()
bool HandleRedirectAndDebugLog( const char *msg );
//void BeginLoadingUpdates( MaterialNonInteractiveMode_t mode ) {}
//void EndLoadingUpdates() {}
void BeginLoadingUpdates( MaterialNonInteractiveMode_t mode ) {}
void RefreshScreenIfNecessary() {}
void EndLoadingUpdates() {}
void Con_ColorPrintf( const Color& clr, const char *fmt, ... )

View File

@ -97,19 +97,22 @@ COM_ExplainDisconnection
*/
void COM_ExplainDisconnection( bool bPrint, const char *fmt, ... )
{
#ifdef _X360
g_pMatchmaking->SessionNotification( SESSION_NOTIFY_LOST_SERVER );
#else
va_list argptr;
char string[1024];
if ( IsX360() )
{
g_pMatchmaking->SessionNotification( SESSION_NOTIFY_LOST_SERVER );
}
else
{
va_list argptr;
char string[1024];
va_start (argptr, fmt);
Q_vsnprintf(string, sizeof( string ), fmt,argptr);
va_end (argptr);
va_start (argptr, fmt);
Q_vsnprintf(string, sizeof( string ), fmt,argptr);
va_end (argptr);
Q_strncpy( gszDisconnectReason, string, 256 );
gfExtendedError = true;
#endif
Q_strncpy( gszDisconnectReason, string, 256 );
gfExtendedError = true;
}
if ( bPrint )
{
@ -143,18 +146,21 @@ COM_ExtendedExplainDisconnection
*/
void COM_ExtendedExplainDisconnection( bool bPrint, const char *fmt, ... )
{
#ifdef _X360
g_pMatchmaking->SessionNotification( SESSION_NOTIFY_LOST_SERVER );
#else
va_list argptr;
char string[1024];
if ( IsX360() )
{
g_pMatchmaking->SessionNotification( SESSION_NOTIFY_LOST_SERVER );
}
else
{
va_list argptr;
char string[1024];
va_start (argptr, fmt);
Q_vsnprintf(string, sizeof( string ), fmt,argptr);
va_end (argptr);
va_start (argptr, fmt);
Q_vsnprintf(string, sizeof( string ), fmt,argptr);
va_end (argptr);
Q_strncpy( gszExtendedDisconnectReason, string, 256 );
#endif
Q_strncpy( gszExtendedDisconnectReason, string, 256 );
}
if ( bPrint )
{

View File

@ -921,7 +921,7 @@ void DownloadThread( void *voidPtr )
// Delete rc.data, which was allocated in this thread
if ( rc.data != NULL )
{
free(rc.data);
delete[] rc.data;
rc.data = NULL;
}

View File

@ -4934,7 +4934,7 @@ static bool EnumerateLeafInBox_R(mnode_t * RESTRICT node, const EnumLeafBoxInfo_
*/
// take advantage of high throughput/high latency
fltx4 planeNormal = LoadUnaligned3SIMD( plane->normal.Base() );
fltx4 planeNormal = LoadAlignedSIMD( plane->normal.Base() );
fltx4 vecBoxMin = LoadAlignedSIMD(pInfo->m_vecBoxMin);
fltx4 vecBoxMax = LoadAlignedSIMD(pInfo->m_vecBoxMax);
fltx4 cornermin, cornermax;

View File

@ -3500,12 +3500,10 @@ void _Host_RunFrame (float time)
//-------------------
_Host_RunFrame_Sound();
#ifndef DEDICATED
if ( g_bVCRSingleStep )
{
VCR_EnterPausedState();
}
#endif
}
else
{

View File

@ -4355,16 +4355,16 @@ ModelInstanceHandle_t CModelRender::CreateInstance( IClientRenderable *pRenderab
ValidateStaticPropColorData( handle );
// 360 persists the color meshes across same map loads
#ifdef _X360
if ( r_decalstaticprops.GetBool() && instance.m_LightCacheHandle )
instance.m_AmbientLightingState = *(LightcacheGetStatic( *pCache, NULL, LIGHTCACHEFLAGS_STATIC ));
#else
if ( instance.m_ColorMeshHandle == DC_INVALID_HANDLE )
if ( !IsX360() || instance.m_ColorMeshHandle == DC_INVALID_HANDLE )
{
// builds out color meshes or loads disk colors, now at load/create time
RecomputeStaticLighting( handle );
}
#endif
else
if ( r_decalstaticprops.GetBool() && instance.m_LightCacheHandle )
{
instance.m_AmbientLightingState = *(LightcacheGetStatic( *pCache, NULL, LIGHTCACHEFLAGS_STATIC ));
}
}
return handle;

View File

@ -31,8 +31,7 @@ extern ConVar sv_lan;
static char g_MasterServers[][64] =
{
"185.192.97.130:27010",
"168.138.92.21:27016",
"135.125.188.162:27010"
"168.138.92.21:27016"
};
#ifdef DEDICATED

View File

@ -226,7 +226,7 @@ bool CPureServerWhitelist::LoadCommandsFromKeyValues( KeyValues *kv )
else
Warning( "Unknown modifier in whitelist file: %s.\n", mods[i] );
}
mods.PurgeAndDeleteElementsArray();
mods.PurgeAndDeleteElements();
if (
( bFromTrustedSource && ( bAllowFromDisk || bCheckCRC || bAny ) )
|| ( bAny && bCheckCRC ) )

View File

@ -1227,7 +1227,7 @@ void SV_DetermineMulticastRecipients( bool usepas, const Vector& origin, CBitVec
serverGameClients->ClientEarPosition( pClient->edict, &vecEarPosition );
int iBitNumber = CM_LeafCluster( CM_PointLeafnum( vecEarPosition ) );
if ( iBitNumber < 0 || !(pMask[iBitNumber>>3] & (1<<(iBitNumber&7)) ) )
if ( !(pMask[iBitNumber>>3] & (1<<(iBitNumber&7)) ) )
continue;
playerbits.Set( i );

View File

@ -1534,7 +1534,7 @@ void Sys_NoCrashDialog()
void Sys_TestSendKey( const char *pKey )
{
#if defined(_WIN32) && !defined(USE_SDL) && !defined(_XBOX) && !defined(DEDICATED)
#if defined(_WIN32) && !defined(USE_SDL) && !defined(_XBOX)
int key = pKey[0];
if ( pKey[0] == '\\' && pKey[1] == 'r' )
{

View File

@ -1842,7 +1842,7 @@ void CVEngineServer::PlaybackTempEntity( IRecipientFilter& filter, float delay,
newEvent->bits = buffer.GetNumBitsWritten();
int size = Bits2Bytes( buffer.GetNumBitsWritten() );
newEvent->pData = new byte[ALIGN_VALUE(size,4)];
newEvent->pData = new byte[size];
Q_memcpy( newEvent->pData, data, size );
// add to list

View File

@ -268,7 +268,7 @@ public:
if ( data )
{
g_DrawTreeSelectedPanel = (data) ? (vgui::VPANEL)data->GetPtr( "PanelPtr", 0 ) : 0;
g_DrawTreeSelectedPanel = (data) ? (vgui::VPANEL)data->GetInt( "PanelPtr", 0 ) : 0;
}
else
{
@ -388,7 +388,7 @@ void VGui_RecursivePrintTree(
Q_snprintf( str, sizeof( str ), "%s", name );
pVal->SetString( "Text", str );
pVal->SetPtr( "PanelPtr", (void*)current );
pVal->SetInt( "PanelPtr", current );
pNewParent = pVal;
@ -417,7 +417,7 @@ bool UpdateItemState(
vgui::IPanel *ipanel = vgui::ipanel();
KeyValues *pItemData = pTree->GetItemData( iChildItemId );
if ( pItemData->GetPtr( "PanelPtr" ) != pSub->GetPtr( "PanelPtr" ) ||
if ( pItemData->GetInt( "PanelPtr" ) != pSub->GetInt( "PanelPtr" ) ||
Q_stricmp( pItemData->GetString( "Text" ), pSub->GetString( "Text" ) ) != 0 )
{
pTree->ModifyItem( iChildItemId, pSub );
@ -425,7 +425,7 @@ bool UpdateItemState(
}
// Ok, this is a new panel.
vgui::VPANEL vPanel = (vgui::VPANEL)pSub->GetPtr( "PanelPtr" );
vgui::VPANEL vPanel = pSub->GetInt( "PanelPtr" );
int iBaseColor[3] = { 255, 255, 255 };
if ( ipanel->IsPopup( vPanel ) )
@ -433,7 +433,7 @@ bool UpdateItemState(
iBaseColor[0] = 255; iBaseColor[1] = 255; iBaseColor[2] = 0;
}
if ( g_FocusPanelList.Find( vPanel ) != vgui::INVALID_PANEL )
if ( g_FocusPanelList.Find( vPanel ) != -1 )
{
iBaseColor[0] = 0; iBaseColor[1] = 255; iBaseColor[2] = 0;
pTree->ExpandItem( iChildItemId, true );

View File

@ -213,23 +213,24 @@ def build(bld):
if bld.env.DEST_OS != "darwin":
source += ['audio/snd_dev_sdl.cpp']
source_win = [
'audio/snd_dev_direct.cpp',
'audio/snd_dev_wave.cpp',
'audio/voice_mixer_controls.cpp',
'audio/voice_record_dsound.cpp'
]
if bld.env.DEST_OS == 'win32':
source += ['../public/tier0/memoverride.cpp']
source += [
'../public/tier0/memoverride.cpp',
'audio/snd_dev_direct.cpp',
'audio/snd_dev_wave.cpp',
'audio/voice_mixer_controls.cpp',
'audio/voice_record_dsound.cpp',
]
else:
source += ['audio/snd_posix.cpp']
source += [
'sys_linuxwind.cpp',
'audio/snd_posix.cpp',
]
if bld.env.DEDICATED:
source += ['cl_null.cpp', 'sys_stubwind.cpp']
source += ['cl_null.cpp']
else:
source += source_win if bld.env.DEST_OS == 'win32' else ['sys_stubwind.cpp']
source += [
'client_pch.cpp',
'cl_rcon.cpp',

View File

@ -4203,7 +4203,7 @@ bool CBaseFileSystem::FindNextFileInVPKOrPakHelper( FindData_t *pFindData )
{
V_strncpy( pFindData->findData.cFileName, V_UnqualifiedFileName( pFindData->m_fileMatchesFromVPKOrPak[0] ), sizeof( pFindData->findData.cFileName ) );
pFindData->findData.dwFileAttributes = 0;
delete[] pFindData->m_fileMatchesFromVPKOrPak.Head();
delete pFindData->m_fileMatchesFromVPKOrPak.Head();
pFindData->m_fileMatchesFromVPKOrPak.RemoveMultipleFromHead( 1 );
return true;

View File

@ -115,7 +115,7 @@ void CTeamMenu::ApplySchemeSettings(IScheme *pScheme)
if ( *m_szMapName )
{
LoadMapPage( NULL ); // reload the map description to pick up the color
LoadMapPage( m_szMapName ); // reload the map description to pick up the color
}
}
@ -185,8 +185,7 @@ void CTeamMenu::Update()
void CTeamMenu::LoadMapPage( const char *mapName )
{
// Save off the map name so we can re-load the page in ApplySchemeSettings().
if( mapName )
Q_strncpy( m_szMapName, mapName, strlen( mapName ) + 1 );
Q_strncpy( m_szMapName, mapName, strlen( mapName ) + 1 );
char mapRES[ MAX_PATH ];
@ -194,14 +193,14 @@ void CTeamMenu::LoadMapPage( const char *mapName )
uilanguage[0] = 0;
engine->GetUILanguage( uilanguage, sizeof( uilanguage ) );
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_%s.html", m_szMapName, uilanguage );
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_%s.html", mapName, uilanguage );
bool bFoundHTML = false;
if ( !g_pFullFileSystem->FileExists( mapRES ) )
{
// try english
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_english.html", m_szMapName );
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_english.html", mapName );
}
else
{
@ -241,7 +240,7 @@ void CTeamMenu::LoadMapPage( const char *mapName )
#endif
}
Q_snprintf( mapRES, sizeof( mapRES ), "maps/%s.txt", m_szMapName);
Q_snprintf( mapRES, sizeof( mapRES ), "maps/%s.txt", mapName);
// if no map specific description exists, load default text
if( !g_pFullFileSystem->FileExists( mapRES ) )

View File

@ -508,7 +508,7 @@ public:
if ( panel == m_pDXLevel && RequiresRestart() )
{
// notify the user that this will require a disconnect
QueryBox *box = new QueryBox("#GameUI_SettingRequiresDisconnect_Title", "#GameUI_SettingRequiresDisconnect_Info", this);
QueryBox *box = new QueryBox("#GameUI_SettingRequiresDisconnect_Title", "#GameUI_SettingRequiresDisconnect_Info");
box->AddActionSignalTarget( this );
box->SetCancelCommand(new KeyValues("ResetDXLevelCombo"));
box->DoModal();

2
ivp

@ -1 +1 @@
Subproject commit 47533475e01cbff05fbc3bbe8b4edc485f292cea
Subproject commit 4098acbbe3bc48320496f7533851640cc40cbb89

View File

@ -82,12 +82,7 @@ void ColorCorrectionLookup_t::AllocTexture()
sprintf( name, "ColorCorrection - %p", m_Handle );
m_pColorCorrectionTexture = ITextureInternal::CreateProceduralTexture( name, TEXTURE_GROUP_OTHER,
COLOR_CORRECTION_TEXTURE_SIZE, COLOR_CORRECTION_TEXTURE_SIZE, COLOR_CORRECTION_TEXTURE_SIZE,
#ifdef DX_TO_GL_ABSTRACTION
IMAGE_FORMAT_RGBA8888,
#else
IMAGE_FORMAT_BGRX8888,
#endif
COLOR_CORRECTION_TEXTURE_SIZE, COLOR_CORRECTION_TEXTURE_SIZE, COLOR_CORRECTION_TEXTURE_SIZE, IMAGE_FORMAT_BGRX8888,
TEXTUREFLAGS_NOMIP | TEXTUREFLAGS_NOLOD | TEXTUREFLAGS_SINGLECOPY | TEXTUREFLAGS_CLAMPS |
TEXTUREFLAGS_CLAMPT | TEXTUREFLAGS_CLAMPU | TEXTUREFLAGS_NODEBUGOVERRIDE );

View File

@ -114,7 +114,7 @@ inline T clamp( T const &val, T const &minVal, T const &maxVal )
// FIXME: this should move to a different file
struct cplane_t
{
Vector normal;
VectorAligned normal;
float dist;
byte type; // for fast side tests
byte signbits; // signx + (signy<<1) + (signz<<1)

View File

@ -1787,14 +1787,14 @@ FORCEINLINE fltx4 LoadAlignedSIMD( const VectorAligned & pSIMD )
return SetWToZeroSIMD( LoadAlignedSIMD(pSIMD.Base()) );
}
#ifdef USING_ASAN
static NO_ASAN fltx4 LoadUnalignedSIMD( const void *pSIMD )
#ifdef __SANITIZE_ADDRESS__
static __attribute__((no_sanitize("address"))) fltx4 LoadUnalignedSIMD( const void *pSIMD )
{
return _mm_loadu_ps( reinterpret_cast<const float *>( pSIMD ) );
}
static NO_ASAN fltx4 LoadUnaligned3SIMD( const void *pSIMD )
static __attribute__((no_sanitize("address"))) fltx4 LoadUnaligned3SIMD( const void *pSIMD )
{
return _mm_loadu_ps( reinterpret_cast<const float *>( pSIMD ) );
}

View File

@ -345,6 +345,10 @@ unsigned int CPhonemeTag::ComputeDataCheckSum()
//-----------------------------------------------------------------------------
// Purpose: Simple language to string and string to language lookup dictionary
//-----------------------------------------------------------------------------
#if defined(__i386__) || defined(__x86_64__)
#pragma pack(1)
#endif
struct CCLanguage
{
int type;
@ -367,6 +371,9 @@ static CCLanguage g_CCLanguageLookup[] =
{ CC_THAI, "thai", 0 , 150, 250 },
{ CC_PORTUGUESE,"portuguese", 0 , 0, 150 },
};
#if defined(__i386__) || defined(__x86_64__)
#pragma pack()
#endif
void CSentence::ColorForLanguage( int language, unsigned char& r, unsigned char& g, unsigned char& b )
{

View File

@ -95,7 +95,6 @@ enum soundlevel_t
// NOTE: Valid soundlevel_t values are 0-255.
// 256-511 are reserved for sounds using goldsrc compatibility attenuation.
SNDLVBL_MAX = 511
};
#define MAX_SNDLVL_BITS 9 // Used to encode 0-255 for regular soundlevel_t's and 256-511 for goldsrc-compatible ones.

View File

@ -594,7 +594,7 @@ typedef void * HINSTANCE;
#define FMTFUNCTION( a, b )
#elif defined(GNUC)
#define SELECTANY __attribute__((weak))
#ifndef DEDICATED
#if defined(LINUX) && !defined(DEDICATED)
#define RESTRICT
#else
#define RESTRICT __restrict

View File

@ -48,12 +48,78 @@ typedef __int128_t int128;
#define TSLIST_NODE_ALIGNMENT 16
#ifdef POSIX
static bool bool_compare_and_suck(int128 *a, int128 *b, int128 *c)
{
register bool result = false;
asm(
"ldr x1, %0\n"
"ldr x2, %1\n"
"ldr x3, %2\n"
"ldxp x4, x5, [x2]\n"
"ldxp x6, x7, [x3]\n"
"bg%=:\n"
// "ldxp x3, x4, [x1]\n"
"mov x2, x4\n"
"mov x3, x5\n"
"caspal x4, x5, x6, x7, [x1]\n"
"cmp x4, x2\n"
"ccmp x5, x3, 0, eq\n"
"cset %w3, eq\n"
#if 0
"cmp x3, x5\n"
"ccmp x4, x6, 0, eq\n"
"bne l%=\n" // jmp
"stlxp %w3, x7, x8, [x1]\n"
"cbnz %w3, bg%=\n" // jmp
"l%=:\n"
"dmb ish\n"
"cset %w3, eq\n"
#endif
: "+o"(a), "+o"(b), "+o"(c) ,"+r"(result) :: "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8"
);
return result;
}
static bool bool_compare_and_suck_suck(int128 *a, int128 *b, int128 *c)
{
register bool result = false;
asm volatile(
"ldr x1, %0\n"
"ldr x2, %1\n"
"ldr x3, %2\n"
"ldxp x5, x6, [x2]\n"
"ldxp x7, x8, [x3]\n"
"bg%=:\n"
"ldxp x3, x4, [x1]\n"
"cmp x3, x5\n"
"ccmp x4, x6, 0, eq\n"
"bne l%=\n" // jmp
"stlxp %w3, x7, x8, [x1]\n"
"cbnz %w3, bg%=\n" // jmp
"l%=:\n"
"dmb ish\n"
"cset %w3, eq\n"
: "+o"(a), "+o"(b), "+o"(c), "+r"(result) :: "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8"
);
return result;
}
inline bool ThreadInterlockedAssignIf128( int128 volatile * pDest, const int128 &value, const int128 &comparand )
{
// We do not want the original comparand modified by the swap
// so operate on a local copy.
int128 local_comparand = comparand;
return __sync_bool_compare_and_swap( pDest, local_comparand, value );
return bool_compare_and_suck( pDest, &local_comparand, &value );
}
#endif

View File

@ -25,7 +25,9 @@
#define GLMDEBUG_H
#include "tier0/platform.h"
#if defined( OSX )
#include <stdarg.h>
#endif
// include this anywhere you need to be able to compile-out code related specifically to GLM debugging.

View File

@ -25,7 +25,9 @@
#define GLMDEBUG_H
#include "tier0/platform.h"
#if defined( OSX )
#include <stdarg.h>
#endif
// include this anywhere you need to be able to compile-out code related specifically to GLM debugging.

View File

@ -4,5 +4,5 @@ git submodule init && git submodule update
brew install sdl2
./waf configure -T debug --disable-warns $* &&
./waf configure -T debug --64bits --disable-warns $* &&
./waf build

View File

@ -4,5 +4,5 @@ git submodule init && git submodule update
sudo apt-get update
sudo apt-get install -f -y libopenal-dev g++-multilib gcc-multilib libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev libedit-dev
./waf configure -T debug --disable-warns $* &&
./waf configure -T debug --64bits --disable-warns $* &&
./waf build

View File

@ -6,5 +6,5 @@ sudo apt-get update
sudo apt-get install -y aptitude
sudo aptitude install -y libopenal-dev:i386 g++-multilib gcc-multilib libpng-dev:i386 libjpeg-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libcurl4-gnutls-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386 libbz2-dev:i386 libedit-dev:i386
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns --32bits $* &&
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T debug --disable-warns $* &&
./waf build

View File

@ -1,7 +1,7 @@
#!/bin/sh
git submodule init && git submodule update
./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* &&
./waf configure -T release --sanitize=address,undefined --disable-warns --tests -8 --prefix=out/ $* &&
./waf install &&
cd out &&
DYLD_LIBRARY_PATH=bin/ ./unittest || exit 1

View File

@ -4,7 +4,7 @@ git submodule init && git submodule update
sudo apt-get update
sudo apt-get install -y libbz2-dev
./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* &&
./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ --64bits $* &&
./waf install &&
cd out &&
LD_LIBRARY_PATH=bin/ ./unittest

View File

@ -5,7 +5,7 @@ sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y g++-multilib gcc-multilib libbz2-dev:i386
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T release --32bits --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* &&
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig ./waf configure -T release --sanitize=address,undefined --disable-warns --tests --prefix=out/ $* &&
./waf install &&
cd out &&
LD_LIBRARY_PATH=bin/ ./unittest

View File

@ -1010,7 +1010,7 @@ CUtlString D3DToGL::FixGLSLSwizzle( const char *pDestRegisterName, const char *p
{
bool bAbsWrapper = false; // Parameter wrapped in an abs()
bool bAbsNegative = false; // -abs()
static char szSrcRegister[128];
char szSrcRegister[128];
V_strncpy( szSrcRegister, pSrcRegisterName, sizeof(szSrcRegister) );
// Check for abs() or -abs() wrapper and strip it off during the fixup

View File

@ -32,7 +32,6 @@
#include <sys/param.h>
#include <sys/mount.h>
#elif defined(LINUX)
#define _LARGEFILE64_SOURCE
#include <sys/vfs.h>
#endif
#ifdef OSX

View File

@ -1500,9 +1500,6 @@ void FileOpenDialog::OnOpen()
char pFileName[MAX_PATH];
GetSelectedFileName( pFileName, sizeof( pFileName ) );
if( !pFileName[0] )
return;
int nLen = Q_strlen( pFileName );
bool bSpecifiedDirectory = ( pFileName[nLen-1] == '/' || pFileName[nLen-1] == '\\' ) && (!IsOSX() || ( IsOSX() && !Q_stristr( pFileName, ".app" ) ) );
Q_StripTrailingSlash( pFileName );

14
waf vendored

File diff suppressed because one or more lines are too long

68
wscript
View File

@ -26,21 +26,6 @@ FC_CHECK='''extern "C" {
int main() { return (int)FcInit(); }
'''
CPP_64BIT_CHECK='''
#define TEST(a) (sizeof(void*) == a ? 1 : -1)
int g_Test[TEST(8)];
int main () { return 0; }
'''
CPP_32BIT_CHECK='''
#define TEST(a) (sizeof(void*) == a ? 1 : -1)
int g_Test[TEST(4)];
int main () { return 0; }
'''
Context.Context.line_just = 55 # should fit for everything on 80x26
projects={
@ -140,7 +125,6 @@ projects={
'tier1',
'tier2',
'tier3',
'vgui2/vgui_controls',
'vphysics',
'vpklib',
'vstdlib',
@ -171,11 +155,6 @@ def get_taskgen_count(self):
except: idx = 0 # don't set tg_idx_count to not increase counter
return idx
@Configure.conf
def run_test(self, fragment, msg):
result = self.check_cxx(fragment=fragment, msg=msg, mandatory = False)
return False if result == None else True
def define_platform(conf):
conf.env.DEDICATED = conf.options.DEDICATED
conf.env.TESTS = conf.options.TESTS
@ -183,12 +162,6 @@ def define_platform(conf):
conf.env.GL = conf.options.GL and not conf.options.TESTS and not conf.options.DEDICATED
conf.env.OPUS = conf.options.OPUS
arch32 = conf.run_test(CPP_32BIT_CHECK, 'Testing 32bit support')
arch64 = conf.run_test(CPP_64BIT_CHECK, 'Testing 64bit support')
if not (arch32 ^ arch64):
conf.fatal('Your compiler sucks')
if conf.options.DEDICATED:
conf.options.SDL = False
conf.define('DEDICATED', 1)
@ -213,7 +186,7 @@ def define_platform(conf):
conf.env.SDL = 1
conf.define('USE_SDL', 1)
if arch64:
if conf.options.ALLOW64:
conf.define('PLATFORM_64BITS', 1)
if conf.env.DEST_OS == 'linux':
@ -266,10 +239,6 @@ def define_platform(conf):
'_DLL_EXT=.so'
])
if conf.env.DEST_OS != 'win32':
conf.define('NO_MEMOVERRIDE_NEW_DELETE', 1)
# conf.define('NO_MALLOC_OVERRIDE', 1)
if conf.options.DEBUG_ENGINE:
conf.env.append_unique('DEFINES', [
'DEBUG', '_DEBUG'
@ -279,14 +248,11 @@ def define_platform(conf):
'NDEBUG'
])
conf.define('GIT_COMMIT_HASH', conf.env.GIT_VERSION)
def options(opt):
grp = opt.add_option_group('Common options')
grp.add_option('-4', '--32bits', action = 'store_true', dest = 'TARGET32', default = False,
help = 'allow targetting 32-bit engine(Linux/Windows/OSX x86 only) [default: %default]')
grp.add_option('-8', '--64bits', action = 'store_true', dest = 'ALLOW64', default = False,
help = 'allow targetting 64-bit engine(Linux/Windows/OSX x86 only) [default: %default]')
grp.add_option('-d', '--dedicated', action = 'store_true', dest = 'DEDICATED', default = False,
help = 'build dedicated server [default: %default]')
@ -332,7 +298,7 @@ def options(opt):
def check_deps(conf):
if conf.env.DEST_OS != 'win32':
conf.check_cc(lib='dl', mandatory=False)
conf.check_cc(lib='bz2', mandatory=True)
conf.check_cc(lib='bz2', mandatory=False)
conf.check_cc(lib='rt', mandatory=False)
if not conf.env.LIB_M: # HACK: already added in xcompile!
@ -440,24 +406,19 @@ def configure(conf):
# subsystem=bld.env.MSVC_SUBSYSTEM
# TODO: wrapper around bld.stlib, bld.shlib and so on?
conf.env.MSVC_SUBSYSTEM = 'WINDOWS,5.01'
conf.env.MSVC_TARGETS = ['x64'] # explicitly request x86 target for MSVC
if conf.options.TARGET32:
conf.env.MSVC_TARGETS = ['x86']
conf.env.MSVC_TARGETS = ['x86'] # explicitly request x86 target for MSVC
if conf.options.ALLOW64:
conf.env.MSVC_TARGETS = ['x64']
if sys.platform == 'win32':
conf.load('msvc_pdb_ext msdev msvs msvcdeps')
conf.load('subproject xcompile compiler_c compiler_cxx gccdeps gitversion clang_compilation_database strip_on_install_v2 waf_unit_test enforce_pic')
conf.load('msvc_pdb_ext msdev msvs')
conf.load('subproject xcompile compiler_c compiler_cxx gitversion clang_compilation_database strip_on_install_v2 waf_unit_test enforce_pic')
if conf.env.DEST_OS == 'win32' and conf.env.DEST_CPU == 'amd64':
conf.load('masm')
elif conf.env.DEST_OS == 'darwin':
conf.load('mm_hook')
conf.env.BIT32_MANDATORY = conf.options.TARGET32
if conf.env.BIT32_MANDATORY:
Logs.info('WARNING: will build engine for 32-bit target')
conf.load('force_32bit')
define_platform(conf)
conf.define('GIT_COMMIT_HASH', conf.env.GIT_VERSION)
if conf.env.TOGLES:
projects['game'] += ['togles']
@ -470,6 +431,11 @@ def configure(conf):
if conf.options.OPUS or conf.env.DEST_OS == 'android':
projects['game'] += ['engine/voice_codecs/opus']
conf.env.BIT32_MANDATORY = not conf.options.ALLOW64
if conf.env.BIT32_MANDATORY:
Logs.info('WARNING: will build engine for 32-bit target')
conf.load('force_32bit')
if conf.options.DISABLE_WARNS:
compiler_optional_flags = ['-w']
else:
@ -527,7 +493,7 @@ def configure(conf):
flags += ['-fsigned-char']
if conf.env.DEST_CPU == 'arm':
flags += ['-march=armv7-a', '-mfpu=neon-vfpv4']
flags += ['-mfpu=neon-vfpv4']
if conf.env.DEST_OS == 'freebsd':
linkflags += ['-lexecinfo']
@ -551,11 +517,11 @@ def configure(conf):
if conf.options.BUILD_TYPE == 'debug':
linkflags += [
'/FORCE:MULTIPLE',
'/INCREMENTAL:NO',
'/NODEFAULTLIB:libc',
'/NODEFAULTLIB:libcd',
'/NODEFAULTLIB:libcmt',
'/FORCE',
'/LARGEADDRESSAWARE'
]
else: