Open xidian10000 opened 7 months ago
Replaying ray query/ray tracing traces need add special parameters. The following steps will guide you:
./vkreplay -h
vkreplay info: vkreplay available options about ray query/ray tracing:
vkreplay info: -drcr, --disableRQAndRTPCaptureReplay <uint> Disable capture replay features. Bitfield where accelerationStructure=1, bufferDeviceAddress=2, rayTracingPipelineShaderGroupHandle=4.
vkreplay info: -spc, --specialPatternConfig <uint> Special Pattern Config: 0:None, 1:PatternA, other reserve.
Replaying with ray tracing capture replay feature:
./vkreplay ... -drcr 0 ... (default the value of drcr is 0, except drcr is written to vktrace header
Replaying without ray tracing capture replay feature:
./vkreplay ... -drcr 7 ... (the drcr option can be used with combined values)
If the buffer device addresses in the memory of buffer need be remapped:
./vkreplay ... -drcr 7 -spc 1 ... (the drcr option can be used with combined values)
The above environment variables are valid on Android
The trace layer, api dump layer .., all enabled layers are set globally by default.
From Android 14, the system UI calls will be captured with the app too. So there is need select hwui.renderer to use skiagl or enable layers on a per-app basis to capture or dump traces.
Android HWUI debug options "debug.hwui.renderer ": Allows to set rendering pipeline mode to OpenGL (default), Skia OpenGL or Vulkan. Accepted values are "opengl", "skiagl", and vulkan".
Before capturing vktrace, set the following variable to disable the Vulkan usage for the HWUI :
adb shell setprop debug.hwui.renderer 'skiagl'
After capturing vktrace, set the following variable to restore the Vulkan usage for the HWUI:
adb shell setprop debug.hwui.renderer 'skiavk'
adb install --bypass-low-target-sdk-block vkreplay.apk
On devices upgrading to Android 14, any apps with a targetSdkVersion lower than 23 will remain installed. details at : https://developer.android.com/about/versions/14/behavior-changes-all
Tracing
Tracing apps is similar to tracing normal ones. You can follow most of the tracing steps you've already known. What's new is setting some environment variables. The following steps will guide you:
Tracing for all apps:
For tracing most apps, we need to set these environment variables:
the optional variables:
Fastforwarding for all traces:
For fastforwarding most traces, we need to set these environment variables:
the optional variables:
The above environment variables are valid on Android:
adb shell setprop NAME 'value' , such as: