From 5899076b6b24a7275fb6b4ad6a42686225ef0156 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Thu, 17 Mar 2016 16:50:46 -0600 Subject: [PATCH] swr: [rasterizer core] Reset DrawContext arena at end of draw rather than upon reclaim of DC Keeps overall memory consumption lower. Also, remove unused knobs. --- .../drivers/swr/rasterizer/core/threads.cpp | 4 ++++ .../swr/rasterizer/scripts/knob_defs.py | 21 ------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp index c4567eaee87..57408049d03 100644 --- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp @@ -290,6 +290,10 @@ INLINE void CompleteDrawContext(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) { _ReadWriteBarrier(); + // Cleanup memory allocations + pDC->pArena->Reset(); + pDC->pTileMgr->initialize(); + pContext->dcRing.Dequeue(); // Remove from tail } } diff --git a/src/gallium/drivers/swr/rasterizer/scripts/knob_defs.py b/src/gallium/drivers/swr/rasterizer/scripts/knob_defs.py index 5843abf2aeb..0f3ded68544 100644 --- a/src/gallium/drivers/swr/rasterizer/scripts/knob_defs.py +++ b/src/gallium/drivers/swr/rasterizer/scripts/knob_defs.py @@ -144,27 +144,6 @@ KNOBS = [ 'category' : 'perf', }], - ['MAX_FRAC_ODD_TESS_FACTOR', { - 'type' : 'float', - 'default' : '63.0f', - 'desc' : ['(DEBUG) Maximum tessellation factor for fractional-odd partitioning.'], - 'category' : 'perf', - }], - - ['MAX_FRAC_EVEN_TESS_FACTOR', { - 'type' : 'float', - 'default' : '64.0f', - 'desc' : ['(DEBUG) Maximum tessellation factor for fractional-even partitioning.'], - 'category' : 'perf', - }], - - ['MAX_INTEGER_TESS_FACTOR', { - 'type' : 'uint32_t', - 'default' : '64', - 'desc' : ['(DEBUG) Maximum tessellation factor for integer partitioning.'], - 'category' : 'perf', - }], - ['BUCKETS_ENABLE_THREADVIZ', { 'type' : 'bool', -- 2.30.2