JD2022-TU1/main/extern/Profiler/ExtProfiler/Profiler_X360.h

23 lines
480 B
C++

#ifndef ITF_EXTERN_PROFILER_X360_H
#define ITF_EXTERN_PROFILER_X360_H
#if !defined(PROFILE)
# define PROFILE
#endif
#include <xtl.h>
#include <pix.h>
namespace Ext
{
class PIXScopedProfiler
{
public:
PIXScopedProfiler( const char* text ) { PIXBeginNamedEvent( 0, text ); }
~PIXScopedProfiler() { PIXEndNamedEvent(); }
};
}
#define PROFILER_SCOPED_EVENT(__name) Ext::PIXScopedProfiler evt##__LINE__(__name)
#endif // ITF_EXTERN_PROFILER_X360_H