On 2018-04-30 08:58 AM, Sergii Romantsov wrote: > Hello, > with my simple tests it works,
Thanks for testing. > but have some remarks (but don't have much experience with dri3): > > 1. It looks little dangerous to move logic of destroying buffers and seems > in your version we are loosing some logic with 'busy' and 'num_back' The purpose of the busy field is to prevent re-using a buffer in dri3_find_back while it's still being presented. It's not directly relevant for destroying buffers. The new code in loader_dri3_get_buffers does take num_back into account, so I'm not sure what issue you're seeing related to that? > 2. And also looks like buffers just will not be destroyed on time for some > cases. While that's possible in theory, it's only if the application stops rendering any more frames, which is unlikely in practice. And even if it happens, it can only result in retaining three back buffers instead of two. > 3. From my opinion it will be safer to use in function 'dri3_get_buffer' > call (with my patch): > 'dri3_fence_await(draw->conn, NULL, buffer)' instead of > 'dri3_fence_await(draw->conn, draw, buffer)' Assuming that can be done without re-introducing the issues addressed by commit a727c804a2c17db306c68e259ae845aa6382d3b1 "loader/dri3: Process event after each fence wait" (you'd have to discuss that with Thomas), I think my patch would be the better basis for it anyway. I'm sorry that I only realized so late what really should be done here. Thank you for pointing at the issue. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
