<div dir="ltr"><div>Pushed, thanks!</div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 19, 2019 at 2:22 PM Neha Bhende <<a href="mailto:bhenden@vmware.com">bhenden@vmware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Since we are using st_common_variant while creating variant for vertext<br>
program, we can release tokens created in st_create_vp_variant which<br>
are already stored in respective states.<br>
This fix memory leak found with piglit tests<br>
<br>
Fixes bc99b22a305b ('st/mesa: use a separate VS variant for the draw module')<br>
<br>
Reviewed-by: Charmaine Lee <<a href="mailto:charmainel@vmware.com" target="_blank">charmainel@vmware.com</a>><br>
---<br>
src/mesa/state_tracker/st_program.c | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c<br>
index a9ff68c1f50..ef10399fa18 100644<br>
--- a/src/mesa/state_tracker/st_program.c<br>
+++ b/src/mesa/state_tracker/st_program.c<br>
@@ -694,6 +694,10 @@ st_create_vp_variant(struct st_context *st,<br>
else<br>
vpv->base.driver_shader = pipe->create_vs_state(pipe, &state);<br>
<br>
+ if (state.tokens) {<br>
+ tgsi_free_tokens(state.tokens);<br>
+ }<br>
+<br>
return vpv;<br>
}<br>
<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
mesa-stable mailing list<br>
<a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-stable" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-stable</a><br>
</blockquote></div>