Hi Dan, On 22 July 2017 at 09:00, Daniel Stone <dan...@fooishbar.org> wrote: > Hi Emil, > > On 21 July 2017 at 15:23, Emil Velikov <emil.l.veli...@gmail.com> wrote: >> I think the key issue is that the resource_get_handle() calls lack >> proper error handling. >> >> There's a single case, that was fixed not too long ago, yet everywhere >> else we consider that resource_get_handle() can fail. >> Can we address that instead? Only dri2_query_image seems to be buggy. > > We can address that as well, but not instead. Drivers which aren't > aware of modifiers will return success (as they know how to export > KMS-type handles), but not initialise the modifier field (because they > aren't aware of it). So we can check for failure, but the case I was > seeing here is that resource_get_handle() was succeeding - else we > wouldn't have had a buffer to query modifiers on in the first place - > but failing to either give the correct modifier or INVALID. > You're right - my suggestion seems orthogonal to the issue at hand.
At the same time if the driver does not support modifiers, we should return false for the query, shouldn't we? The egl/wayland will need an update code to correctly handle the queryImage failure (sorry for missing that earlier), falling back to wl_drm. GBM already has similar checks/fallback paths. AFAICT that will make the check in 1/3 unreachable, yet still nice to have. -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev