@@ -508,10 +508,10 @@ RenderStateCacheImpl::RenderStateCacheImpl(IReferenceCounters* pRe
508508 LOG_ERROR_AND_THROW (" Failed to create dearchiver" );
509509}
510510
511- #define RENDER_STATE_CACHE_LOG (...) \
511+ #define RENDER_STATE_CACHE_LOG (Level, ...) \
512512 do \
513513 { \
514- if (m_CI.EnableLogging ) \
514+ if (m_CI.LogLevel >= Level) \
515515 { \
516516 LOG_INFO_MESSAGE (" Render state cache: " , __VA_ARGS__); \
517517 } \
@@ -594,7 +594,7 @@ bool RenderStateCacheImpl::CreateShaderInternal(const ShaderCreateInfo& ShaderCI
594594 if (auto pShader = it->second .Lock ())
595595 {
596596 *ppShader = pShader.Detach ();
597- RENDER_STATE_CACHE_LOG (" Reusing existing shader '" , (ShaderCI.Desc .Name ? ShaderCI.Desc .Name : " " ), " '." );
597+ RENDER_STATE_CACHE_LOG (RENDER_STATE_CACHE_LOG_LEVEL_VERBOSE, " Reusing existing shader '" , (ShaderCI.Desc .Name ? ShaderCI.Desc .Name : " " ), " '." );
598598 return true ;
599599 }
600600 else
@@ -650,7 +650,7 @@ bool RenderStateCacheImpl::CreateShaderInternal(const ShaderCreateInfo& ShaderCI
650650 {
651651 if (pShader->GetDesc () == ShaderCI.Desc )
652652 {
653- RENDER_STATE_CACHE_LOG (" Found shader '" , HashStr, " '." );
653+ RENDER_STATE_CACHE_LOG (RENDER_STATE_CACHE_LOG_LEVEL_VERBOSE, " Found shader '" , HashStr, " ' in the archive ." );
654654 *ppShader = pShader.Detach ();
655655 return true ;
656656 }
@@ -676,7 +676,7 @@ bool RenderStateCacheImpl::CreateShaderInternal(const ShaderCreateInfo& ShaderCI
676676 if (pArchivedShader)
677677 {
678678 if (m_pArchiver->AddShader (pArchivedShader))
679- RENDER_STATE_CACHE_LOG (" Added shader '" , HashStr, " '." );
679+ RENDER_STATE_CACHE_LOG (RENDER_STATE_CACHE_LOG_LEVEL_NORMAL, " Added shader '" , HashStr, " '." );
680680 else
681681 LOG_ERROR_MESSAGE (" Failed to archive shader '" , HashStr, " '." );
682682 }
@@ -1025,7 +1025,7 @@ bool RenderStateCacheImpl::CreatePipelineStateInternal(const CreateInfoType& PSO
10251025 if (auto pPSO = it->second .Lock ())
10261026 {
10271027 *ppPipelineState = pPSO.Detach ();
1028- RENDER_STATE_CACHE_LOG (" Reusing existing PSO '" , (PSOCreateInfo.PSODesc .Name ? PSOCreateInfo.PSODesc .Name : " " ), " '." );
1028+ RENDER_STATE_CACHE_LOG (RENDER_STATE_CACHE_LOG_LEVEL_VERBOSE, " Reusing existing pipeline '" , (PSOCreateInfo.PSODesc .Name ? PSOCreateInfo.PSODesc .Name : " " ), " '." );
10291029 return true ;
10301030 }
10311031 else
@@ -1083,7 +1083,7 @@ bool RenderStateCacheImpl::CreatePipelineStateInternal(const CreateInfoType& PSO
10831083
10841084 if (FoundInCache)
10851085 {
1086- RENDER_STATE_CACHE_LOG (" Found PSO '" , HashStr, " '." );
1086+ RENDER_STATE_CACHE_LOG (RENDER_STATE_CACHE_LOG_LEVEL_VERBOSE, " Found pipeline '" , HashStr, " ' in the archive ." );
10871087 return true ;
10881088 }
10891089
@@ -1104,7 +1104,7 @@ bool RenderStateCacheImpl::CreatePipelineStateInternal(const CreateInfoType& PSO
11041104 if (pSerializedPSO)
11051105 {
11061106 if (m_pArchiver->AddPipelineState (pSerializedPSO))
1107- RENDER_STATE_CACHE_LOG (" Added PSO '" , HashStr, " '." );
1107+ RENDER_STATE_CACHE_LOG (RENDER_STATE_CACHE_LOG_LEVEL_NORMAL, " Added pipeline '" , HashStr, " '." );
11081108 else
11091109 LOG_ERROR_MESSAGE (" Failed to archive PSO '" , HashStr, " '." );
11101110 }
0 commit comments