-
Notifications
You must be signed in to change notification settings - Fork 117
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
dx12 option: GFXRECON_CAPTURE_DRAW_CALLS #1680
base: dev
Are you sure you want to change the base?
Conversation
CI gfxreconstruct build queued with queue ID 240395. |
CI gfxreconstruct build # 4641 running. |
CI gfxreconstruct build # 4641 passed. |
2404fa2
to
63b0e0c
Compare
CI gfxreconstruct build queued with queue ID 240636. |
CI gfxreconstruct build # 4649 running. |
63b0e0c
to
d65c3d6
Compare
CI gfxreconstruct build queued with queue ID 240733. |
CI gfxreconstruct build # 4651 running. |
CI gfxreconstruct build # 4651 passed. |
d65c3d6
to
cf502e4
Compare
CI gfxreconstruct build queued with queue ID 240809. |
CI gfxreconstruct build # 4652 running. |
CI gfxreconstruct build queued with queue ID 240824. |
64b1864
to
5d91d28
Compare
CI gfxreconstruct build queued with queue ID 240825. |
CI gfxreconstruct build # 4654 running. |
CI gfxreconstruct build # 4654 passed. |
5d91d28
to
c0cd410
Compare
CI gfxreconstruct build queued with queue ID 240912. |
c0cd410
to
9c19f41
Compare
CI gfxreconstruct build queued with queue ID 240914. |
9c19f41
to
bb8e6bd
Compare
CI gfxreconstruct build queued with queue ID 240932. |
bb8e6bd
to
fa93861
Compare
CI gfxreconstruct build queued with queue ID 240933. |
fa93861
to
ec4d6f8
Compare
CI gfxreconstruct build queued with queue ID 240954. |
CI gfxreconstruct build queued with queue ID 265682. |
CI gfxreconstruct build # 4908 running. |
CI gfxreconstruct build # 4908 passed. |
Specify one index or a range indices drawacalls(include dispatch) based on a ExecuteCommandList index and a CommandList index to capture. The index is 1-based. The args are one submit index, one command index, one or a range indices of draw calls, one or a range indices of bundle drawcalls(option), like "1,1,1" or "1,1,1-2" or "1,1,1,1-2". The forth arg is an option for bundle case. If the the 3rd arg is a bundle commandlist, but it doesn't set the 4th arg, it will set 1 as default. Default is: Empty string (all drawcalls are captured).
Override functions need wrapped objects and wrappers.
It does something similar to dump resources, but a bit different. Trimming drawcalls is not like dump resources that could browse the captured file to find target commandlist and drawcall before replay. For trimming drawcalls, it doesn't know the target commandlist until running the target ExecuteCommandLists. In this case, it assumes every commandlist could be the target commandlist. Every commandlist has three splitted commandlists and add command to the splitted commandlists. It also can't know which drawcall is the target in advance, commandlist has a drawcall_count to count it. Splitted commandlists will add some redundant commands since it couldn't know the target drawcall in advance, But it shouldn't affect the result and performance.
For copy swapchain buffers: 1. The queue has to been swapchain's queue. 2. One ExecuteCommandLists could work for only one swapchain buffer. 3. The current back buffer index has to match the swapchain buffer. 4. After ExecuteCommandLists, the current back buffer index has to back init.
The original code skips writing and tracking extra ExecuteCommandLists. But the tracking is necessary for the correct resource states. The extra ExecuteCommandLists are for splitted commandlists of trimming drawcalls.
61e7de2
to
41f3c50
Compare
CI gfxreconstruct build queued with queue ID 265824. |
CI gfxreconstruct build # 4912 running. |
CI gfxreconstruct build # 4912 passed. |
Move before extra ExecuteCommandLists from PreProcess_ID3D12CommandQueue_ExecuteCommandLists to OverrideID3D12CommandQueue_ExecuteCommandLists. All three extra ExecuteCommandLists are in OverrideID3D12CommandQueue_ExecuteCommandLists to make the code simpler.
41f3c50
to
04fb9c1
Compare
CI gfxreconstruct build queued with queue ID 265859. |
CI gfxreconstruct build # 4913 running. |
CI gfxreconstruct build # 4913 passed. |
Move code from Override functions to individual functions
DATA_STATIC could cause error for splitted commandlists. DATA_STATIC_WHILE_SET_AT_EXECUTE is better. Both trimming draw calls on capture and dump resources on replay have this issue.
CI gfxreconstruct build queued with queue ID 266668. |
CI gfxreconstruct build # 4923 running. |
CI gfxreconstruct build # 4923 passed. |
dx12 option: GFXRECON_CAPTURE_DRAW_CALLS
Specify one index or a range indices drawacalls(include dispatch) based on a ExecuteCommandList index and a CommandList index to capture. The index is 1-based. The args are one submit index, one command index, one or a range indices of draw calls, one or a range indices of bundle drawcalls(option), like "1,1,1" or "1,1,1-2" or "1,1,1,1-2". The forth arg is an option for bundle case. If the the 3rd arg is a bundle commandlist, but it doesn't set the 4th arg, it will set 1 as default. Default is: Empty string (all drawcalls are captured).
Dump resources doesn't the 4th arg. Although three args are enough for dump resources, it will add the 4th arg on it.
Not unwrapped objects for override functions
Override functions need wrapped objects and wrappers.
Split commandlist into three for target drawcalls
It does something similar to dump resources, but a bit different. Trimming drawcalls is not like dump resources that could browse the captured file to find target commandlist and drawcall before replay.
For trimming drawcalls, it doesn't know the target commandlist until running the target ExecuteCommandLists. In this case, it assumes every commandlist could be the target commandlist. Every commandlist has three splitted commandlists and add command to the splitted commandlists.
It also can't know which drawcall is the target in advance, commandlist has a drawcall_count to count it. Splitted commandlists will add some redundant commands since it couldn't know the target drawcall in advance, But it shouldn't affect the result and performance.
Based on #1727