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

Add replay option with user specified window location #1348

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

mizhen
Copy link
Contributor

@mizhen mizhen commented Nov 13, 2023

The problem

Allow user to specified window orgin/starting location and replay GFXR trace in windowed mode without resizing the window resolution (it should be the same size as captured).

The solution

Add replay option with user specified window location. The feature is for both D3D12 and Vulkan on Windows platform. It allows user to specify window starting location and force playback in windowed mode with original resolution (instead of full screen).

In addition to the new option, the pull request also includes a bug fix to the following issue:
--fw option failed to force windowed for full screen resolution. For example, for 4k trace file on 4k screen, the force-windowed option always fails if set --fw 3840,2160, it will always be full-screen mode.

Result
Tested DX12/Vulkan samples and target title trace file with the build of the pull request, all passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 82587.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3488 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3488 passed.

@perim
Copy link

perim commented Nov 14, 2023

How will you deal with multiple windows? For the patrace project we record the window positions of each created window so that they can be recreated in the same position on replay. This is especially useful for UI apps that are composed of multiple windows side by side of each other. Could that be a solution here as well?

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 87903.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3541 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3541 passed.

@mizhen
Copy link
Contributor Author

mizhen commented Nov 21, 2023

How will you deal with multiple windows? For the patrace project we record the window positions of each created window so that they can be recreated in the same position on replay. This is especially useful for UI apps that are composed of multiple windows side by side of each other. Could that be a solution here as well?

In current code (with or without the pull request), for supporting the multiple windows which are part of UI apps, current code need some changes such as recording the order, location, size and related style parameters of windows into some new trace block to replace current ResizeWindowCommand or ResizeWindowCommand2 for the window creation and resize during playback time, plus some other related changes. However, I think multiple windows of UI apps handling can be a new feature to implement in future.

As for this pull-request replaces existing fixed window origin 0,0 with user specified location and other related full screen / windowed mode changes, it doesn't append any handling with multiple windows of which the location has different values.

@locke-lunarg locke-lunarg self-assigned this Apr 10, 2024
@locke-lunarg
Copy link
Contributor

locke-lunarg commented Apr 13, 2024

LGTM. But, could we combine force_windowed and force_windowed_origin? or do we prefer to separate?

@mizhen
Copy link
Contributor Author

mizhen commented Apr 15, 2024

LGTM. But, could we combine force_windowed and force_windowed_origin? or do we prefer to separate?

Currently the function of the two options is different, one is --force-windowed <width,height>, another is --force-windowed-origin <xloc,yloc>. We can combine the two into --force-windowed <width,height,x,y> in the future when virtual swapchain supports both dx12 and vulkan and can scale to specific window size.

@locke-lunarg
Copy link
Contributor

I think it's ok to combine them in the future. Please rebase it, and pass the test, and then it will be good to merge.

@mizhen
Copy link
Contributor Author

mizhen commented Apr 16, 2024

I think it's ok to combine them in the future. Please rebase it, and pass the test, and then it will be good to merge.

OK, will do that.

mizhen added 2 commits April 16, 2024 15:30
Add replay option with user specified window location. The feature is
for both D3D12 and Vulkan on Windows platform. It allows user to specify
window starting location and force playback in windowed mode with original
resolution (instead of full-screen).
For some trace files captured on some title full screen mode, playback may
fail because the call to vkAcquireFullScreenExclusiveModeEXT failed. The
change fixes the issue.
@mizhen mizhen force-pushed the ming-dev-set-replay-window-location branch from c90bb31 to 78866db Compare April 17, 2024 13:10
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 168913.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4015 running.

@mizhen
Copy link
Contributor Author

mizhen commented Apr 17, 2024

Will fix the macOS build issues.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 168932.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4016 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4016 passed.

@mizhen
Copy link
Contributor Author

mizhen commented Apr 17, 2024

I think it's ok to combine them in the future. Please rebase it, and pass the test, and then it will be good to merge.

OK, will do that.

Done.

@locke-lunarg locke-lunarg merged commit c6f085a into LunarG:dev Apr 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants