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

Most gapit verbs can now take a capture ID instead of a gfxtrace file. #2337

Merged
merged 3 commits into from
Nov 1, 2018

Conversation

paulthomson
Copy link
Contributor

@paulthomson paulthomson commented Oct 31, 2018

I would like to be able to pass a capture ID and a gapis-port to gapit screenshot so that it will take a screenshot of some capture that is already loaded. This avoids me having to wait 5 mins per screenshot to load the capture; instead, I can load it once from disk and then refer to it later via its capture ID. I would also like to modify (i.e. create mutated versions of) captures in gapis without writing them to disk, so this PR will be useful in this scenario.

Slightly weird: since the capture file is a positional/non-flag argument, I am attempting to parse it as a hex string (capture ID) and, if that fails, treating it as a file as before. If you have a filename that happens to be a hex string, you could use e.g. "./0000FFFFF". Could alternatively use a flag and then expect no positional args.

@AWoloszyn
Copy link
Contributor

You could add a boolean flag to gapit, (--capture-id) that just tells gapit that the given string is a capture-id instead of a file.

We have several boolean flags already, and this would make it more unambiguous. (-noopt for example).

@paulthomson paulthomson changed the title gapit screenshot can now take a Capture id instead of a gfxtrace file. Most gapit verbs can now take a capture ID instead of a gfxtrace file. Oct 31, 2018
@paulthomson
Copy link
Contributor Author

paulthomson commented Oct 31, 2018

Talked with Ben. Made most gapit verbs be able to take a capture ID. If you add -captureid, the capture arg will be interpreted as a capture ID instead of a capture file path. Most verbs get gapis and load a trace, so created a getGapisAndLoadCapture function.

@paulthomson
Copy link
Contributor Author

I also added another change: gapit replace_resource can optionally not write out a capture file by passing a flag: -skipoutput. This allows me to mutate traces in gapis and then get screenshots from them, without having to write them to disk.

@AWoloszyn AWoloszyn merged commit 8baa296 into google:master Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants