On 13.02.2012 15:57, Maarten Lankhorst wrote:
Hey Christian,

Op 13-02-12 13:09, Christian König schreef:
No, it's not really needed, but I had it this way in the first place and you need a lot of "if (something_is_not_null) cleanup(something)" in the destructor functions, and with this implementation we only need to test if it's allocated once, and that looked allot cleaner.
It will also allow you to do away with the error cleanup in vl_median_filter_init,
by just doing vl_median_filter_cleanup.

Do you really need to re-create the entire filter though? Wouldn't just uploading new quads be enough?
The strength of a median filter is defined by the window size, the larger the window is the more pixels you need to fetch, sort etc... So when the strength changes you need to recreate your shaders, cause you need more temporaries / fetch instructions... but the rest of the state doesn't need to change, so a set window size function would look allot more simpler....

Yeah, that sounds like a good idea, but I'm going to push the fix for the memory leak first, and going to simplify that on the next time I'm touching it.

Christian.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to