r600/sfn: Delete final lowered nir shader early
authorGert Wollny <gert.wollny@collabora.com>
Sat, 24 Sep 2022 16:42:24 +0000 (18:42 +0200)
committerGert Wollny <gert.wollny@collabora.com>
Fri, 7 Oct 2022 09:33:57 +0000 (11:33 +0200)
Since this is no longer needed we can as well free the
memory right away instead of waiting until the parent
shader is freed.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18983>

src/gallium/drivers/r600/sfn/sfn_nir.cpp

index 9a14241..93b0b43 100644 (file)
@@ -913,5 +913,7 @@ int r600_shader_from_nir(struct r600_context *rctx,
    } else {
       r600::sfn_log << r600::SfnLog::shader_info << "This is not a Geometry shader\n";
    }
+   ralloc_free(sh);
+
    return 0;
 }