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. #1930

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

Conversation

lhog
Copy link
Collaborator

@lhog lhog commented Feb 7, 2025

As well as defining GPU zones to achieve functionality very similar to Tracy, but on the GPU. V2

… GPU zones to achieve functionality very similar to Tracy, but on the GPU. V2
@lhog
Copy link
Collaborator Author

lhog commented Feb 7, 2025

The semantics changed slightly. Lua side should check if gl.ObjectLabel and others are not nil.
nil means the extensions is either unsupported or the engine run headless.

@lhog
Copy link
Collaborator Author

lhog commented Feb 8, 2025

@Beherith pls have a look

@lhog lhog added the status: candidate PRs that should be good to go or important for next release label Feb 8, 2025
rts/Lua/LuaOpenGL.cpp Outdated Show resolved Hide resolved
rts/Lua/LuaOpenGL.cpp Outdated Show resolved Hide resolved
@p2004a
Copy link
Collaborator

p2004a commented Feb 10, 2025

Have you tried integrating the native Tracy GPU Profiling?

Copy link
Contributor

@rhys-vdw rhys-vdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of notes on use of @return.

* @param objectTypeIdentifier GLenum Specifies the type of object being labeled.
* @param objectID GLuint Specifies the name or ID of the object to label.
* @param label string A string containing the label to be assigned to the object.
* @treturn nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@return here (or just don't document a nil return?)

/*** Gets the OpenGL Buffer ID
*
* @function VBO:GetID
* @treturn number buffer ID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be:

@return number bufferID

Because @return <type> <name> [Optional description.].

It's a bit odd that returns get names, but that's the standard. I think it helps in multi-return cases.

@Beherith
Copy link
Contributor

Have you tried integrating the native Tracy GPU Profiling?

GPU profiling is very different from CPU, and glDebugGroup is the standard there. NSight graphics gives you a much finer view over the performance counters within the GPU than tracy can, and gives more insight into optimization opportunities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: candidate PRs that should be good to go or important for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants