Read() fails when trying to read into memory handled by the coherent memory tracker.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 329
- PR merge metrics
- No merged PRs in 30d
Description
When trying to trace a replay from an APK created by export_replay, a `read()` into mapped memory leads to an error. This is apparently due to the GAPII coherent memory tracker.
The APK runs GAPIR which reads resource from the APK assets into various zones of memory. The first `read()` of a resource into a memory mapped by `vkMapMemory()` fails with EFAULT (i.e., destination pointer is in invalid memory range).
@AWoloszyn says the issue comes from GAPII coherent memory tracker, which I am not familiar with. If the destination buffer is first cleared with zeros before the `read()`, then the error disappears -- but this is costly.
Reproduction:
1. Trace a Vulkan application
2. use `gapit export_replay -apk ...` to create a stand-alone replay APK form the capture
3. install this APK, and try to trace it
Contributor guide
Assessment
This issue has not been assessed yet.