From: Axel Davy Date: Mon, 8 Mar 2021 17:48:23 +0000 (+0100) Subject: st/nine: Disable buffer_upload when csmt is off X-Git-Tag: upstream/21.2.3~4911 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26a42f105344836c04e7fbe85c2ffb90b59b6fac;p=platform%2Fupstream%2Fmesa.git st/nine: Disable buffer_upload when csmt is off Signed-off-by: Axel Davy Acked-by: Timur Kristóf Part-of: --- diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index afa7654..b0a5dc8 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -358,7 +358,10 @@ NineDevice9_ctor( struct NineDevice9 *This, This->workarounds.dynamic_texture_workaround = pCTX->dynamic_texture_workaround; - This->buffer_upload = nine_upload_create(This->pipe_secondary, 4 * 1024 * 1024, 4); + /* Due to the pb_cache, in some cases the buffer_upload path can increase GTT usage/virtual memory. + * As the performance gain is negligible when csmt is off, disable it in this case. + * That way csmt_force=0 can be used as a workaround to reduce GTT usage/virtual memory. */ + This->buffer_upload = This->csmt_active ? nine_upload_create(This->pipe_secondary, 4 * 1024 * 1024, 4) : NULL; /* Initialize a dummy VBO to be used when a vertex declaration does not * specify all the inputs needed by vertex shader, on win default behavior