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. v2: Use #define for default value, rather than hard-coded constant. 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 | 73 +++++++++++++++++++++------------ src/gallium/drivers/swr/swr_screen.h | 2 + src/gallium/drivers/swr/swr_state.cpp | 37 ++++++++++++----- 6 files changed, 87 insertions(+), 38 deletions(-) -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev