virgl: use virgl_transfer_inline_write even less
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 7 Feb 2019 00:26:18 +0000 (16:26 -0800)
committerGert Wollny <gert.wollny@collabora.com>
Fri, 15 Feb 2019 10:19:05 +0000 (11:19 +0100)
commit67426ccd428706b558ae1d8697831ce337f97412
tree93cb719759ca459a7dbc17cbf153ef9a924c5610
parentf0e71b1088848e4190d6f8a5415571d0ddf130aa
virgl: use virgl_transfer_inline_write even less

We've noticed the Team Fortress 2 engine seems to do many small
calls to glSubData(..). Let's pick our heuristic based on the
resource base width, not the size of a particular upload.
This will cause transfers to be batched together in the transfer
queue.

Revelant glbench microbenchmark --

Before: buffer_upload_dynamic_element_array_131072 = 131.17 mbytes_sec
After: buffer_upload_dynamic_element_array_131072 = 6828.24 mbytes_sec
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
src/gallium/drivers/virgl/virgl_resource.c