Celtoys / Remotery

Single C file, Realtime CPU/GPU Profiler with Remote Web Viewer
Apache License 2.0
3.03k stars 255 forks source link

Question about d3d12 #219

Closed kingofthebongo2008 closed 2 years ago

kingofthebongo2008 commented 2 years ago

Hello, I am looking at the d3d12 remotery implementation. I have a deferred command lists which are custom, the way one emulated deferred contexts on d3d9, not bundles or direct lists Since I do not have ID3D12GraphicsCommandList for sampling, if i modify the code in remotery to take this abstraction of a deferred context, which is later replayed in the same frame, will it be an issue? Thank you

dwilliamson commented 2 years ago

I'm not entirely sure I understand your situation.

The D3D12 samples store times that the GPU gives to it, and so the commands must be executed on the GPU to generate that data. The only way to issue those commands on the GPU is using either direct command lists or bundles. So at some point you must have access to a ID3D12GraphicsCommandList.

Does your abstraction have a command list under the hood? If so you could add a "profile point" abstraction along with it and use the functions rmt_BeginD3D12SampleDynamic and rmt_EndD3D12Sample when reacting to them later during replay.

kingofthebongo2008 commented 2 years ago

It works with the abstraction. i still do not see labels in the web app, but i think it is my mistake

kingofthebongo2008 commented 1 year ago

Yes it has, here is a snapshot of the deferred d3d12 contexts

void D3DDeferredDeviceContext12::EndQuery( In ID3D12QueryHeap pQueryHeap, In D3D12_QUERY_TYPE Type, In UINT Index) { uint8_t memory = Allocate< EndQueryCommand>(); EndQueryCommand* p = new (memory)EndQueryCommand(pQueryHeap, Type, Index); }

These commands are stored in a buffer and later replayed on a real GraphicsCommandList. I did an emulation will see how it is

On Sat, 2 Jul 2022 at 13:33, Don Williamson @.***> wrote:

I'm not entirely sure I understand your situation.

The D3D12 samples store times that the GPU gives to it, and so the commands must be executed on the GPU to generate that data. The only way to issue those commands on the GPU is using either direct command lists or bundles. So at some point you must have access to a ID3D12GraphicsCommandList.

Does your abstraction have a command list under the hood? If so you could add a "profile point" abstraction along with it and use the functions rmt_BeginD3D12SampleDynamic and rmt_EndD3D12Sample when reacting to them later during replay.

— Reply to this email directly, view it on GitHub https://github.com/Celtoys/Remotery/issues/219#issuecomment-1172876283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIXS4OTVD6OPQN6CTKCOG3VSALIFANCNFSM52OR6X7A . You are receiving this because you authored the thread.Message ID: @.***>