OpenGL: Add GLProfiler for GPU timestamp profiling

Adds a new GLProfiler class for GPU-side timestamp profiling, similar to
VulkanProfiler. Uses GL_EXT_disjoint_timer_query (GLES) or GL_ARB_timer_query
(desktop GL).

Features:
- Scoped Begin()/End() profiling with printf-style naming
- Automatic GPU disjoint detection (frequency changes invalidate results)
- Millisecond timing output via INFO_LOG
- Pre-allocated query pool (1024 queries max per frame)
- Nested scope support with indented output

Signed-off-by: Chris Healy <cphealy@gmail.com>
This commit is contained in:
Chris Healy
2026-03-18 09:48:15 -07:00
parent 856e6ed49b
commit ba59170b0b
7 changed files with 239 additions and 0 deletions
+1
View File
@@ -476,6 +476,7 @@ SOURCES_CXX += \
$(COMMONDIR)/GPU/OpenGL/GLRenderManager.cpp \
$(COMMONDIR)/GPU/OpenGL/GLMemory.cpp \
$(COMMONDIR)/GPU/OpenGL/GLQueueRunner.cpp \
$(COMMONDIR)/GPU/OpenGL/GLProfiler.cpp \
$(COMMONDIR)/GPU/OpenGL/DataFormatGL.cpp \
$(COMMONDIR)/GPU/Vulkan/thin3d_vulkan.cpp \
$(COMMONDIR)/GPU/Vulkan/VulkanQueueRunner.cpp \