Merge pull request #186 from nillerusr/win64

Win64
This commit is contained in:
nillerusr 2023-01-28 21:37:41 +03:00 committed by GitHub
commit 9586dc98e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 66 additions and 34 deletions

View File

@ -1,12 +1,6 @@
name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
on: [push, pull_request]
jobs:
build-linux-i386:
@ -47,6 +41,17 @@ jobs:
./waf.bat configure -T debug
./waf.bat build
build-windows-amd64:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -8
./waf.bat build
build-dedicated-windows-i386:
runs-on: windows-2019
@ -58,6 +63,17 @@ jobs:
./waf.bat configure -T debug -d
./waf.bat build
build-dedicated-windows-amd64:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build dedicated windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T debug -d -8
./waf.bat build
build-dedicated-linux-i386:
runs-on: ubuntu-18.04

View File

@ -1,12 +1,6 @@
name: Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
on: [push, pull_request]
jobs:
tests-linux-i386:
@ -40,3 +34,17 @@ jobs:
cd out
$env:Path = "bin";
./unittest.exe
tests-windows-amd64:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Run tests windows-amd64
run: |
git submodule init && git submodule update
./waf.bat configure -T release --tests --prefix=out/ -8
./waf.bat install
cd out
$env:Path = "bin";
./unittest.exe

View File

