[Mesa-dev] [Mesa-stable] [PATCH] egl/wayland: Don't use DRM format codes for SHM

Daniel Stone daniel at fooishbar.org
Mon Feb 13 17:54:04 UTC 2017


Hi,

On 13 February 2017 at 17:49, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 13 February 2017 at 17:34, Daniel Stone <daniel at fooishbar.org> wrote:
>> On 13 February 2017 at 17:27, Emil Velikov <emil.l.velikov at gmail.com> 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.

Cheers,
Daniel


More information about the mesa-dev mailing list