/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/RendererFoundation/Profiling/Profiling.h
35 строк
1 KB
Jan Krassnigg
Fixed shipping build
22 июл 2026, 14:02
22 июл 2026, 14:02
a1a40ee
Код
Авторство
О чём код?
#pragma once #include <Foundation/Profiling/Profiling.h> #include <RendererFoundation/RendererFoundationDLL.h> struct GPUTimingScope; #if EZ_ENABLED(EZ_USE_PROFILING) || defined(EZ_DOCS) /// Sets profiling marker and GPU timings for the current scope. class EZ_RENDERERFOUNDATION_DLL ezProfilingScopeAndMarker : public ezProfilingScope { public: static GPUTimingScope* Start(ezGALCommandEncoder* pCommandEncoder, const char* szName); static void Stop(ezGALCommandEncoder* pCommandEncoder, GPUTimingScope*& ref_pTimingScope); ezProfilingScopeAndMarker(ezGALCommandEncoder* pCommandEncoder, const char* szName); ~ezProfilingScopeAndMarker(); protected: ezGALCommandEncoder* m_pCommandEncoder; GPUTimingScope* m_pTimingScope; }; /// \brief Profiles the current scope using the given name and also inserts a marker with the given command encoder. # define EZ_PROFILE_AND_MARKER(GALCommandEncoder, ScopeName) \ ezProfilingScopeAndMarker EZ_PP_CONCAT(_ezProfilingScope, EZ_SOURCE_LINE)(GALCommandEncoder, ScopeName); \ EZ_TRACY_PROFILE_SCOPE(ScopeName) #else # define EZ_PROFILE_AND_MARKER(GALCommandEncoder, ScopeName) /*empty*/ #endif