OSDN Git Service

virgl: avoid large inline transfers
authorGurchetan Singh <gurchetansingh@chromium.org>
Mon, 26 Nov 2018 17:54:04 +0000 (09:54 -0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 5 Dec 2018 15:43:32 +0000 (15:43 +0000)
commita69ef11424dad4d5346c892f74e269352736bbd8
tree063a506c6dc06c88af6c597b11dc5b616e783239
parent4b715e3e597122e53807944682dd97595dcf461c
virgl: avoid large inline transfers

We flush everytime the command buffer (16 kB) is full, which is
quite costly.

This improves

dEQP-GLES3.performance.buffer.data_upload.function_call.buffer_data.new_buffer.usage_stream_draw

from 111.16 MB/s to 1930.36 MB/s.

In addition, I made the benchmark produce buffers from 0 --> VIRGL_MAX_CMDBUF_DWORDS * 4,
and tried ((VIRGL_MAX_CMDBUF_DWORDS * 4) / 2), ((VIRGL_MAX_CMDBUF_DWORDS * 4) / 4), etc.

I didn't notice any clear differences, so let's just go with the most obvious
heuristic.

Tested-By: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
(cherry picked from commit d18492c64f0abb4eb638d2b213b4b1ff3d775965)
src/gallium/drivers/virgl/virgl_resource.c