forked from hyprwm/Hyprland
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#ifdef USE_TRACY_GPU | ||
|
||
#include "Log.hpp" | ||
|
||
#include <GL/gl.h> | ||
#include <GLES2/gl2ext.h> | ||
|
||
inline PFNGLQUERYCOUNTEREXTPROC glQueryCounter; | ||
inline PFNGLGETQUERYOBJECTIVEXTPROC glGetQueryObjectiv; | ||
inline PFNGLGETQUERYOBJECTUI64VEXTPROC glGetQueryObjectui64v; | ||
|
||
#include "../../subprojects/tracy/public/tracy/TracyOpenGL.hpp" | ||
|
||
inline void loadGLProc(void* pProc, const char* name) { | ||
void* proc = (void*)eglGetProcAddress(name); | ||
if (proc == NULL) { | ||
Debug::log(CRIT, "[Tracy GPU Profiling] eglGetProcAddress(%s) failed", name); | ||
abort(); | ||
} | ||
*(void**)pProc = proc; | ||
} | ||
|
||
#define TRACY_GPU_CONTEXT TracyGpuContext | ||
#define TRACY_GPU_ZONE(e) TracyGpuZone(e) | ||
#define TRACY_GPU_COLLECT TracyGpuCollect | ||
|
||
#else | ||
|
||
#define TRACY_GPU_CONTEXT | ||
#define TRACY_GPU_ZONE(e) | ||
#define TRACY_GPU_COLLECT | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters