mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02:00
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>
This commit is contained in:
parent
f0e71b1088
commit
67426ccd42
1 changed files with 1 additions and 1 deletions
|
|
@ -147,7 +147,7 @@ static void virgl_buffer_subdata(struct pipe_context *pipe,
|
|||
|
||||
u_box_1d(offset, size, &box);
|
||||
|
||||
if (size >= (VIRGL_MAX_CMDBUF_DWORDS * 4))
|
||||
if (resource->width0 >= getpagesize())
|
||||
u_default_buffer_subdata(pipe, resource, usage, offset, size, data);
|
||||
else
|
||||
virgl_transfer_inline_write(pipe, resource, 0, usage, &box, data, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue