Commit d4b1fb3e authored by Lyude Paul's avatar Lyude Paul

panwrap: Fix mmap tracking for non-same VA allocations

parent 103bfc36
......@@ -73,7 +73,7 @@ __panwrap_fetch_gpu_mem(const struct panwrap_mapped_memory *mem,
!(mem->prot & MALI_MEM_PROT_CPU_RD))
__panwrap_fetch_mem_err(mem, gpu_va, size, line, filename);
return (void*)gpu_va + (ptrdiff_t)((void*)mem->gpu_va - mem->addr);
return (void*)gpu_va - (void*)mem->gpu_va + mem->addr;
}
#define panwrap_fetch_gpu_mem(mem, gpu_va, size) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment