summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-03-27 19:24:33 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-04-02 14:19:41 -0700
commit33f0f68d590a460f84a0df0de10f29c4a582d7e7 (patch)
treec9a0c4a69f1cc18bae2815d3c6f77e2f1f692b3e /src/glsl
parentca3b4d6d17a0f95b287e87888c9d893be94f0301 (diff)
downloadexternal_mesa3d-33f0f68d590a460f84a0df0de10f29c4a582d7e7.zip
external_mesa3d-33f0f68d590a460f84a0df0de10f29c4a582d7e7.tar.gz
external_mesa3d-33f0f68d590a460f84a0df0de10f29c4a582d7e7.tar.bz2
ralloc: Implement a new ralloc_adopt() API.
ralloc_adopt() reparents all children from one context to another. Conceptually, ralloc_adopt(new_ctx, old_ctx) behaves like this pseudocode: foreach child of old_ctx: ralloc_steal(new_ctx, child) However, ralloc provides no way to iterate over a memory context's children, and ralloc_adopt does this task more efficiently anyway. One potential use of this is to implement a memory-sweeper pass: first, steal all of a context's memory to a temporary context. Then, walk over anything that should be kept, and ralloc_steal it back to the original context. Finally, free the temporary context. This works when the context is something that can't be freed (i.e. an important structure). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/glsl')
0 files changed, 0 insertions, 0 deletions