瀏覽代碼

nir: Free dead variables when removing them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
tags/10.6-branchpoint
Kenneth Graunke 10 年之前
父節點
當前提交
f61b6c3e48
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/glsl/nir/nir_remove_dead_variables.c

+ 3
- 1
src/glsl/nir/nir_remove_dead_variables.c 查看文件

@@ -102,8 +102,10 @@ remove_dead_vars(struct exec_list *var_list, struct set *live)
{
foreach_list_typed_safe(nir_variable, var, node, var_list) {
struct set_entry *entry = _mesa_set_search(live, var);
if (entry == NULL)
if (entry == NULL) {
exec_node_remove(&var->node);
ralloc_free(var);
}
}
}


Loading…
取消
儲存