Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -1357,9 +1357,7 @@ void CCpuFeatures::Detect(void)
|
||||
#if AZ_LEGACY_CRYSYSTEM_TRAIT_HASAFFINITYMASK
|
||||
CryLogAlways("");
|
||||
|
||||
DWORD_PTR process_affinity_mask;
|
||||
uint32 thread_processor_mask = 1;
|
||||
process_affinity_mask = 1;
|
||||
DWORD_PTR process_affinity_mask = 1;
|
||||
|
||||
/* get the system info to derive the number of processors within the system. */
|
||||
|
||||
|
||||
@@ -160,7 +160,8 @@ string CCmdLine::Next(char*& src)
|
||||
char ch = 0;
|
||||
char* org = src;
|
||||
|
||||
while (ch = *src++)
|
||||
ch = *src++;
|
||||
while (ch)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
@@ -194,6 +195,7 @@ string CCmdLine::Next(char*& src)
|
||||
|
||||
return string(org, src);
|
||||
}
|
||||
ch = *src++;
|
||||
}
|
||||
|
||||
return string();
|
||||
|
||||
@@ -338,7 +338,9 @@ AZ_POP_DISABLE_WARNING
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
DWORD& floatMxCsr = ctx.MxCsr; // Hold FPE Mask and Status for MMX (SSE) floating point registers
|
||||
WORD& floatControlWord = ctx.FltSave.ControlWord; // Hold FPE Mask for floating point registers
|
||||
#ifndef _RELEASE
|
||||
WORD& floatStatuslWord = ctx.FltSave.StatusWord; // Holds FPE Status for floating point registers
|
||||
#endif
|
||||
#else
|
||||
DWORD& floatMxCsr = *(DWORD*)(&ctx.ExtendedRegisters[24]); // Hold FPE Mask and Status for MMX (SSE) floating point registers
|
||||
DWORD& floatControlWord = ctx.FloatSave.ControlWord; // Hold FPE Mask for floating point registers
|
||||
|
||||
@@ -382,11 +382,12 @@ void DebugCallStack::LogExceptionInfo(EXCEPTION_POINTERS* pex)
|
||||
string path("");
|
||||
if ((gEnv) && (gEnv->pFileIO))
|
||||
{
|
||||
const char* logAlias = nullptr;
|
||||
if (
|
||||
(logAlias = gEnv->pFileIO->GetAlias("@log@")) ||
|
||||
(logAlias = gEnv->pFileIO->GetAlias("@root@"))
|
||||
)
|
||||
const char* logAlias = gEnv->pFileIO->GetAlias("@log@");
|
||||
if (!logAlias)
|
||||
{
|
||||
logAlias = gEnv->pFileIO->GetAlias("@root@");
|
||||
}
|
||||
if (logAlias)
|
||||
{
|
||||
path = logAlias;
|
||||
path += "/";
|
||||
|
||||
@@ -316,8 +316,6 @@ bool CDefragAllocator::AppendSegment(UINT_PTR capacity)
|
||||
SDefragAllocChunk& freeChunk = m_chunks[freeBlockIdx];
|
||||
SDefragAllocChunk& addrEndSentinal = m_chunks[AddrEndSentinal];
|
||||
|
||||
uint32 segIdx = (uint32)m_segments.size();
|
||||
|
||||
uint32 allocCapacity = m_capacity;
|
||||
|
||||
headSentinalChunk.ptr = allocCapacity;
|
||||
@@ -370,7 +368,7 @@ void CDefragAllocator::UnAppendSegment()
|
||||
// Can't remove the last segment!
|
||||
CDBA_ASSERT(m_segments.size() > 1);
|
||||
|
||||
bool bHasMoves = Defrag_CompletePendingMoves();
|
||||
[[maybe_unused]] bool bHasMoves = Defrag_CompletePendingMoves();
|
||||
|
||||
// All outstanding moves should be completed.
|
||||
CDBA_ASSERT(!bHasMoves);
|
||||
@@ -390,8 +388,6 @@ void CDefragAllocator::UnAppendSegment()
|
||||
|
||||
SDefragAllocChunk* pChunk = &m_chunks[chunkIdx];
|
||||
|
||||
int numValidSegs = (int)m_segments.size() - 1;
|
||||
|
||||
while (pChunk->ptr != endAddress)
|
||||
{
|
||||
CDBA_ASSERT(!pChunk->attr.IsBusy());
|
||||
@@ -1255,7 +1251,6 @@ size_t CDefragAllocator::Defrag_FindMovesBwd(PendingMove** pMoves, size_t maxMov
|
||||
{
|
||||
for (Index candidateIdx = m_chunks[freeChunkIdx].addrPrevIdx; numMoves < maxMoves && curAmount < maxAmount; )
|
||||
{
|
||||
SDefragAllocChunk& freeChunk = m_chunks[freeChunkIdx];
|
||||
SDefragAllocChunk& candidateChunk = m_chunks[candidateIdx];
|
||||
SDefragAllocChunkAttr candidateChunkAttr = candidateChunk.attr;
|
||||
|
||||
@@ -1947,6 +1942,7 @@ void CDefragAllocator::ValidateAddressChain()
|
||||
|
||||
void CDefragAllocator::ValidateFreeLists()
|
||||
{
|
||||
#if defined(CDBA_DEBUG)
|
||||
for (size_t bucket = 0; bucket < NumBuckets; ++bucket)
|
||||
{
|
||||
size_t rootIdx = m_freeBuckets[bucket];
|
||||
@@ -1976,4 +1972,5 @@ void CDefragAllocator::ValidateFreeLists()
|
||||
CDBA_ASSERT(m_chunks[chunk.freePrevIdx].freeNextIdx == idx);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ void IDebugCallStack::WriteLineToLog(const char* format, ...)
|
||||
va_list ArgList;
|
||||
char szBuffer[MAX_WARNING_LENGTH];
|
||||
va_start(ArgList, format);
|
||||
int count = vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, format, ArgList);
|
||||
vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, format, ArgList);
|
||||
cry_strcat(szBuffer, "\n");
|
||||
szBuffer[sizeof(szBuffer) - 1] = '\0';
|
||||
va_end(ArgList);
|
||||
|
||||
@@ -84,7 +84,6 @@ namespace LegacyLevelSystem
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto pPak = gEnv->pCryPak;
|
||||
|
||||
AzFramework::RootSpawnableNotificationBus::Handler::BusConnect();
|
||||
}
|
||||
@@ -240,6 +239,9 @@ namespace LegacyLevelSystem
|
||||
}
|
||||
}
|
||||
|
||||
// This is a workaround until the replacement for GameEntityContext is done
|
||||
AzFramework::GameEntityContextEventBus::Broadcast(&AzFramework::GameEntityContextEventBus::Events::OnPreGameEntitiesStarted);
|
||||
|
||||
// Reset the camera to (1,1,1) (not (0,0,0) which is the invalid/uninitialised state,
|
||||
// to avoid the hack in the renderer to not show anything if the camera is at the origin).
|
||||
CCamera defaultCam;
|
||||
@@ -323,6 +325,9 @@ namespace LegacyLevelSystem
|
||||
m_rootSpawnableId = rootSpawnableAssetId;
|
||||
m_rootSpawnableGeneration = AzFramework::RootSpawnableInterface::Get()->AssignRootSpawnable(rootSpawnable);
|
||||
|
||||
// This is a workaround until the replacement for GameEntityContext is done
|
||||
AzFramework::GameEntityContextEventBus::Broadcast(&AzFramework::GameEntityContextEventBus::Events::OnGameEntitiesStarted);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Movie system must be reset after entities.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -695,6 +700,8 @@ namespace LegacyLevelSystem
|
||||
// Cleanup all containers
|
||||
GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_POST_UNLOAD, 0, 0);
|
||||
AzFramework::InputChannelRequestBus::Broadcast(&AzFramework::InputChannelRequests::ResetState);
|
||||
|
||||
AzFramework::GameEntityContextEventBus::Broadcast(&AzFramework::GameEntityContextEventBus::Events::OnGameEntitiesReset);
|
||||
}
|
||||
|
||||
void SpawnableLevelSystem::OnRootSpawnableAssigned(
|
||||
|
||||
@@ -172,7 +172,6 @@ void CLocalizedStringsManager::LocalizationDumpLoadedInfo([[maybe_unused]] ICons
|
||||
{
|
||||
CLocalizedStringsManager* pLoca = (CLocalizedStringsManager*) gEnv->pSystem->GetLocalizationManager();
|
||||
|
||||
const char* pTagName = "";
|
||||
for (TTagFileNames::iterator tagit = pLoca->m_tagFileNames.begin(); tagit != pLoca->m_tagFileNames.end(); ++tagit)
|
||||
{
|
||||
CryLogAlways("Tag %s (%d)", tagit->first.c_str(), tagit->second.id);
|
||||
@@ -1817,8 +1816,6 @@ bool CLocalizedStringsManager::LocalizeStringInternal(const char* pStr, size_t l
|
||||
string out;
|
||||
|
||||
// scan the string
|
||||
bool done = false;
|
||||
int curpos = 0;
|
||||
const char* pPos = pStr;
|
||||
const char* pEnd = pStr + len;
|
||||
while (true)
|
||||
@@ -1955,7 +1952,10 @@ string CLocalizedStringsManager::SLocalizedStringEntry::GetTranslatedText(const
|
||||
nDecompTicks = CryGetTicks() - nDecompTicks;
|
||||
#endif //LOG_DECOMP_TIMES
|
||||
|
||||
size_t len = strnlen((const char*)decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH);
|
||||
#if !defined(NDEBUG)
|
||||
size_t len =
|
||||
#endif
|
||||
strnlen((const char*)decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH);
|
||||
assert(len < COMPRESSION_FIXED_BUFFER_LENGTH && "Buffer not null-terminated");
|
||||
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ void CLog::LogWarning(const char* szFormat, ...)
|
||||
va_list ArgList;
|
||||
char szBuffer[MAX_WARNING_LENGTH];
|
||||
va_start(ArgList, szFormat);
|
||||
int count = vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, szFormat, ArgList);
|
||||
vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, szFormat, ArgList);
|
||||
szBuffer[sizeof(szBuffer) - 1] = '\0';
|
||||
va_end(ArgList);
|
||||
|
||||
@@ -325,7 +325,7 @@ void CLog::LogError(const char* szFormat, ...)
|
||||
va_list ArgList;
|
||||
char szBuffer[MAX_WARNING_LENGTH];
|
||||
va_start(ArgList, szFormat);
|
||||
int count = vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, szFormat, ArgList);
|
||||
vsnprintf_s(szBuffer, sizeof(szBuffer), sizeof(szBuffer) - 1, szFormat, ArgList);
|
||||
szBuffer[sizeof(szBuffer) - 1] = '\0';
|
||||
va_end(ArgList);
|
||||
|
||||
|
||||
@@ -98,8 +98,6 @@ void CDrawContext::StopDrawing()
|
||||
// Restore old flags that where set before our draw context.
|
||||
m_pAuxRender->SetRenderFlags(m_prevRenderFlags);
|
||||
|
||||
int width = gEnv->pRenderer->GetWidth();
|
||||
int height = gEnv->pRenderer->GetHeight();
|
||||
gEnv->pRenderer->Unset2DMode(m_backupSceneMatrices);
|
||||
}
|
||||
|
||||
@@ -159,4 +157,4 @@ void CDrawContext::PopClientRect()
|
||||
m_currentStackLevel--;
|
||||
}
|
||||
}
|
||||
MINIGUI_END
|
||||
MINIGUI_END
|
||||
|
||||
@@ -151,7 +151,6 @@ void CMiniTable::AutoResize()
|
||||
if (nColumns)
|
||||
{
|
||||
int numEntries = m_columns[0].cells.size();
|
||||
int numPages = numEntries / m_pageSize;
|
||||
|
||||
//page index is now invalid, cap at max
|
||||
if ((m_pageNum * m_pageSize) > numEntries)
|
||||
|
||||
@@ -45,8 +45,6 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
const char* path = nullptr; // Don't call GetGameFolder here, it returns a full absolute path and we just really want the game name
|
||||
|
||||
AZ::IO::FixedMaxPathString projectPath = AZ::Utils::GetProjectPath();
|
||||
if (projectPath.empty())
|
||||
{
|
||||
|
||||
@@ -660,8 +660,6 @@ bool CPerfHUD::OnInputChannelEventFiltered(const AzFramework::InputChannel& inpu
|
||||
|
||||
if (deviceId == AzFramework::InputDeviceGamepad::IdForIndex0)
|
||||
{
|
||||
int frameNum = gEnv->pRenderer->GetFrameID(false);
|
||||
|
||||
if (inputChannel.IsStateBegan())
|
||||
{
|
||||
bool checkState = false;
|
||||
@@ -1729,8 +1727,6 @@ CStreamingStatsWidget::CStreamingStatsWidget(IMiniCtrl* pParentMenu, ICryPerfHUD
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CStreamingStatsWidget::Update()
|
||||
{
|
||||
IRenderer* pRenderer = gEnv->pRenderer;
|
||||
|
||||
char entryBuffer[CMiniInfoBox::MAX_TEXT_LENGTH] = {0};
|
||||
|
||||
//Clear old entries
|
||||
@@ -1971,8 +1967,6 @@ void CRenderBatchWidget::Enable(int mode)
|
||||
mode = min(mode, DISPLAY_MODE_NUM - 1);
|
||||
EDisplayMode newMode = (EDisplayMode)mode;
|
||||
|
||||
bool bValidMode = false;
|
||||
|
||||
if (m_displayMode != newMode)
|
||||
{
|
||||
//workaround for now,
|
||||
|
||||
@@ -117,7 +117,8 @@ void CProfileLogSystem::SetTime(ILogElement* pElement, float time)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pLastElelent = pElement->SetTime(time))
|
||||
m_pLastElelent = pElement->SetTime(time);
|
||||
if (m_pLastElelent)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -130,4 +131,4 @@ void CProfileLogSystem::SetTime(ILogElement* pElement, float time)
|
||||
void CProfileLogSystem::Release()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +320,6 @@ bool CResourceManager::LoadFastLoadPaks(bool bToMemory)
|
||||
}
|
||||
|
||||
const char* const assetsDir = "@assets@";
|
||||
const char* shaderPakDir = assetsDir;
|
||||
const char* shaderPakPath = "ShaderCacheStartup.pak";
|
||||
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
@@ -826,8 +825,6 @@ void CResourceManager::OnSystemEvent(ESystemEvent event, [[maybe_unused]] UINT_P
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CResourceManager::GetMemoryStatistics(ICrySizer* pSizer)
|
||||
{
|
||||
auto pResList = gEnv->pCryPak->GetResourceList(AZ::IO::IArchive::RFOM_Level);
|
||||
|
||||
pSizer->AddContainer(m_openedPaks);
|
||||
}
|
||||
|
||||
|
||||
@@ -477,7 +477,9 @@ namespace Serialization {
|
||||
{
|
||||
while (isComment(*cur.end))
|
||||
{
|
||||
#if 0
|
||||
const char* commentStart = ptr;
|
||||
#endif
|
||||
while (*cur.end && *cur.end != '\n')
|
||||
{
|
||||
++cur.end;
|
||||
@@ -968,7 +970,10 @@ namespace Serialization {
|
||||
ser(*this);
|
||||
CRY_ASSERT(!stack_.empty());
|
||||
stack_.pop_back();
|
||||
bool closed = closeBracket();
|
||||
#if !defined(NDEBUG)
|
||||
bool closed =
|
||||
#endif
|
||||
closeBracket();
|
||||
CRY_ASSERT(closed);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -864,9 +864,6 @@ void CLocalMemoryUsage::OnRender(IRenderer* pRenderer, const CCamera* camera)
|
||||
}
|
||||
}
|
||||
|
||||
float localMemoryTextureStreamingSpeedLimit = sys_LocalMemoryTextureStreamingSpeedLimit * 1024.f * 1024.f;
|
||||
float localMemoryStatObjStreamingSpeedLimit = sys_LocalMemoryGeometryStreamingSpeedLimit * 1024.f * 1024.f;
|
||||
|
||||
sector++;
|
||||
}
|
||||
}
|
||||
@@ -1335,7 +1332,6 @@ void CLocalMemoryUsage::CollectMaterialInfo_Recursive(SMaterialInfo* materialInf
|
||||
for (auto iter = rItem.m_pShaderResources->GetTexturesResourceMap()->begin();
|
||||
iter != rItem.m_pShaderResources->GetTexturesResourceMap()->end(); ++iter)
|
||||
{
|
||||
uint16 texId = iter->first;
|
||||
const SEfResTexture* pTextureRes = &iter->second;
|
||||
|
||||
if (pTextureRes->m_Sampler.m_pITex)
|
||||
|
||||
@@ -512,7 +512,8 @@ uint32 CAsyncIOFileRequest::ReadFile(CStreamingIOThread* pIOThread)
|
||||
}
|
||||
|
||||
CCryFile file;
|
||||
if ((nError = OpenFile(file)))
|
||||
nError = OpenFile(file);
|
||||
if (nError)
|
||||
{
|
||||
return nError;
|
||||
}
|
||||
@@ -555,12 +556,14 @@ uint32 CAsyncIOFileRequest::ReadFile(CStreamingIOThread* pIOThread)
|
||||
}
|
||||
|
||||
auto pZipEntry = ((AZ::IO::Archive*)(gEnv->pCryPak))->GetOpenedFileDataInZip(file.GetHandle());
|
||||
if ((nError = ConfigureRead(pZipEntry.get())))
|
||||
nError = ConfigureRead(pZipEntry.get());
|
||||
if (nError)
|
||||
{
|
||||
return nError;
|
||||
}
|
||||
|
||||
if ((nError = AllocateOutput(pZipEntry.get())))
|
||||
nError = AllocateOutput(pZipEntry.get());
|
||||
if (nError)
|
||||
{
|
||||
return nError;
|
||||
}
|
||||
@@ -578,14 +581,16 @@ uint32 CAsyncIOFileRequest::ReadFileResume(CStreamingIOThread* pIOThread)
|
||||
}
|
||||
|
||||
CCryFile file;
|
||||
if ((nError = OpenFile(file)))
|
||||
nError = OpenFile(file);
|
||||
if (nError)
|
||||
{
|
||||
return nError;
|
||||
}
|
||||
|
||||
auto pZipEntry = ((AZ::IO::Archive*)(gEnv->pCryPak))->GetOpenedFileDataInZip(file.GetHandle());
|
||||
|
||||
if ((nError = AllocateOutput(pZipEntry.get())))
|
||||
nError = AllocateOutput(pZipEntry.get());
|
||||
if (nError)
|
||||
{
|
||||
return nError;
|
||||
}
|
||||
@@ -653,7 +658,8 @@ uint32 CAsyncIOFileRequest::ReadFileInPages(CStreamingIOThread* pIOThread, CCryF
|
||||
}
|
||||
|
||||
//check if job needs to be pre-empted
|
||||
if ((nError = ReadFileCheckPreempt(pIOThread)))
|
||||
nError = ReadFileCheckPreempt(pIOThread);
|
||||
if (nError)
|
||||
{
|
||||
return nError;
|
||||
}
|
||||
|
||||
@@ -121,14 +121,14 @@ int SStreamJobQueue::Pop()
|
||||
|
||||
void CAsyncIOFileRequest::AddRef()
|
||||
{
|
||||
int nRef = CryInterlockedIncrement(&m_nRefCount);
|
||||
//int nRef =
|
||||
CryInterlockedIncrement(&m_nRefCount);
|
||||
STREAM_DECOMPRESS_TRACE("[StreamDecompress],AddRef,0x%x,%s,0x%p,%i\n", CryGetCurrentThreadId(), m_strFileName.c_str(), this, nRef);
|
||||
}
|
||||
|
||||
int CAsyncIOFileRequest::Release()
|
||||
{
|
||||
int nRef = CryInterlockedDecrement(&m_nRefCount);
|
||||
|
||||
STREAM_DECOMPRESS_TRACE("[StreamDecompress],Release,0x%x,%s,0x%p,%i\n", CryGetCurrentThreadId(), m_strFileName.c_str(), this, nRef);
|
||||
|
||||
#ifndef _RELEASE
|
||||
|
||||
@@ -251,7 +251,6 @@ size_t CStreamEngine::StartBatchRead(IReadStreamPtr* pStreamsOut, const StreamRe
|
||||
|
||||
if (numReqs > 0)
|
||||
{
|
||||
size_t nStreamsInBatch = 0;
|
||||
numReqs = AZStd::min(numReqs, aznumeric_cast<size_t>(MaxStreamsPerBatch));
|
||||
AZStd::vector<FileRequestPtr> batch;
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ void CStreamingIOThread::Run()
|
||||
if (pFileRequest->m_eMediaType != eStreamSourceTypeMemory)
|
||||
{
|
||||
pFileRequest->m_nReadHeadOffsetKB = (int32)(((int64)pFileRequest->m_nDiskOffset - m_nLastReadDiskOffset) >> 10); // in KB
|
||||
m_nLastReadDiskOffset = pFileRequest->m_nDiskOffset + pFileRequest->m_nSizeOnMedia;
|
||||
m_nLastReadDiskOffset = pFileRequest->m_nDiskOffset + nSizeOnMedia;
|
||||
|
||||
#ifdef STREAMENGINE_ENABLE_STATS
|
||||
m_NotInMemoryStats.m_nTempReadOffset += abs(pFileRequest->m_nReadHeadOffsetKB);
|
||||
@@ -288,7 +288,7 @@ void CStreamingIOThread::Run()
|
||||
m_NotInMemoryStats.m_nTempRequestCount++;
|
||||
|
||||
// Calc IO bandwidth only for non memory files.
|
||||
m_NotInMemoryStats.m_nTempBytesRead += pFileRequest->m_nSizeOnMedia;
|
||||
m_NotInMemoryStats.m_nTempBytesRead += nSizeOnMedia;
|
||||
m_NotInMemoryStats.m_TempReadTime += pFileRequest->m_readTime;
|
||||
#endif
|
||||
}
|
||||
@@ -298,7 +298,7 @@ void CStreamingIOThread::Run()
|
||||
m_InMemoryStats.m_nTempRequestCount++;
|
||||
|
||||
// Calc IO bandwidth only for in memory files.
|
||||
m_InMemoryStats.m_nTempBytesRead += pFileRequest->m_nSizeOnMedia;
|
||||
m_InMemoryStats.m_nTempBytesRead += nSizeOnMedia;
|
||||
m_InMemoryStats.m_TempReadTime += pFileRequest->m_readTime;
|
||||
#endif
|
||||
}
|
||||
@@ -753,9 +753,14 @@ void CStreamingWorkerThread::Run()
|
||||
{
|
||||
case eWorkerAsyncCallback:
|
||||
{
|
||||
#ifndef _RELEASE
|
||||
float fTime = gEnv->pTimer->GetAsyncCurTime();
|
||||
#endif
|
||||
|
||||
m_pStreamEngine->ReportAsyncFileRequestComplete(pFileRequest);
|
||||
#ifndef _RELEASE
|
||||
float fTime1 = gEnv->pTimer->GetAsyncCurTime();
|
||||
#endif
|
||||
|
||||
#ifdef STREAMENGINE_ENABLE_STATS
|
||||
CryInterlockedDecrement(&m_pStreamEngine->GetStreamingStatistics().nCurrentAsyncCount);
|
||||
|
||||
@@ -944,7 +944,6 @@ public:
|
||||
LARGE_INTEGER stepStart, stepEnd;
|
||||
#endif
|
||||
LARGE_INTEGER waitStart, waitEnd;
|
||||
uint64 yieldBegin = 0U;
|
||||
MarkThisThreadForDebugging("Physics");
|
||||
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
@@ -1635,7 +1634,7 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode)
|
||||
// AI gets to steer entities before they travel over cliffs etc.
|
||||
const float maxTimeStep = 0.25f;
|
||||
int maxSteps = 1;
|
||||
float fCurTime = m_Time.GetCurrTime();
|
||||
//float fCurTime = m_Time.GetCurrTime();
|
||||
float timeToDo = m_Time.GetFrameTime();//fCurTime - fPrevTime;
|
||||
if (m_env.bMultiplayer)
|
||||
{
|
||||
@@ -2697,7 +2696,10 @@ void CSystem::RegisterWindowMessageHandler(IWindowMessageHandler* pHandler)
|
||||
void CSystem::UnregisterWindowMessageHandler(IWindowMessageHandler* pHandler)
|
||||
{
|
||||
#if AZ_LEGACY_CRYSYSTEM_TRAIT_USE_MESSAGE_HANDLER
|
||||
bool bRemoved = stl::find_and_erase(m_windowMessageHandlers, pHandler);
|
||||
#if !defined(NDEBUG)
|
||||
bool bRemoved =
|
||||
#endif
|
||||
stl::find_and_erase(m_windowMessageHandlers, pHandler);
|
||||
assert(pHandler && bRemoved && "This IWindowMessageHandler was not registered");
|
||||
#else
|
||||
CRY_ASSERT(false && "This platform does not support window message handlers");
|
||||
|
||||
@@ -362,7 +362,7 @@ static void CmdCrashTest(IConsoleCmdArgs* pArgs)
|
||||
case 3:
|
||||
while (true)
|
||||
{
|
||||
char* element = new char[10240];
|
||||
new char[10240];
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
@@ -371,7 +371,7 @@ static void CmdCrashTest(IConsoleCmdArgs* pArgs)
|
||||
case 5:
|
||||
while (true)
|
||||
{
|
||||
char* element = new char[128]; //testing the crash handler an exception in the cry memory allocation occurred
|
||||
new char[128]; //testing the crash handler an exception in the cry memory allocation occurred
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
@@ -1000,7 +1000,9 @@ bool CSystem::InitializeEngineModule(const char* dllName, const char* moduleClas
|
||||
{
|
||||
GetIMemoryManager()->GetProcessMemInfo(memEnd);
|
||||
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
uint64 memUsed = memEnd.WorkingSetSize - memStart.WorkingSetSize;
|
||||
#endif
|
||||
AZ_TracePrintf(AZ_TRACE_SYSTEM_WINDOW, "Initializing %s %s, MemUsage=%uKb", dllName, pModule ? "done" : "failed", uint32(memUsed / 1024));
|
||||
}
|
||||
|
||||
@@ -2383,8 +2385,6 @@ AZ_POP_DISABLE_WARNING
|
||||
#if !defined(CONSOLE)
|
||||
#if !defined(_RELEASE)
|
||||
bool isDaemonMode = (m_pCmdLine->FindArg(eCLAT_Pre, "daemon") != 0);
|
||||
#else
|
||||
bool isDaemonMode = false;
|
||||
#endif // !defined(_RELEASE)
|
||||
|
||||
#if defined(USE_DEDICATED_SERVER_CONSOLE)
|
||||
@@ -3733,17 +3733,6 @@ void CSystem::CreateSystemVars()
|
||||
m_cvMemStatsThreshold = REGISTER_INT ("MemStatsThreshold", 32000, VF_NULL, "");
|
||||
m_cvMemStatsMaxDepth = REGISTER_INT("MemStatsMaxDepth", 4, VF_NULL, "");
|
||||
|
||||
|
||||
// allows for loading gems and map files for release mode dedicated servers
|
||||
int dwPakPriorityFlags = VF_READONLY | VF_CHEAT;
|
||||
#if defined(_RELEASE)
|
||||
if (gEnv->IsDedicated())
|
||||
{
|
||||
dwPakPriorityFlags = VF_DEDI_ONLY;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
attachVariable("sys_PakReadSlice", &g_cvars.archiveVars.nReadSlice, "If non-0, means number of kilobytes to use to read files in portions. Should only be used on Win9x kernels");
|
||||
|
||||
attachVariable("sys_PakInMemorySizeLimit", &g_cvars.archiveVars.nInMemoryPerPakSizeLimit, "Individual pak size limit for being loaded into memory (MB)");
|
||||
|
||||
@@ -441,7 +441,7 @@ int CSystem::GetApplicationInstance()
|
||||
{
|
||||
suffix.Format("(%d)", instance);
|
||||
|
||||
HANDLE instanceMutex = CreateMutex(NULL, TRUE, "LumberyardApplication" + suffix);
|
||||
CreateMutex(NULL, TRUE, "LumberyardApplication" + suffix);
|
||||
// search for duplicates
|
||||
if (GetLastError() != ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
@@ -466,7 +466,7 @@ int CSystem::GetApplicationLogInstance([[maybe_unused]] const char* logFilePath)
|
||||
{
|
||||
suffix.Format("(%d)", instance);
|
||||
|
||||
HANDLE instanceMutex = CreateMutex(NULL, TRUE, logFilePath + suffix);
|
||||
CreateMutex(NULL, TRUE, logFilePath + suffix);
|
||||
if (GetLastError() != ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
break;
|
||||
@@ -589,12 +589,13 @@ void CSystem::DebugStats([[maybe_unused]] bool checkpoint, [[maybe_unused]] bool
|
||||
CloseHandle (hSnapshot);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ILog* log = GetILog();
|
||||
int totalal = 0, totalbl = 0, nolib = 0;
|
||||
|
||||
int nolib = 0;
|
||||
|
||||
#ifdef _DEBUG
|
||||
ILog* log = GetILog();
|
||||
int totalal = 0;
|
||||
int totalbl = 0;
|
||||
int extrastats[10];
|
||||
#endif
|
||||
|
||||
@@ -704,7 +705,9 @@ void CSystem::DebugStats([[maybe_unused]] bool checkpoint, [[maybe_unused]] bool
|
||||
phe.lpData = NULL;
|
||||
int nCommitted = 0, nUncommitted = 0, nOverhead = 0;
|
||||
int nCommittedPieces = 0, nUncommittedPieces = 0;
|
||||
#if !defined(NDEBUG)
|
||||
int nPrevRegionIndex = -1;
|
||||
#endif
|
||||
while (HeapWalk(hHeap, &phe))
|
||||
{
|
||||
if (phe.wFlags & PROCESS_HEAP_REGION)
|
||||
@@ -743,9 +746,7 @@ void CSystem::DebugStats([[maybe_unused]] bool checkpoint, [[maybe_unused]] bool
|
||||
|
||||
nOverhead += phe.cbOverhead;
|
||||
}
|
||||
;
|
||||
int nCommittedMin = min(nCommitted, nCommittedPieces);
|
||||
int nCommittedMax = max(nCommitted, nCommittedPieces);
|
||||
|
||||
CryLogAlways("* heap %8x: %6d (or ~%6d) K in use, %6d..%6d K uncommitted, %6d K overhead (%s)\n",
|
||||
handles[i], nCommittedPieces / 1024, nCommitted / 1024, nUncommittedPieces / 1024, nUncommitted / 1024, nOverhead / 1024, hinfo);
|
||||
|
||||
@@ -877,7 +878,6 @@ void CSystem::GetExeSizes (ICrySizer* pSizer, MemStatsPurposeEnum nPurpose)
|
||||
{
|
||||
// the sizes of each module group
|
||||
StringToSizeMap mapGroupSize;
|
||||
DWORD dwTotalModuleSize = 0;
|
||||
do
|
||||
{
|
||||
dwProcessID = me.th32ProcessID;
|
||||
@@ -1251,7 +1251,6 @@ void CSystem::LogSystemInfo()
|
||||
char szProfileBuffer[128];
|
||||
char szLanguageBuffer[64];
|
||||
//char szCPUModel[64];
|
||||
char* pChar = 0;
|
||||
|
||||
MEMORYSTATUSEX MemoryStatus;
|
||||
MemoryStatus.dwLength = sizeof(MemoryStatus);
|
||||
|
||||
@@ -313,8 +313,6 @@ TEST_F(CryPrimitives, CUT_CryString)
|
||||
string str4aNF("b-a");
|
||||
string str4bNF("12");
|
||||
|
||||
size_t nPosition3A(string::npos);
|
||||
|
||||
nPosition = strTestFindLastNotOfOverload1.find_last_not_of('d', 7);
|
||||
EXPECT_TRUE(nPosition == 5);
|
||||
|
||||
|
||||
@@ -441,8 +441,6 @@ void CThreadConfigManager::LoadPriority(const XmlNodeRef& rXmlThreadRef, int32&
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CThreadConfigManager::LoadDisablePriorityBoost(const XmlNodeRef& rXmlThreadRef, bool& rPriorityBoost, SThreadConfig::TThreadParamFlag& rParamActivityFlag)
|
||||
{
|
||||
const char* sValidCharacters = "-,0123456789";
|
||||
|
||||
// Validate node
|
||||
if (!rXmlThreadRef->haveAttr("DisablePriorityBoost"))
|
||||
{
|
||||
@@ -483,8 +481,6 @@ void CThreadConfigManager::LoadStackSize(const XmlNodeRef& rXmlThreadRef, uint32
|
||||
|
||||
if (rXmlThreadRef->haveAttr("StackSizeKB"))
|
||||
{
|
||||
int32 nPos = 0;
|
||||
|
||||
// Read stack size
|
||||
CryFixedStringT<32> stackSize(rXmlThreadRef->getAttr("StackSizeKB"));
|
||||
|
||||
|
||||
@@ -313,7 +313,10 @@ CThreadTaskManager::~CThreadTaskManager()
|
||||
AUTO_MODIFYLOCK(m_threadsPoolsLock);
|
||||
while (!m_threadsPools.empty())
|
||||
{
|
||||
bool res = DestroyThreadsPool(m_threadsPools.begin()->m_hHandle);
|
||||
#if !defined(NDEBUG)
|
||||
bool res =
|
||||
#endif
|
||||
DestroyThreadsPool(m_threadsPools.begin()->m_hHandle);
|
||||
assert(res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,8 +103,6 @@ void CView::Update(float frameTime, bool isActive)
|
||||
|
||||
// [VR] specific
|
||||
// Modify FOV based on the HMD device configuration
|
||||
bool hmdActive = false;
|
||||
|
||||
bool isRenderingToHMD = gEnv->pRenderer ? gEnv->pRenderer->GetIStereoRenderer()->IsRenderingToHMD() : false;
|
||||
if (isRenderingToHMD)
|
||||
{
|
||||
|
||||
@@ -533,8 +533,6 @@ void CViewSystem::BeginCutScene(IAnimSequence* pSeq, [[maybe_unused]] unsigned l
|
||||
{
|
||||
m_cutsceneCount++;
|
||||
|
||||
IConsole* pCon = gEnv->pConsole;
|
||||
|
||||
if (m_cutsceneCount == 1)
|
||||
{
|
||||
gEnv->p3DEngine->ResetPostEffects();
|
||||
@@ -548,8 +546,6 @@ void CViewSystem::EndCutScene(IAnimSequence* pSeq, [[maybe_unused]] unsigned lon
|
||||
{
|
||||
m_cutsceneCount -= (m_cutsceneCount > 0);
|
||||
|
||||
IConsole* pCon = gEnv->pConsole;
|
||||
|
||||
if (m_cutsceneCount == 0)
|
||||
{
|
||||
gEnv->p3DEngine->ResetPostEffects();
|
||||
|
||||
@@ -273,7 +273,10 @@ void CWindowsConsole::OnInit(ISystem* pSystem)
|
||||
m_pInputThread = new CWindowsConsoleInputThread(*this);
|
||||
m_pInputThread->Start();
|
||||
|
||||
BOOL handlerInstalled = SetConsoleCtrlHandler(CtrlHandler, TRUE);
|
||||
#if !defined(NDEBUG)
|
||||
BOOL handlerInstalled =
|
||||
#endif
|
||||
SetConsoleCtrlHandler(CtrlHandler, TRUE);
|
||||
CRY_ASSERT(handlerInstalled);
|
||||
|
||||
m_initialized = true;
|
||||
@@ -670,7 +673,6 @@ void CWindowsConsole::DrawStatus()
|
||||
// Current update rate and player count on the right.
|
||||
|
||||
const char* pMapName = m_pCVarSvMap->GetString();
|
||||
const char* pGameRules = m_pCVarSvGameRules->GetString();
|
||||
|
||||
const char* pMissionName = m_pCVarSvMission ? m_pCVarSvMission->GetString() : "";
|
||||
azsnprintf(bufferLeft, sizeof bufferLeft, " mission: %s map:%s", pMissionName, pMapName);
|
||||
@@ -730,9 +732,7 @@ void CWindowsConsole::DrawStatus()
|
||||
pStatusRight = "";
|
||||
}
|
||||
|
||||
int leftWidth = strlen(pStatusLeft);
|
||||
int rightWidth = strlen(pStatusRight);
|
||||
int pad = 0;
|
||||
|
||||
m_statusBuffer.Clear();
|
||||
m_statusBuffer.PutText(0, 0, pStatusLeft);
|
||||
@@ -991,7 +991,8 @@ void CWindowsConsole::CCellBuffer::Print(const char* pInszText, SPosition& posit
|
||||
break;
|
||||
}
|
||||
case '\\':
|
||||
if (m_escape = !m_escape)
|
||||
m_escape = !m_escape;
|
||||
if (m_escape)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -31,10 +31,7 @@ static WCHAR szFR[] = L"\\System32\\FaultRep.dll";
|
||||
|
||||
WCHAR* GetFullPathToFaultrepDll(void)
|
||||
{
|
||||
CHAR* lpRet = NULL;
|
||||
UINT rc;
|
||||
|
||||
rc = GetSystemWindowsDirectoryW(szPath, ARRAYSIZE(szPath));
|
||||
UINT rc = GetSystemWindowsDirectoryW(szPath, ARRAYSIZE(szPath));
|
||||
if (rc == 0 || rc > ARRAYSIZE(szPath) - ARRAYSIZE(szFR) - 1)
|
||||
{
|
||||
return NULL;
|
||||
@@ -140,7 +137,7 @@ LONG WINAPI CryEngineExceptionFilterWER(struct _EXCEPTION_POINTERS* pExceptionPo
|
||||
pfn_REPORTFAULT pfn = (pfn_REPORTFAULT)GetProcAddress(hFaultRepDll, "ReportFault");
|
||||
if (pfn)
|
||||
{
|
||||
EFaultRepRetVal rc = pfn(pExceptionPointers, 0);
|
||||
pfn(pExceptionPointers, 0);
|
||||
lRet = EXCEPTION_EXECUTE_HANDLER;
|
||||
}
|
||||
FreeLibrary(hFaultRepDll);
|
||||
|
||||
@@ -293,8 +293,6 @@ void ConsoleHide(IConsoleCmdArgs*)
|
||||
|
||||
void Bind(IConsoleCmdArgs* cmdArgs)
|
||||
{
|
||||
int count = cmdArgs->GetArgCount();
|
||||
|
||||
if (cmdArgs->GetArgCount() >= 3)
|
||||
{
|
||||
string arg;
|
||||
@@ -2230,11 +2228,12 @@ void CXConsole::DisplayHelp(const char* help, const char* name)
|
||||
else
|
||||
{
|
||||
char* start, * pos;
|
||||
for (pos = (char*)help, start = (char*)help; pos = strstr(pos, "\n"); start = ++pos)
|
||||
for (pos = strstr((char*)help, "\n"), start = (char*)help; pos; start = ++pos)
|
||||
{
|
||||
string s = start;
|
||||
s.resize(pos - start);
|
||||
ConsoleLogInputResponse(" $3%s", s.c_str());
|
||||
pos = strstr(pos, "\n");
|
||||
}
|
||||
ConsoleLogInputResponse(" $3%s", start);
|
||||
}
|
||||
@@ -2507,7 +2506,7 @@ void CXConsole::ExecuteDeferredCommands()
|
||||
// float curX = 10;
|
||||
// float curY = 10;
|
||||
|
||||
IRenderer* pRenderer = gEnv->pRenderer;
|
||||
//IRenderer* pRenderer = gEnv->pRenderer;
|
||||
|
||||
// Print the deferred messages
|
||||
// it = m_deferredCommands.begin();
|
||||
@@ -3532,9 +3531,8 @@ uint64 CXConsole::GetCheatVarHash()
|
||||
void CXConsole::SetCheatVarHashRange(size_t firstVar, size_t lastVar)
|
||||
{
|
||||
// check inputs are sane
|
||||
#ifndef _RELEASE
|
||||
#if !defined(NDEBUG)
|
||||
size_t numVars = GetNumCheatVars();
|
||||
|
||||
assert(firstVar < numVars && lastVar < numVars && lastVar >= firstVar);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -344,8 +344,6 @@ string CXConsoleVariableCVarGroup::GetDetailedInfo() const
|
||||
|
||||
for (it2 = m_CVarGroupStates.begin(); it2 != end2; ++it2)
|
||||
{
|
||||
SCVarGroup* pGrp = it2->second;
|
||||
|
||||
sRet += GetValueSpec(rKey, &(it2->first));
|
||||
sRet += "/";
|
||||
}
|
||||
|
||||
@@ -559,7 +559,6 @@ bool LoadTableInner(const SParseParams& parseParams, XmlNodeRef& definition, Xml
|
||||
}
|
||||
}
|
||||
|
||||
const char* tag = definition->getTag();
|
||||
if (parseParams.useAlways != (IXmlNode*)NULL)
|
||||
{
|
||||
assert(!definition->haveAttr("type"));
|
||||
|
||||
@@ -390,9 +390,8 @@ void CXMLPatcher::DumpFiles(
|
||||
{
|
||||
CryLog("Dumping before and after data files for '%s'", pInXMLFileName);
|
||||
|
||||
const char* pOrigFileName;
|
||||
|
||||
if (pOrigFileName = strrchr(pInXMLFileName, '/'))
|
||||
const char* pOrigFileName = strrchr(pInXMLFileName, '/');
|
||||
if (pOrigFileName)
|
||||
{
|
||||
pOrigFileName++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user