Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding debug annotations to OpenGL objects, as well as defining GPU "zones" to achieve functionality very similar to Tracy, but on the GPU. #1845

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Beherith
Copy link
Contributor

@Beherith Beherith commented Dec 21, 2024

Implements #1833

Assists in assigning OpenGL id's to actual human readable names in performance debuggging.

IMPORTANT nVidia nSight 2022.04 was the only version that reliably worked for me.

New callouts:

  • gl.ObjectLabel(objectTypeIdentifier, objectID, name)

    • Allows marking of buffers and shaders (and textures and pretty much anything else) with a label that is visible in GL call stacks.
  • gl.PushDebugGroup(objectID, name, bool thirdparty = false)

    • To be used just like tracy.ZoneBeginN(name)
  • gl.PopDebugGroup()

    • counterpart of tracy.ZoneEnd()

Results, with only some minor modifications to LuaShader.lua to label, push and pop things:

image

@Beherith
Copy link
Contributor Author

Companion game PR is: beyond-all-reason/Beyond-All-Reason#4054

rts/Lua/LuaOpenGL.cpp Show resolved Hide resolved
rts/Lua/LuaOpenGL.cpp Show resolved Hide resolved
rts/Lua/LuaOpenGL.cpp Outdated Show resolved Hide resolved
rts/Lua/LuaVBO.cpp Show resolved Hide resolved
@Beherith
Copy link
Contributor Author

Issues resolved, ready for merge

@lhog
Copy link
Collaborator

lhog commented Jan 18, 2025

Unsure....
It doesn't compile and my comments seem to not have been addressed.

@Beherith
Copy link
Contributor Author

Unsure.... It doesn't compile and my comments seem to not have been addressed.

Please remind me of your comments, I have forgotten them :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants