4 ms·
For the 'CPU to GPU Copy Bandwidth' section the more likely reason GPU -> CPU copy is slow is there's no reason to do it. Adreno is unified memory, you can just
by kllrnohj 3y ago
For the 'CPU to GPU Copy Bandwidth' section the more likely reason GPU -> CPU copy is slow is there's no reason to do it. Adreno is unified memory, you can just mmap that GPU buffer on the CPU. This is done on Android via the "gralloc" HAL, also called (A)HardwareBuffer.
CPU->GPU is still valuable in that it's where texture swizzling happens to optimize the data for non-linear access, and vendors are all cagey about documenting these formats. But I don't think there's a copy engine for it at all, i think it's just CPU code. If you run a perfetto trace you can see adreno actually using multiple threads for this, likely why CPU->GPU is then so much faster than the reverse. But you almost never need non-linear output, so since vendor-specific swizzling isn't helpful you just don't bother and use shared memory between the two.