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

Handle use of AHB on Android without QueuePresent with FrameBoundary as frame #1494

Open
Tracked by #1591
bradgrantham-lunarg opened this issue Apr 11, 2024 · 1 comment
Labels
android P1 Prevents an important capture from being replayed

Comments

@bradgrantham-lunarg
Copy link
Contributor

bradgrantham-lunarg commented Apr 11, 2024

In some titles on Android (Sascha's raytracing demo was reported, a Vulkan-Samples sample was reported, and a benchmarking app was reported), an AHardwareBuffer is used as the framebuffer (color attachment) and then is noted as the framebuffer in vkFrameBoundaryANDROID using a semaphore from a QueueSubmit. Presumably the Android compositor then takes that AHB and blits it to the screen or composites it, etc.

We don't handle this case in replay so we can't show anything on the screen nor take screenshots. We have https://github.com/panos-lunarg/gfxreconstruct/tree/panos_hack_is_frame_boundary to attempt to save screenshots but this is just a hack.

For this issue, treat this mode as a first-class presentation mode; make sure capture honors this mode for trim range frame numbers (probably already does because of vkFrameBoundaryANDROID) and then augment our frame processing and display in replay on Android to show the completed image and correctly save off screenshots. Stretch goal would be to get an AHB from compositor/HWUI and use that so that display is handled the same way it was in capture.

@bradgrantham-lunarg bradgrantham-lunarg added the P1 Prevents an important capture from being replayed label Apr 11, 2024
marius-pelegrin-arm added a commit to marius-pelegrin-arm/GFXReconstruct that referenced this issue Apr 17, 2024
This commit is part of what is requested in LunarG#1494

Change-Id: Ie448deebfb9858588779200ba6e78a9a0c5d6424
@marius-pelegrin-arm
Copy link
Contributor

Hello !

I created a PR (#1498) for supporting screenshots from vkFrameBoundaryANDROID. If accepted (or at least of the override is created) I will also modify #1440 to convert vkFrameBoundaryANDROID to a VkFrameBoundaryEXT when the option is set.

Presenting the image given in vkFrameBoundaryANDROID remains to be done.

marius-pelegrin-arm added a commit to marius-pelegrin-arm/GFXReconstruct that referenced this issue Apr 17, 2024
This commit is part of what is requested in LunarG#1494

Change-Id: Ie448deebfb9858588779200ba6e78a9a0c5d6424
marius-pelegrin-arm added a commit to marius-pelegrin-arm/GFXReconstruct that referenced this issue Apr 18, 2024
This commit is part of what is requested in LunarG#1494

Change-Id: Ie448deebfb9858588779200ba6e78a9a0c5d6424
panos-lunarg pushed a commit to panos-lunarg/gfxreconstruct that referenced this issue May 31, 2024
This commit is part of what is requested in LunarG#1494

Change-Id: Ie448deebfb9858588779200ba6e78a9a0c5d6424
locke-lunarg pushed a commit that referenced this issue Jun 10, 2024
* Make vkFrameBoundaryANDROID trigger screenshots

This commit is part of what is requested in #1494

Change-Id: Ie448deebfb9858588779200ba6e78a9a0c5d6424

* use device_info to WriteImage

---------

Co-authored-by: bradgrantham-lunarg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android P1 Prevents an important capture from being replayed
Projects
None yet
Development

No branches or pull requests

2 participants