File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -649,11 +649,16 @@ void TimeStats::sumWith( const TimeStats* pOther )
649649 }
650650}
651651
652- void TimeStats::printTime ( ShaderType type, ShaderHash hash ) const
652+ void TimeStats::printTime ( ShaderType type, ShaderHash hash) const
653+ {
654+ printTime (type, hash, nullptr );
655+ }
656+
657+ void TimeStats::printTime ( ShaderType type, ShaderHash hash, void * context ) const
653658{
654659 TimeStats pp = postProcess ();
655660
656- std::string shaderName = IGC::Debug::DumpName (IGC::Debug::GetShaderOutputName ()).Type (type).Hash (hash).str ().c_str ();
661+ std::string shaderName = IGC::Debug::DumpName (IGC::Debug::GetShaderOutputName ()).Type (type).Hash (hash).StagedInfo (context). str ().c_str ();
657662 if (shaderName.find_last_of (" \\ " ) != std::string::npos)
658663 {
659664 shaderName = shaderName.substr (shaderName.find_last_of (" \\ " ) + 1 , shaderName.size ());
Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ class TimeStats
244244 uint64_t getCompileHit ( COMPILE_TIME_INTERVALS compileInterval ) const ;
245245
246246 // / Print the accumulated times for a single shader
247+ void printTime ( ShaderType type, ShaderHash hash, void * context) const ;
247248 void printTime ( ShaderType type, ShaderHash hash ) const ;
248249 // / Print the aggregated times for multiple shaders
249250 void printSumTime () const ;
@@ -392,15 +393,15 @@ class TimeStats
392393 (pointer)->statName = nullptr ; \
393394 } while (0 )
394395
395- #define COMPILER_TIME_PRINT ( pointer, shaderType, shaderHash ) \
396+ #define COMPILER_TIME_PRINT ( pointer, ... ) \
396397 do \
397398 { \
398399 if ( (pointer) && (pointer)->m_compilerTimeStats ) \
399400 { \
400401 if ( IGC::Debug::GetDebugFlag ( IGC::Debug::DebugFlag::TIME_STATS_PER_SHADER ) ) \
401402 { \
402403 (pointer)->m_compilerTimeStats ->printTime ( \
403- shaderType, shaderHash ); \
404+ __VA_ARGS__ ); \
404405 } \
405406 } \
406407 } while (0 )
Original file line number Diff line number Diff line change @@ -114,15 +114,16 @@ DumpName DumpName::Extension(std::string const& extension) const
114114 return copy;
115115}
116116
117- DumpName DumpName::StagedInfo (IGC::CodeGenContext const * context) const
117+ DumpName DumpName::StagedInfo (void const * context) const
118118{
119119 DumpName copy (*this );
120- if (!IsStage2RestSIMDs (context->m_StagingCtx ) &&
121- context->m_CgFlag != FLAG_CG_ALL_SIMDS)
120+ IGC::CodeGenContext const * ctx = (IGC::CodeGenContext const *) context;
121+ if (!IsStage2RestSIMDs (ctx->m_StagingCtx ) &&
122+ ctx->m_CgFlag != FLAG_CG_ALL_SIMDS)
122123 {
123- copy.m_cgFlag = context ->m_CgFlag ;
124+ copy.m_cgFlag = ctx ->m_CgFlag ;
124125 }
125- else if (IsStage2RestSIMDs (context ->m_StagingCtx ))
126+ else if (IsStage2RestSIMDs (ctx ->m_StagingCtx ))
126127 {
127128 copy.m_cgFlag = FLAG_CG_ALL_SIMDS;
128129 }
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class DumpName
7979 DumpName ShaderName (std::string const & name) const ;
8080 DumpName Type (ShaderType type) const ;
8181 DumpName Extension (std::string const & extension) const ;
82- DumpName StagedInfo (IGC::CodeGenContext const * context) const ;
82+ DumpName StagedInfo (void const * context) const ;
8383 DumpName SIMDSize (SIMDMode width) const ;
8484 DumpName DispatchMode (ShaderDispatchMode mode) const ;
8585 DumpName Hash (ShaderHash hash) const ;
You can’t perform that action at this time.
0 commit comments