diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2020-04-10 14:40:37 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-16 08:36:04 +0000 |
commit | 15cf7d170b3391ebde58f954cd2b90fff35b1ce5 (patch) | |
tree | d3911100ab3db26e17cb64c341cfbc3422d32c63 /src/gallium/targets/dri/target.c | |
parent | 35b396392880871b8cc06172dafff238e67c44cc (diff) |
gallium/u_threaded: flush batch when hitting mapping limit
tc_transfer_map maps buffers directly, but the unmap operation is executed
in the driver thread.
When an application does a lot of map/unmap operations, without flushing,
this increase the RAM used (and eventually get the app killed by the oom-killer).
This commit allows tc to keep track of how many bytes were mapped during
the current batch. When this estimation becomes higher than a threshold,
we flush the batch.
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2735
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4508>
Diffstat (limited to 'src/gallium/targets/dri/target.c')
0 files changed, 0 insertions, 0 deletions