bombomby / optick

C++ Profiler For Games
https://optick.dev
MIT License
2.95k stars 296 forks source link

DirectX 11 support #99

Closed GregorEhrenstein closed 4 years ago

GregorEhrenstein commented 4 years ago

Hi,

I was wondering, if there are any plans to bring in GPU profiling support for DirectX 11?

Cheers...

bombomby commented 4 years ago

Hi GregorEhrenstein, there is no plans for supporting DirectX 11 at the moment. Most of the games are dropping support for DirectX 11 nowadays in favour of faster and more modern GAPIs (D3D12 and Vulkan). However if you are stuck with DirectX 11 for your game - you are welcome to try to add support for it. I'd be happy to merge a pull request with this feature. It shouldn't take more than a day for an experienced graphics programmer to add D3D11 support. Check https://github.com/bombomby/optick/blob/master/src/optick_gpu.d3d12.cpp as a reference implementation for D3D12.

GregorEhrenstein commented 4 years ago

Question: Is the GPU tracking only tracking full GPU frames? (i.e. you cannot track the length of different parts of the GPU frame?)

bombomby commented 4 years ago

You could track GPU cost of any part of the frame - you jsut mark scopes that you are intereted in and Optick takes care of issuing GPU timestamp queries and collecting results. You could find an example here - https://github.com/bombomby/optick/blob/master/samples/WindowsD3D12/D3D12Multithreading.cpp#L1064 (search for OPTICK_GPU_EVENT in this file).