mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
amd64: fix multithread, fix vgui, fix physmodels
This commit is contained in:
@@ -288,7 +288,7 @@ bool CollisionBSPData_Load( const char *pName, CCollisionBSPData *pBSPData )
|
||||
CollisionBSPData_LoadPhysics( pBSPData );
|
||||
|
||||
COM_TimestampedLog( " CollisionBSPData_LoadDispInfo" );
|
||||
CollisionBSPData_LoadDispInfo( pBSPData );
|
||||
CollisionBSPData_LoadDispInfo( pBSPData );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -479,7 +479,7 @@ Handles cursor positioning, line wrapping, etc
|
||||
*/
|
||||
static bool g_fColorPrintf = false;
|
||||
static bool g_bInColorPrint = false;
|
||||
extern CThreadLocalInt<> g_bInSpew;
|
||||
extern CTHREADLOCALINT g_bInSpew;
|
||||
|
||||
void Con_Printf( const char *fmt, ... );
|
||||
|
||||
|
||||
+4
-4
@@ -924,14 +924,14 @@ void CDownloadManager::StartNewDownload()
|
||||
m_lastPercent = 0;
|
||||
|
||||
// Start the thread
|
||||
uintp threadID;
|
||||
uintp threadID;
|
||||
VCRHook_CreateThread(NULL, 0,
|
||||
#ifdef POSIX
|
||||
(void *)
|
||||
#endif
|
||||
DownloadThread, m_activeRequest, 0, &threadID );
|
||||
|
||||
ThreadDetach( ( ThreadHandle_t )threadID );
|
||||
ReleaseThreadHandle( ( ThreadHandle_t )threadID );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1072,14 +1072,14 @@ class CDownloadSystem : public IDownloadSystem
|
||||
public:
|
||||
virtual uintp CreateDownloadThread( RequestContext_t *pContext )
|
||||
{
|
||||
uintp nThreadID;
|
||||
uintp nThreadID;
|
||||
VCRHook_CreateThread(NULL, 0,
|
||||
#ifdef POSIX
|
||||
(void*)
|
||||
#endif
|
||||
DownloadThread, pContext, 0, (uintp *)&nThreadID );
|
||||
|
||||
ThreadDetach( ( ThreadHandle_t )nThreadID );
|
||||
ReleaseThreadHandle( ( ThreadHandle_t )nThreadID );
|
||||
return nThreadID;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "host.h"
|
||||
#include "server.h"
|
||||
#include "networkstringtableclient.h"
|
||||
#include "vcrmode.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
+7
-7
@@ -2003,7 +2003,7 @@ void R_DrawDecalsAllImmediate_GatherDecals( IMatRenderContext *pRenderContext, i
|
||||
|
||||
intp iHead = g_aDecalSortTrees[iSortTree].m_aDecalSortBuckets[iGroup][iTreeType].Element( iBucket ).m_iHead;
|
||||
|
||||
intp iElement = iHead;
|
||||
intp iElement = iHead;
|
||||
while ( iElement != g_aDecalSortPool.InvalidIndex() )
|
||||
{
|
||||
decal_t *pDecal = g_aDecalSortPool.Element( iElement );
|
||||
@@ -2154,11 +2154,11 @@ void R_DrawDecalsAllImmediate( IMatRenderContext *pRenderContext, int iGroup, in
|
||||
{
|
||||
if ( g_aDecalSortTrees[iSortTree].m_aDecalSortBuckets[iGroup][iTreeType].Element( iBucket ).m_nCheckCount != nCheckCount )
|
||||
continue;
|
||||
|
||||
|
||||
intp iHead = g_aDecalSortTrees[iSortTree].m_aDecalSortBuckets[iGroup][iTreeType].Element( iBucket ).m_iHead;
|
||||
|
||||
|
||||
int nCount;
|
||||
intp iElement = iHead;
|
||||
intp iElement = iHead;
|
||||
while ( iElement != g_aDecalSortPool.InvalidIndex() )
|
||||
{
|
||||
decal_t *pDecal = g_aDecalSortPool.Element( iElement );
|
||||
@@ -2330,7 +2330,7 @@ void R_DrawDecalsAll_GatherDecals( IMatRenderContext *pRenderContext, int iGroup
|
||||
if ( bucket.m_nCheckCount != nCheckCount )
|
||||
continue;
|
||||
|
||||
intp iHead = bucket.m_iHead;
|
||||
intp iHead = bucket.m_iHead;
|
||||
if ( !g_aDecalSortPool.IsValidIndex( iHead ) )
|
||||
continue;
|
||||
|
||||
@@ -2647,7 +2647,7 @@ void R_DrawDecalsAll( IMatRenderContext *pRenderContext, int iGroup, int iTreeTy
|
||||
if ( bucket.m_nCheckCount != nCheckCount )
|
||||
continue;
|
||||
|
||||
int iHead = bucket.m_iHead;
|
||||
intp iHead = bucket.m_iHead;
|
||||
if ( !g_aDecalSortPool.IsValidIndex( iHead ) )
|
||||
continue;
|
||||
|
||||
@@ -2666,7 +2666,7 @@ void R_DrawDecalsAll( IMatRenderContext *pRenderContext, int iGroup, int iTreeTy
|
||||
bool bBatchInit = true;
|
||||
|
||||
int nCount;
|
||||
int iElement = iHead;
|
||||
intp iElement = iHead;
|
||||
while ( iElement != g_aDecalSortPool.InvalidIndex() )
|
||||
{
|
||||
decal_t *pDecal = g_aDecalSortPool.Element( iElement );
|
||||
|
||||
@@ -282,7 +282,7 @@ private:
|
||||
CVoxelHash* m_pVoxelHash;
|
||||
CLeafList m_aLeafList; // Pool - Linked list(multilist) of leaves per entity.
|
||||
int m_TreeId;
|
||||
CThreadLocalPtr<CPartitionVisits> m_pVisits;
|
||||
CTHREADLOCALPTR(CPartitionVisits) m_pVisits;
|
||||
CSpatialPartition * m_pOwner;
|
||||
CUtlVector<unsigned short> m_AvailableVisitBits;
|
||||
unsigned short m_nNextVisitBit;
|
||||
@@ -1775,7 +1775,7 @@ void CVoxelTree::Shutdown( void )
|
||||
//-----------------------------------------------------------------------------
|
||||
void CVoxelTree::InsertIntoTree( SpatialPartitionHandle_t hPartition, const Vector& mins, const Vector& maxs )
|
||||
{
|
||||
bool bWasReading = ( m_pVisits != NULL );
|
||||
bool bWasReading = ( m_pVisits != static_cast<void*>(nullptr) );
|
||||
if ( bWasReading )
|
||||
{
|
||||
// If we're recursing in this thread, need to release our read lock to allow ourselves to write
|
||||
@@ -1832,7 +1832,7 @@ void CVoxelTree::RemoveFromTree( SpatialPartitionHandle_t hPartition )
|
||||
int nLevel = info.m_nLevel[GetTreeId()];
|
||||
if ( nLevel >= 0 )
|
||||
{
|
||||
bool bWasReading = ( m_pVisits != NULL );
|
||||
bool bWasReading = ( m_pVisits != static_cast<void*>(nullptr) );
|
||||
if ( bWasReading )
|
||||
{
|
||||
// If we're recursing in this thread, need to release our read lock to allow ourselves to write
|
||||
|
||||
+1
-1
@@ -797,7 +797,7 @@ void Sys_ShutdownAuthentication( void )
|
||||
//-----------------------------------------------------------------------------
|
||||
// Debug library spew output
|
||||
//-----------------------------------------------------------------------------
|
||||
CThreadLocalInt<> g_bInSpew;
|
||||
CTHREADLOCALINT g_bInSpew;
|
||||
|
||||
#include "tier1/fmtstr.h"
|
||||
|
||||
|
||||
+3
-2
@@ -367,7 +367,8 @@ void TextMessageParse( byte *pMemFile, int fileSize )
|
||||
|
||||
client_textmessage_t textMessages[ MAX_MESSAGES ];
|
||||
|
||||
int i, nameHeapSize, textHeapSize, messageSize, nameOffset;
|
||||
int i, nameHeapSize, textHeapSize, messageSize;
|
||||
intp nameOffset;
|
||||
|
||||
lastNamePos = 0;
|
||||
lineNumber = 0;
|
||||
@@ -633,4 +634,4 @@ client_textmessage_t *TextMessageGet( const char *pName )
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "replay_internal.h"
|
||||
#include "replayserver.h"
|
||||
#include "replay/iserverengine.h"
|
||||
#include "vcrmode.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
Reference in New Issue
Block a user