[Mesa-dev] [PATCH 0/3] swr: Optimize large draws from client arrays.

Bruce Cherniak bruce.cherniak at intel.com
Wed Jul 12 01:20:35 UTC 2017


If size of client memory copy is too large, don't copy. The draw will
access user-buffer directly and then block.  This is faster and more
efficient than queuing many large client draws.

Applications that use large draws from client arrays benefit from this.
VMD is an example.

The threshold for this path defaults to 32KB.  This value can be
overridden by setting environment variable SWR_CLIENT_COPY_LIMIT.

Bruce Cherniak (3):
  swr: Remove hard-coded constant and "todo" comment.
  swr: Move environment config options into separate function.
  swr: Add path to draw directly from client memory without copy.

 src/gallium/drivers/swr/swr_context.h   |  1 +
 src/gallium/drivers/swr/swr_draw.cpp    |  9 +++++
 src/gallium/drivers/swr/swr_scratch.cpp |  3 +-
 src/gallium/drivers/swr/swr_screen.cpp  | 70 +++++++++++++++++++++------------
 src/gallium/drivers/swr/swr_screen.h    |  2 +
 src/gallium/drivers/swr/swr_state.cpp   | 37 +++++++++++------
 6 files changed, 84 insertions(+), 38 deletions(-)

-- 
2.11.0



More information about the mesa-dev mailing list