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

GS:MTL: Give labels to textures #10445

Merged
merged 1 commit into from
Dec 30, 2023
Merged

Conversation

TellowKrinkle
Copy link
Member

Description of Changes

Adds labels to textures based on their usage and a counter

Rationale behind Changes

If a texture doesn't have a label, Xcode's GPU debugger gives it the amazing label of sprintf(label, "Texture %p", this), which is very non-memorable and makes keeping track of which textures are going where much more painful than it needs to be.

Suggested Testing Steps

  • Take a gpu trace and look at it in the Xcode trace debugger

    Before image
    After image

@stenzek
Copy link
Contributor

stenzek commented Dec 22, 2023

I've been wanting to do something like this at the GSRenderer/GSTextureCache level for a while, label the textures with the BP, format, etc.

Problem is, they can get reused within the same frame, and the labels are set immediately, so you only have one label per frame..

@stenzek
Copy link
Contributor

stenzek commented Dec 30, 2023

I'm going to move this to the base texture class, so that all renderers get the debug names, but easier to merge now rather then rebase later.

@stenzek stenzek merged commit 97310b8 into PCSX2:master Dec 30, 2023
11 checks passed
@TellowKrinkle TellowKrinkle deleted the MTLDebugLabels branch January 25, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants