[Mesa-dev] [PATCH 7/9] wayland-drm: static inline wayland_drm_buffer_get

Daniel Stone daniel at fooishbar.org
Fri Sep 15 13:04:19 UTC 2017


Hi,

On 15 September 2017 at 12:20, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 7 September 2017 at 19:05, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> The function is effectively a direct function call into
>> libwayland-server.so
>>
>
> "By inlining it we no longer need the wayland-drm static library in GBM.
> Making the libgbm.so binary smaller, and the build process a bit more
> straightforward."
>
> I'll add ^^ to the commit message.

I'd be slightly wary of this current series. Currently, both
libwayland-server.so and libwayland-client.so define
wl_buffer_interface separately:
strictly:~/misc/visa% objdump -x
~/prefix/wayland/lib/libwayland-server.so.0.1.0 | grep wl_buffer_int
0000000000212e40 g     O .data.rel.ro 0000000000000028
wl_buffer_interface
strictly:~/misc/visa% objdump -x
~/prefix/wayland/lib/libwayland-client.so.0.3.0| grep wl_buffer_int
000000000020dea0 g     O .data.rel.ro 0000000000000028
wl_buffer_interface

I'll grant you that it's basically pot luck as to which one is
resolved first, but if we remove the wayland-server linkage, it seems
more prone to pick the wayland-client interface, i.e. the wrong one.

Changing the wl_resource_instance_of() call into
wl_resource_get_destroy_listener() would be far more foolproof, but it
doesn't remove the need for linkage.

That being said, all other patches in the series are:
Reviewed-by: Daniel Stone <daniels at collabora.com>

Cheers,
Daniel


More information about the mesa-dev mailing list