[Bf-committers] Question on freeing of GPU images

Antony Riakiotakis kalast at gmail.com
Sun Dec 23 23:34:39 CET 2012


Hi, I was looking on a bug report about images not getting refreshed
on the 3D viewport when baking.

There I actually discovered two issues:

1) No GPU_free_image() is called after doing a bake, so the image
doesn't get invalidated and
2) Even if we do add the above call, nothing happens. This is because
when call the above function, we actually add a *copy* of the original
image in a queue so it can be freed later. This won't work because the
original image still has its bindcode intact and as a result it won't
get refreshed/regenerated when gpu_verify_image is called (it checks
the bindcode among others to verify if the gpu image is still valid).
I would try to fix this but I am not too sure of the specifics of
threaded image management. I would possibly zero out the bindcode
(which would give me a new texture as it should) after calling
GPU_free_image. But I suspect it is not supposed to work that way...

Any suggestions?


More information about the Bf-committers mailing list