virgl: don't mark buffers as unclean after a write
authorGurchetan Singh <gurchetansingh@chromium.org>
Mon, 26 Nov 2018 17:54:05 +0000 (09:54 -0800)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 30 Nov 2018 11:21:01 +0000 (12:21 +0100)
commit89b4798c0619a2ba99046d5ad36f0e6851625f7a
tree95379ffd5ca5280daead539db00bc8a7ada72685
parentd18492c64f0abb4eb638d2b213b4b1ff3d775965
virgl: don't mark buffers as unclean after a write

We can mark the buffer unclean if it's ever bound as a TBO,
SSBO, ABO, or image.

This improves

dEQP-GLES3.performance.buffer.data_upload.function_call.map_buffer_range.new_specified_buffer.flag_write_full.stream_draw

from 9.58 MB/s to 451.17 MB/s.

v2: Track buffer cleanliness as a function of bindings (Ilia).
v3: virgl_modify_clean --> virgl_dirty_res (Erik)

Tested-By: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
src/gallium/drivers/virgl/virgl_buffer.c
src/gallium/drivers/virgl/virgl_encode.c