Integrating latest from github/staging
Integrating up through commit 5e1bdae
This commit is contained in:
@@ -1080,7 +1080,7 @@ void C3DEngine::WorldStreamUpdate()
|
||||
|
||||
if (GetCVars()->e_StreamSaveStartupResultsIntoXML)
|
||||
{
|
||||
const char* testResultsFile = "@cache@/TestResults/Streaming_Level_Start_Throughput.xml";
|
||||
const char* testResultsFile = "@usercache@/TestResults/Streaming_Level_Start_Throughput.xml";
|
||||
|
||||
AZ::IO::HandleType resultsFile = gEnv->pCryPak->FOpen(testResultsFile, "wb");
|
||||
if (resultsFile != AZ::IO::InvalidHandle)
|
||||
|
||||
@@ -952,7 +952,7 @@ void C3DEngine::ProcessStreamingLatencyTest(const CCamera& camIn, CCamera& camOu
|
||||
|
||||
if (GetCVars()->e_SQTestCount == 0)
|
||||
{
|
||||
const char* testResultsFile = "@cache@/TestResults/Streaming_Latency_Test.xml";
|
||||
const char* testResultsFile = "@usercache@/TestResults/Streaming_Latency_Test.xml";
|
||||
|
||||
AZ::IO::HandleType resultsFile = gEnv->pCryPak->FOpen(testResultsFile, "wb");
|
||||
if (resultsFile != AZ::IO::InvalidHandle)
|
||||
|
||||
@@ -461,7 +461,7 @@ void C3DEngine::UnloadLevel()
|
||||
m_ptexIconLowMemoryUsage = nullptr;
|
||||
m_ptexIconHighMemoryUsage = nullptr;
|
||||
m_ptexIconEditorConnectedToConsole = nullptr;
|
||||
|
||||
|
||||
if (m_pOpticsManager && !gEnv->IsEditor())
|
||||
{
|
||||
m_pOpticsManager->Reset();
|
||||
@@ -656,7 +656,7 @@ bool C3DEngine::LoadLevel(const char* szFolderName, const char* szMissionName)
|
||||
// set default render parameters.
|
||||
// for some reason this is not done later???
|
||||
m_pSkyLightManager->UpdateRenderParams();
|
||||
}
|
||||
}
|
||||
|
||||
// Load LevelData.xml File.
|
||||
XmlNodeRef xmlLevelData = GetSystem()->LoadXmlFromFile(GetLevelFilePath(LEVEL_DATA_FILE));
|
||||
@@ -687,17 +687,7 @@ bool C3DEngine::LoadLevel(const char* szFolderName, const char* szMissionName)
|
||||
// preload level cgfs
|
||||
if (GetCVars()->e_StatObjPreload && !gEnv->IsEditor())
|
||||
{
|
||||
if (GetCVars()->e_StatObjPreload == 2)
|
||||
{
|
||||
GetSystem()->OutputLoadingTimeStats();
|
||||
}
|
||||
|
||||
m_pObjManager->PreloadLevelObjects();
|
||||
|
||||
if (GetCVars()->e_StatObjPreload == 2)
|
||||
{
|
||||
GetSystem()->OutputLoadingTimeStats();
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<struct IStatObj*>* pStatObjTable = NULL;
|
||||
|
||||
@@ -317,7 +317,8 @@ int CLightEntity::UpdateGSMLightSourceDynamicShadowFrustum(int nDynamicLodCount,
|
||||
|
||||
if (bDoGSM)
|
||||
{
|
||||
Vec3 vSunDir = Get3DEngine()->GetSunDir().GetNormalized(); // todo: remove GetNormalized() once GetSunDir() returns the normalized value
|
||||
//Vec3 vSunDir = Get3DEngine()->GetSunDir().GetNormalized(); // todo: remove GetNormalized() once GetSunDir() returns the normalized value
|
||||
Vec3 vSunDir = Vec3(1.0f, 0.0f, 0.0f);
|
||||
Vec3 vCameraDirWithoutDepth = vCameraDir - vCameraDir.Dot(vSunDir) * vSunDir;
|
||||
|
||||
Vec3 vFocusPos = passInfo.GetCamera().GetPosition() + vCameraDirWithoutDepth * fGSMBoxSize;
|
||||
|
||||
@@ -117,10 +117,6 @@ CMatInfo::CMatInfo()
|
||||
|
||||
ZeroStruct(m_streamZoneInfo);
|
||||
|
||||
#ifdef TRACE_MATERIAL_LEAKS
|
||||
m_sLoadingCallstack = GetSystem()->GetLoadingProfilerCallstack();
|
||||
#endif
|
||||
|
||||
// Used to know when a .dccmtl file has been changed,
|
||||
// requiring the source material to be updated
|
||||
m_dccMaterialHash = 0;
|
||||
@@ -341,7 +337,7 @@ ISurfaceType* CMatInfo::GetSurfaceType()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CMatInfo::SetSubMtlCount(int numSubMtl)
|
||||
{
|
||||
AUTO_LOCK(GetSubMaterialResizeLock());
|
||||
AUTO_LOCK(GetSubMaterialResizeLock());
|
||||
if (numSubMtl > 0)
|
||||
{
|
||||
m_Flags |= MTL_FLAG_MULTI_SUBMTL;
|
||||
@@ -1112,15 +1108,6 @@ void CMatInfo::SetTexelDensityDebug([[maybe_unused]] int mode)
|
||||
#endif
|
||||
}
|
||||
|
||||
const char* CMatInfo::GetLoadingCallstack()
|
||||
{
|
||||
#ifdef TRACE_MATERIAL_LEAKS
|
||||
return m_sLoadingCallstack.c_str();
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
void CMatInfo::PrecacheMaterial(const float _fEntDistance, IRenderMesh* pRenderMesh, bool bFullUpdate, bool bDrawNear)
|
||||
{
|
||||
// FUNCTION_PROFILER_3DENGINE;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <IMaterial.h>
|
||||
|
||||
#if !defined(CONSOLE)
|
||||
# define TRACE_MATERIAL_LEAKS
|
||||
# define SUPPORT_MATERIAL_EDITING
|
||||
#endif
|
||||
|
||||
@@ -203,7 +202,7 @@ public:
|
||||
bool SetGetMaterialParamFloat(const char* sParamName, float& v, bool bGet, bool allowShaderParam = false, int materialIndex = 0) override;
|
||||
bool SetGetMaterialParamVec3(const char* sParamName, Vec3& v, bool bGet, bool allowShaderParam = false, int materialIndex = 0) override;
|
||||
bool SetGetMaterialParamVec4(const char* sParamName, Vec4& v, bool bGet, bool allowShaderParam = false, int materialIndex = 0) override;
|
||||
|
||||
|
||||
void SetDirty(bool dirty = true) override;
|
||||
bool IsDirty() const override;
|
||||
|
||||
@@ -264,11 +263,6 @@ public:
|
||||
bool IsForwardRenderingRequired();
|
||||
bool IsNearestCubemapRequired();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Debug routines
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
virtual const char* GetLoadingCallstack(); // trace leaking materials by callstack
|
||||
|
||||
void DisableTextureStreaming() override;
|
||||
virtual void RequestTexturesLoading(const float fMipFactor);
|
||||
|
||||
@@ -286,13 +280,6 @@ public:
|
||||
void SetDccMaterialHash(uint32 hash) override { m_dccMaterialHash = hash; }
|
||||
|
||||
virtual CryCriticalSection& GetSubMaterialResizeLock();
|
||||
public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// for debug purposes
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifdef TRACE_MATERIAL_LEAKS
|
||||
string m_sLoadingCallstack;
|
||||
#endif
|
||||
|
||||
private:
|
||||
friend class CMatMan;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(CONSOLE)
|
||||
# define TRACE_CGF_LEAKS
|
||||
# define SUPPORT_TERRAIN_AO_PRE_COMPUTATIONS
|
||||
#endif
|
||||
|
||||
@@ -337,13 +336,6 @@ public:
|
||||
std::vector<uint16> m_chunkBoneIds;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// for debug purposes
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
#ifdef TRACE_CGF_LEAKS
|
||||
string m_sLoadingCallstack;
|
||||
#endif
|
||||
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Sub objects.
|
||||
@@ -419,7 +411,7 @@ public:
|
||||
virtual unsigned int GetBreakableByGame() { return m_bBreakableByGame; };
|
||||
|
||||
//Note: This function checks both the children and root data
|
||||
//It should really be 'has any deformable objects'
|
||||
//It should really be 'has any deformable objects'
|
||||
//Should eventually be refactored as part of an eventual statobj refactor.
|
||||
virtual bool IsDeformable() override;
|
||||
|
||||
|
||||
@@ -56,10 +56,6 @@ CStatObj::CStatObj()
|
||||
m_fLodDistance = 0.0f;
|
||||
|
||||
Init();
|
||||
|
||||
#ifdef TRACE_CGF_LEAKS
|
||||
m_sLoadingCallstack = GetSystem()->GetLoadingProfilerCallstack();
|
||||
#endif
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user