LunarG / gfxreconstruct

Graphics API Capture and Replay Tools for Reconstructing Graphics Application Behavior
https://vulkan.lunarg.com/doc/sdk/latest/linux/capture_tools.html
MIT License
416 stars 123 forks source link

Figure out how to capture images during replay #1836

Open MarkY-LunarG opened 1 month ago

MarkY-LunarG commented 1 month ago

Figure out how to capture images on both Monado and Meta Quest headsets for OpenXR. This is required for CI support.

Concern: how accurate is the replay cube location? Can we compare results between runs? Probably if we record in a static position.

MarkY-LunarG commented 1 month ago

Online says several different possibilities:

adb shell am startservice -n com.oculus.metacam/.capture.CaptureService
  -a TAKE_SCREENSHOT
  [--ei screenshot_height <screenshot_height>]
  [--ei screenshot_width <screenshot_width>]

We might be able to use:

adb exec-out screencap -p > screen.png
MarkY-LunarG commented 1 month ago

Ok, using

adb shell am startservice -n com.oculus.metacam/.capture.CaptureService -a TAKE_SCREENSHOT --ei screenshot_width 1920 --ei screenshot_height 1080

Places the screenshot under

/storage/self/primary/Oculus/Screenshots

The files are prefixed with the application name: com.lunarg.gfxreconstruct.replay- and end with .jpg.

You can then pull them down like this:

adb pull /storage/self/primary/Oculus/Screenshots/com.lunarg.gfxreconstruct.replay-20241028-105602.jpg