[Mesa-dev] R600/OpenCL - kernel_param resource

Dorrington, Albert albert.dorrington at lmco.com
Thu Apr 10 08:24:32 PDT 2014


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?

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140410/925ed4e9/attachment.html>


More information about the mesa-dev mailing list