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

d3dretrace: Add profiling support #476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

siro20
Copy link
Contributor

@siro20 siro20 commented Jul 31, 2016

Add profiling support for D3D9. It's based on glretrace code and
Tiziano Bacocco initial attempt.

Crosscompiled using mingw64 and tested on WINE.

Signed-off-by: Patrick Rudolph [email protected]

Add profiling support for D3D9. It's based on glretrace code and
Tiziano Bacocco initial attempt.

Crosscompiled using mingw64 and tested on WINE.

Signed-off-by: Patrick Rudolph <[email protected]>
@jrfonseca
Copy link
Member

@siro20, @iiv3, I tried to merge this, but I'm afraid this still needs additional work.

When I tried to run d3dretrace --pgpu ... on Windows it immediately hung.

Looking at the source code, snippets like

while(query.ids[GPU_START]->GetData(&gpuStart, sizeof(UINT64), 0) != S_OK) {}

look wrong in a few ways:

  • One should use D3DGETDATA_FLUSH, to ensure the commands are actually flushed
  • One should check for S_FALSE, to avoid deadlocking on errors

See https://docs.microsoft.com/en-us/windows/desktop/direct3d9/queries for more info.

There are some matters of code style, but that I can gloss over for now. But this needs to work minimally well not only on WINE but on native Windows before I can merge.

It's not too hard to fix it myself, but I don't think I'll have the time now, as I'm looking for the low hanging fruit PRs I can merge without too much manual intervention.

@siro20
Copy link
Contributor Author

siro20 commented Sep 16, 2018

I'll fix that possible deadlock and check if I can make it more stable.
I can only test on WINE, but we will work with the community to test it on Windows, too.

@jrfonseca jrfonseca added the Further Work Needed For PRs which need more work. label May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Further Work Needed For PRs which need more work. Replaying
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants