Skip to content

Commit

Permalink
Main: Profiler - clean up GPUEvent API, that was forwarding to RenderSys
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed May 27, 2023
1 parent 5addb13 commit 3b37c70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
21 changes: 3 additions & 18 deletions OgreMain/include/OgreProfiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Ogre-dependent is in the visualization/logging routines and the use of the Timer
# define OgreProfileGroup( a, g ) Ogre::Profile OGRE_TOKEN_PASTE(_OgreProfileInstance, __LINE__) ( (a), (g) )
# define OgreProfileBeginGroup( a, g ) Ogre::Profiler::getSingleton().beginProfile( (a), (g) )
# define OgreProfileEndGroup( a, g ) Ogre::Profiler::getSingleton().endProfile( (a), (g) )
# define OgreProfileBeginGPUEvent( g ) Ogre::Profiler::getSingleton().beginGPUEvent(g)
# define OgreProfileEndGPUEvent( g ) Ogre::Profiler::getSingleton().endGPUEvent(g)
# define OgreProfileMarkGPUEvent( e ) Ogre::Profiler::getSingleton().markGPUEvent(e)
# define OgreProfileBeginGPUEvent( g ) Ogre::Root::getSingleton().getRenderSystem()->beginProfileEvent(g)
# define OgreProfileEndGPUEvent( g ) Ogre::Root::getSingleton().getRenderSystem()->endProfileEvent()
# define OgreProfileMarkGPUEvent( e ) Ogre::Root::getSingleton().getRenderSystem()->markProfileEvent(e)
#else
# define OgreProfile( a )
# define OgreProfileBegin( a )
Expand Down Expand Up @@ -275,21 +275,6 @@ namespace Ogre {
*/
void endProfile(const String& profileName, uint32 groupID = (uint32)OGREPROF_USER_DEFAULT);

/** Mark the beginning of a GPU event group
@remarks Can be safely called in the middle of the profile.
*/
void beginGPUEvent(const String& event);

/** Mark the end of a GPU event group
@remarks Can be safely called in the middle of the profile.
*/
void endGPUEvent(const String& event);

/** Mark a specific, ungrouped, GPU event
@remarks Can be safely called in the middle of the profile.
*/
void markGPUEvent(const String& event);

/** Sets whether this profiler is enabled. Only takes effect after the
the frame has ended.
@remarks When this is called the first time with the parameter true,
Expand Down
15 changes: 0 additions & 15 deletions OgreMain/src/OgreProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,6 @@ namespace Ogre {
#endif
}
//-----------------------------------------------------------------------
void Profiler::beginGPUEvent(const String& event)
{
Root::getSingleton().getRenderSystem()->beginProfileEvent(event);
}
//-----------------------------------------------------------------------
void Profiler::endGPUEvent(const String& event)
{
Root::getSingleton().getRenderSystem()->endProfileEvent();
}
//-----------------------------------------------------------------------
void Profiler::markGPUEvent(const String& event)
{
Root::getSingleton().getRenderSystem()->markProfileEvent(event);
}
//-----------------------------------------------------------------------
void Profiler::processFrameStats(ProfileInstance* instance, Real& maxFrameTime)
{
// calculate what percentage of frame time this profile took
Expand Down

0 comments on commit 3b37c70

Please sign in to comment.