Open jyangsh opened 8 years ago
We do have a couple of people working on this and related cross platform trace issues, and that includes working on alignment and 32/64 bit details.
Thanks! I think the vulkan api is really not capture friendly. So many structures are used that is causing many alignment issues cross the compiler and the cpu arch.
Hello, Sorry for this cross platform issue you are experiencing. We are working on a solution to make vktrace and vkreplay seamless across platforms.
I have a few questions to analyze the issue deeper: 1- You mentioned, you do not have the issue on windows platform: are you collecting the ARM 32bit trace on a windows platform, or on Linux? 2- Are you using vkreplay on Windows 32-bit version, which works fine? 3- Is it convenient for you to share the trace file with us for analyze? If yes, please create a LunarXchange account at https://vulkan.lunarg.com/signin and file the issue there, and you can upload trace files.
We support 32 bit on Windows and Linux 32 bit support is work in progress. Replaying 32bit trace file on 32bit vkreplay is working fine on x86 but we need to analyze more about Arm traces due to alignment issue you mentioned. On more thing worth to mention: Support for capturing trace file on windows and replay on Linux and vice versa also work in progress.
Hi Arda,
Issue LunarG/vktrace#12 has been created with the trace files on LunarXchange.
The trace file is captured on arm 32bit linux platform.
I haven't used the vkreplay on windows 32bit, I just used the vktraceviewer32 to open the trace file on windows 64bit. The vktraceviewer32 works fine on windows 64bit.
The trace is generated with my modified trace layer, so you may need do some changes in your traceviewer for opening it.
Thanks jyang.sh
Lowering priority because it is cross-platform.
There are two issues. One issue I have reported early, the issue LunarG/VulkanTools#33.
But on Ubuntu 14.04 64bit, I met another issue.
The trace I used was captured on ARM 32bit system. But it cannot be read by traceviewer 32bit on the Ubuntu 64bit.
I found that it may be caused by the alignment of the uint64_t type. Please refer the page below. https://software.intel.com/en-us/blogs/2011/08/18/understanding-x86-vs-arm-memory-alignment-on-android
After adding the "attribute ((aligned(8)))" to the uint64_t members in struct vktrace_trace_file_header and vktrace_trace_packet_header, the trace can be loaded.
But for some vulkan APIs that use a parameter with uint64_t, e.g. the VK_DEFINE_NON_DISPATCHABLE_HANDLE(https://github.com/LunarG/VulkanTools/blob/master/include/vulkan/vulkan.h#L59), the same issue occurs.
The interesting thing is that the issue seems not happen on windows platform. Seems it is gcc only.