iris: Use coherent allocation for PIPE_RESOURCE_STAGING
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 22 Feb 2019 21:24:46 +0000 (21:24 +0000)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 13 Mar 2019 17:54:16 +0000 (10:54 -0700)
commit797fb6c6ac96cb7d1d5f9a04dc4f22f350093a16
treefc91b1b21e8dca937bf644f52f398498e9fdc21e
parent01b224047b0013380a5e8b709eaf2e3cd9976b39
iris: Use coherent allocation for PIPE_RESOURCE_STAGING

On !llc machines (Atoms), reading from a linear buffers is slow and so
copying from one resource into the linear staging buffer is still slow.
However, we can tell the GPU to snoop the CPU cache when reading from and
writing to the staging buffer eliminating the slow uncached reads.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_bufmgr.c
src/gallium/drivers/iris/iris_bufmgr.h
src/gallium/drivers/iris/iris_resource.c