Skip to content

vrend: optimize contiguous iovec reads

John Bates requested to merge jbates/virglrenderer:iov-iterator-opt2 into main

The previous iovec code in vrend_renderer.c would copy image rows out in a loop where each iteration would seek from the start of the iovec. These iovecs often have 100s of elements, so the seek is inefficient compared to a coherent approach.

This change adds an iovec iterator struct and multi block read functions that provide a ~1% speedup to a CS:GO apitrace replay. Possibly more in other cases.

Signed-off-by: John Bates jbates@chromium.org

Edited by Gert Wollny

Merge request reports