I am trying to capture GFXR for a vulkan app running on MALI GPU (Oppo Reno 3 with G77) using LunarG gfxrcapture tool.
I have followed the steps described here minimal steps for gfxr capture · Issue #669 · LunarG/gfxreconstruct · GitHub
But haven't been able to capture the GFXR so far.
Looking for any inputs from the forum if I am missing anything in the steps to be followed.
The documentation says that VK_LAYER_LUNARG_gfxreconstruct will try to save the capture to a file and needs write access to the external storage. Do you specify read/write permissions for external storage in the Android manifest (as well as requesting them in the code)?
Yes. I have provided the storage access from the app info, permissions setting after installing the app.
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.
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.
You shouldn't need root permission to push layers to /data/local/tmp, but you can't load them from there as the app doesn't have permission to see them. Installing layers:
adb push libVkLayer_gfxreconstruct.so /data/local/tmp
adb shell run-as <your.app.package> cp /data/local/tmp/libVkLayer_gfxreconstruct.so .
adb shell settings put global enable_gpu_debug_layers 1
adb shell settings put global gpu_debug_app <your.app.package>
adb shell settings put global gpu_debug_layers VK_LAYER_LUNARG_gfxreconstruct
adb shell settings put global gpu_debug_layer_app <your.app.package>
I couldn't get it run-as method to work. Faced some problems in pushing the so file to the correct location.
Instead used an alternate approach to package the GFXR capture library into my application apk. So as part of application it will not need any special access and able to capture the GFXR.