[Mesa-dev] R600/OpenCL - kernel_param resource

Tom Stellard tom at stellard.net
Fri Apr 11 08:35:02 PDT 2014


On Thu, Apr 10, 2014 at 03:24:32PM +0000, Dorrington, Albert wrote:
> I am having an issue with a memory leak in an OpenCL program I am testing.
> In the program I call the same kernel repeatedly, for every pixel in an image. (Probably not the most efficient code, but it is a learning/testing thing.)
> 
> One thing in particular I have not yet been able to figure out, is what releases the reference counts for the shader->kernel_param resource created in evergreen_compute_upload_input().
> 
> Tracing through the calls:
>                 evergreen_compute_upload_input()
>                 evergreen_cs_set_constant_buffer()
>                 r600_set_constant_buffer()
> 
> I can see that if r600_set_constant_buffer() is passed a null pipe_constant_buffer input, that it would reset the stat masks and make the call to pipe_resource_reference() with a NULL, to decrement the count.
> 
> But I don't see where that would happen.
> 
> I am thinking that perhaps there should be something to release the reference count for that buffer, either after the evergreen_launch_grid() call, or perhaps as the last thing within that call, after the compute_emit_cs() call.
> 
> Or, is this call happening somewhere else that I haven't found?
>

kernel_param is probably the source of the leak, it doesn't look like
we are destroying it anywhere.

-Tom
 
> Thanks,
> Al Dorrington
> Software Engineer Sr
> Lockheed Martin, Mission Systems and Training
> 

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list