[Mesa-dev] [PATCH] u_vbuf: fix index buffer leak
Chia-I Wu
olvaffe at gmail.com
Fri Jun 7 10:36:08 PDT 2013
On Fri, Jun 7, 2013 at 9:25 PM, Alex Deucher <alexdeucher at gmail.com> wrote:
> Candidate for the stable branches?
Ah, I already committed it. I will let it settle in master for a few
days and cherry-pick it to 9.1, unless this is against some policy
about stable branches.
> On Fri, Jun 7, 2013 at 5:58 AM, Marek Olšák <maraeo at gmail.com> wrote:
>> Reviewed-by: Marek Olšák <maraeo at gmail.com>
>>
>> Marek
>>
>> On Fri, Jun 7, 2013 at 6:25 AM, Chia-I Wu <olvaffe at gmail.com> wrote:
>>>
>>> Signed-off-by: Chia-I Wu <olvaffe at gmail.com>
>>> ---
>>> src/gallium/auxiliary/util/u_vbuf.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
>>> index 244b04d..5936f74 100644
>>> --- a/src/gallium/auxiliary/util/u_vbuf.c
>>> +++ b/src/gallium/auxiliary/util/u_vbuf.c
>>> @@ -307,6 +307,9 @@ void u_vbuf_destroy(struct u_vbuf *mgr)
>>> unsigned num_vb = screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
>>> PIPE_SHADER_CAP_MAX_INPUTS);
>>>
>>> + mgr->pipe->set_index_buffer(mgr->pipe, NULL);
>>> + pipe_resource_reference(&mgr->index_buffer.buffer, NULL);
>>> +
>>> mgr->pipe->set_vertex_buffers(mgr->pipe, 0, num_vb, NULL);
>>>
>>> for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
>>> --
>>> 1.7.10.4
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
--
olv at LunarG.com
More information about the mesa-dev
mailing list