@ -470,7 +470,7 @@ bool CDedicatedSteamApplication::Create( )
//-----------------------------------------------------------------------------
int main(int argc, char **argv)
{
#ifndef POSIX
#if !defined( POSIX ) && !defined( PLATFORM_64BITS )
_asm
{
fninit

View File

@ -425,7 +425,7 @@ DWORD __stdcall DownloadThread( void *voidPtr )
//Thread_DPrintf( "Requesting full download\n%s", headers );
}
rc.hDataResource = InternetOpenUrl(rc.hOpenResource, fullURL, headerPtr, headerLen, flags,(DWORD)(&rc) );
rc.hDataResource = InternetOpenUrl(rc.hOpenResource, fullURL, headerPtr, headerLen, flags, (DWORD_PTR)(&rc) );
// send the request off
if ( !rc.hDataResource )

View File

@ -322,10 +322,17 @@ int ParseDirective( const char *pText )
{
if ( ParseFloats( pText, tempFloat, 4 ) )
{
for ( int i = 0; i < 4; ++i )
// that's original code, msvc2015 generates illegal instruction on amd64 architecture
/*for ( int i = 0; i < 4; ++i )
{
gMessageParms.boxcolor[ i ] = (byte)(int)tempFloat[ i ];
}
}*/
// workaround
gMessageParms.boxcolor[0] = (int)tempFloat[0];
gMessageParms.boxcolor[1] = (int)tempFloat[1];
gMessageParms.boxcolor[2] = (int)tempFloat[2];
gMessageParms.boxcolor[3] = (int)tempFloat[3];
}
}
else if ( IsToken( pText, "clearmessage" ) )

View File

@ -1413,7 +1413,7 @@ size_t CWin32ReadOnlyFile::FS_fread( void *dest, size_t destSize, size_t size )
if ( m_hFileUnbuffered != INVALID_HANDLE_VALUE )
{
const int destBaseAlign = ( IsX360() ) ? 4 : m_SectorSize;
bool bDestBaseIsAligned = ( (DWORD)dest % destBaseAlign == 0 );
bool bDestBaseIsAligned = ( (DWORD_PTR)dest % destBaseAlign == 0 );
bool bCanReadUnbufferedDirect = ( bDestBaseIsAligned && ( destSize % m_SectorSize == 0 ) && ( m_ReadPos % m_SectorSize == 0 ) );
if ( bCanReadUnbufferedDirect )

View File

@ -158,7 +158,7 @@ void CClientThinkList::RemoveThinkable( ClientThinkHandle_t hThink )
{
pThink->SetThinkHandle( INVALID_THINK_HANDLE );
}
m_ThinkEntries.Remove( (unsigned long)hThink );
m_ThinkEntries.Remove( (uintp)hThink );
}
@ -304,7 +304,7 @@ void CClientThinkList::PerformThinkFunctions()
if ( hThink != INVALID_THINK_HANDLE )
{
// This can happen if the same think handle was removed twice
if ( !m_ThinkEntries.IsInList( (unsigned long)hThink ) )
if ( !m_ThinkEntries.IsInList( (uintp)hThink ) )
continue;
// NOTE: This is necessary for the case where the client entity handle

View File

@ -121,7 +121,7 @@ inline ClientThinkHandle_t CClientThinkList::GetInvalidThinkHandle()
inline CClientThinkList::ThinkEntry_t* CClientThinkList::GetThinkEntry( ClientThinkHandle_t hThink )
{
return &m_ThinkEntries[ (unsigned long)hThink ];
return &m_ThinkEntries[ (uintp)hThink ];
}

View File

@ -1337,7 +1337,7 @@ void CClientLeafSystem::ComputeTranslucentRenderLeaf( int count, const LeafIndex
static CUtlVector<RenderableInfo_t *> orderedList; // @MULTICORE (toml 8/30/2006): will need to make non-static if thread this function
static CUtlVector<IClientRenderable *> renderablesToUpdate;
int leaf = 0;
intp leaf = 0;
for ( i = 0; i < count; ++i )
{
leaf = pLeafList[i];

View File

@ -1222,7 +1222,7 @@ float CAI_Navigator::GetPathTimeToGoal()
AI_PathNode_t CAI_Navigator::GetNearestNode()
{
#ifdef WIN32
COMPILE_TIME_ASSERT( (int)AIN_NO_NODE == NO_NODE );
COMPILE_TIME_ASSERT( (intp)AIN_NO_NODE == NO_NODE );
#endif
return (AI_PathNode_t)(intp)( GetPathfinder()->NearestNodeToNPC() );
}

2
ivp

@ -1 +1 @@
Subproject commit dfa42eb575618661a9c41c2ed635c1b9a0a51858
Subproject commit 960c7228f8e8d710625891991e88b1ec3aa92e45

View File

@ -79,7 +79,7 @@ ColorCorrectionLookup_t::~ColorCorrectionLookup_t( )
void ColorCorrectionLookup_t::AllocTexture()
{
char name[64];
sprintf( name, "ColorCorrection - %d", m_Handle );
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, IMAGE_FORMAT_BGRX8888,

View File

@ -30,7 +30,7 @@ public:
CBaseHandle();
CBaseHandle( const CBaseHandle &other );
CBaseHandle( unsigned long value );
CBaseHandle( uintp value );
CBaseHandle( int iEntry, int iSerialNumber );
void Init( int iEntry, int iSerialNumber );
@ -63,7 +63,7 @@ public:
protected:
// The low NUM_SERIAL_BITS hold the index. If this value is less than MAX_EDICTS, then the entity is networkable.
// The high NUM_SERIAL_NUM_BITS bits are the serial number.
unsigned long m_Index;
uintp m_Index;
};
@ -80,7 +80,7 @@ inline CBaseHandle::CBaseHandle( const CBaseHandle &other )
m_Index = other.m_Index;
}
inline CBaseHandle::CBaseHandle( unsigned long value )
inline CBaseHandle::CBaseHandle( uintp value )
{
m_Index = value;
}
@ -150,7 +150,7 @@ inline bool CBaseHandle::operator <( const CBaseHandle &other ) const
inline bool CBaseHandle::operator <( const IHandleEntity *pEntity ) const
{
unsigned long otherIndex = (pEntity) ? pEntity->GetRefEHandle().m_Index : INVALID_EHANDLE_INDEX;
uintp otherIndex = (pEntity) ? pEntity->GetRefEHandle().m_Index : INVALID_EHANDLE_INDEX;
return m_Index < otherIndex;
}

View File

@ -102,7 +102,7 @@ struct levellist_t
struct EHandlePlaceholder_t // Engine does some of the game writing (alas, probably shouldn't), but can't see ehandle.h
{
unsigned long i;
uintp i;
};
//-------------------------------------

View File

@ -1138,7 +1138,7 @@ public:
if ( nHasSIMD )
{
// Precaches the data
_mm_prefetch( (char*)((int)pGroupToMesh & (~0x1F)), _MM_HINT_NTA );
_mm_prefetch( (char*)((intp)pGroupToMesh & (~0x1F)), _MM_HINT_NTA );
}
#endif
for ( int i = 0; i < PREFETCH_VERT_COUNT; ++i )
@ -1165,7 +1165,7 @@ public:
if ( nHasSIMD )
{
char *pMem = (char*)&pGroupToMesh[j + PREFETCH_VERT_COUNT + 1];
_mm_prefetch( (char*)((int)pMem & (~0x1F)), _MM_HINT_NTA );
_mm_prefetch( (char*)((intp)pMem & (~0x1F)), _MM_HINT_NTA );
}
#endif
idx = j & (PREFETCH_VERT_COUNT-1);

View File

@ -394,7 +394,8 @@ def configure(conf):
'/Zc:forScope',
'/Zc:wchar_t',
'/GR',
'/TP'
'/TP',
'/EHsc'
]
if conf.options.BUILD_TYPE == 'debug':