zink: force batch flush if batches are using more than 1/10 total system memory
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 28 Sep 2020 14:51:57 +0000 (10:51 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Mar 2021 19:36:26 +0000 (19:36 +0000)
commit21082b452924fbacdce6e7b0218c658136ae93e7
tree31ee24710de5afcc92676807342508af82ee1da4
parent330b5b351b79ad9d1f9cee1d5d71353c7a308675
zink: force batch flush if batches are using more than 1/10 total system memory

this is only tracking memory used by resources referenced in the batch, but it
can be adjusted a bit if we see that we're flushing too often

fixes spec@!opengl 1.1@streaming-texture-leak hogging all system memory and ooming

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274>
src/gallium/drivers/zink/zink_draw.c