Export Options#
PVRCarbon has several options for exporting data from recordings. The various options can be accessed from the “Export” option in the File context menu. The available options are:
Export the entire recording as a debuggable C++ project;
Save the API calls to a text file;
Save the recorded framebuffers as image files;
Extract the shader source code as shader files.
Create a C++ Project from a PVRCarbon Recording#
The “Calls to debuggable C++” option generates a C++ project from a PVRCarbon recording. This project can be compiled and ran like any normal application. The source code is completely modifiable, allowing tweaks and optimisations to be added into the application recording. This is an excellent tool for debugging and optimisation when the original application source code is unavailable.
Additionally, the exported project is completely independent of PVRCarbon, allowing projects to be transferred across many platforms. The exported code also contains some simple error checking which can be disabled during CMake generation.
Selecting the “Calls to debuggable C++” option will bring up the Export Options window.
This window allows the user to select the application name, package name, and export range. The application and package name are set by PVRCarbon automatically but they can be modified here if desired. The export range determines what portion of the recording will be exported as a C++ project. The three options for the export range are a range of frames, a range of call UIDs, or just the current frame.
Finally, for Vulkan applications there are a couple of additional options. It is possible to toggle the use of the Vulkan Memory Allocator and a cross-platform surface creator. The Vulkan Memory Allocator simplifies memory management in the exported project while the cross-platform surface creator allows the project to be executed on various platforms.
Save API calls as a Text File#
The “Calls to TXT…” option can be used to export a list of API calls to a simple text file.
Selecting this options will bring up the Export Options window.
Similarly to the C++ project option, this window controls what portion of the recording will be exported. Additionally, it controls what information from the API calls will be exported to the text file. This includes toggling whether call UIDs, frame numbers, and thread ID appear with each call. There is also another option to toggle whether the calls have paragraph breaks between them or whether they are all on a single line.
A sample of a generated text file is shown below.
#23 Frame 0 Thread 3080 eglGetConfigAttrib (
dpy = 0x1,
config = 0x3,
attribute = EGL_GREEN_SIZE,
value -> 8
) ==> EGL_TRUE
#24 Frame 0 Thread 3080 eglGetConfigAttrib (
dpy = 0x1,
config = 0x3,
attribute = EGL_BLUE_SIZE,
value -> 8
) ==> EGL_TRUE
This particular example shows the thread id, frame number, UID, function name, function parameters, and result.
Export Recorded Framebuffers as Image Files#
The “Recorded Framebuffers…” option can be used to save recorded framebuffers as image files.
Additional operations can also be applied to the framebuffer including flipping it horizontally or vertically and rotating it in 90°.
Extract Shader Source Code as Separate Files#
The “Shaders…” option extracts the source code of the various shaders of the recording and saves them to a file.