On 13 February 2017 at 17:54, Daniel Stone <[email protected]> wrote: > Hi, > > On 13 February 2017 at 17:49, Emil Velikov <[email protected]> wrote: >> On 13 February 2017 at 17:34, Daniel Stone <[email protected]> wrote: >>> On 13 February 2017 at 17:27, Emil Velikov <[email protected]> wrote: >>>> Wouldn't it be better to have this in dri2_wl_create_window_surface() ? >>>> As-is we're passing the DRM formats on the wire, which is quite likely >>>> to cause issues elsewhere. >>> >>> There were a few other codepaths touching the format that seemed like >>> they might be affected. This is the only one which actually hits the >>> wire (AFAICT - which others are you thinking of ... ?), so that seemed >>> like it was the easiest. >>> >> From a quick look shm_handle_format() comes to mind. Keep in mind that >> I'm not that big of an expert on the Wayland code so I might have >> missed something ;-) > > Oh, that's fine. shm_handle_format (and drm_handle_format, for > non-swrast) gets called to handle events coming in from the server > side. So we will receive WL_SHM_FORMAT_* (not WL_DRM_FORMAT_*) from > the wire, and use that to set enum values which are constant between > SHM and DRM. So I don't see the problem with that. > Storing a DRM format only to convert it to SHM one does sound like a problem waiting to happen. But if you prefer so I won't object.
Thanks Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
