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

minimal steps for gfxr capture #669

Open
ramcn opened this issue Mar 16, 2022 · 2 comments
Open

minimal steps for gfxr capture #669

ramcn opened this issue Mar 16, 2022 · 2 comments
Labels
enhancement New feature or request P3

Comments

@ramcn
Copy link

ramcn commented Mar 16, 2022

Hi Team,

I am new to this tool and trying figure out how to capture a single frame by looking at the documentation.
Here are the steps I was able to come up looking at the documentation and tried it out on the device.

  1. Build and Install replay-debug.apk using adb install -g command.
  2. adb shell "setprop debug.vulkan.layers.1 'VK_LAYER_LUNARG_gfxreconstruct'"
  3. adb shell "setprop debug.gfxrecon.capture_frames '1-10'"
  4. adb shell "setprop debug.gfxrecon.capture_file '/sdcard/Android/data//files/CurTrace.gfxr'"
  5. Launch and run the vulkan app.

However, at the end of these steps, I don't see GFXR capture at /sdcard/Android/data//files/.
Am I supposed to push the libVkLayer_gfxreconstruct.so to any specific location on the device? or anything else I am missing.

PS: I don't have root access to the device.

@ramcn
Copy link
Author

ramcn commented Mar 19, 2022

Additionally when reviewing the vulkan validation layer guidelines, I got to know that vulkan looks for the GFXR capture layer file libVkLayer_gfxreconstruct.so under /data/local/..... .

I am unable to push the libVkLayer_gfxreconstruct.so into /data/local/... without root access to the device. Because of this I see an error message "Couldn't create Vulkan instance: VK_ERROR_LAYER_NOT_PRESENT" from adb logcat.

Is there a way I can override this default vulkan path to some path under /sdcard/ and copy the libVkLayer_gfxreconstruct.so this alternate path.

@bradgrantham-lunarg bradgrantham-lunarg added the enhancement New feature or request label Sep 13, 2022
@bradgrantham-lunarg
Copy link
Contributor

We don't have control over the Vulkan loader so we can't change where it looks for layers or how it operates. I'm aware of these ways to capture on Android:

  1. With a non-rooted device, package libVkLayer_gfxreconstruct.so with the app itself. Usually only possible if you're building the app from source.
  2. If the app is "debuggable" in the manifest:
adb shell settings put global enable_gpu_debug_layers 1
adb shell settings put global gpu_debug_app $APPNAME
adb shell settings put global gpu_debug_layer_app com.lunarg.gfxreconstruct.replay
  1. With a rooted device, copy libVkLayer_gfxreconstruct.so to the app's lib/arm64/ directory, making sure to chmod +x. Then set adb shell "setprop debug.vulkan.layers 'VK_LAYER_LUNARG_gfxreconstruct'" etc and run the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3
Projects
None yet
Development

No branches or pull requests

2 participants