Mesa (staging/18.1): vc4: Fix a leak of the no-vertex-elements workaround BO.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 8 16:22:17 UTC 2018


Module: Mesa
Branch: staging/18.1
Commit: 3daf7ff658a057c73ba9a06897a2540272e9b790
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3daf7ff658a057c73ba9a06897a2540272e9b790

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Aug  6 18:53:57 2018 -0700

vc4: Fix a leak of the no-vertex-elements workaround BO.

Fixes: bd1925562ad1 ("vc4: Convert the driver to emitting the shader record using pack macros.")
(cherry picked from commit 9507e036994018d3038e6263b98c53b0c916d2cd)

---

 src/gallium/drivers/vc4/vc4_draw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c
index 900c0abaf2..06785516ca 100644
--- a/src/gallium/drivers/vc4/vc4_draw.c
+++ b/src/gallium/drivers/vc4/vc4_draw.c
@@ -222,6 +222,8 @@ vc4_emit_gl_shader_state(struct vc4_context *vc4,
                         attr.coordinate_shader_vpm_offset = 0;
                         attr.vertex_shader_vpm_offset = 0;
                 }
+
+                vc4_bo_unreference(&bo);
         }
 
         cl_emit(&job->bcl, GL_SHADER_STATE, shader_state) {




More information about the mesa-commit mailing list