anholt / libepoxy

Epoxy is a library for handling OpenGL function pointer management for you
Other
680 stars 161 forks source link

Add support for LD_PRELOAD/aliasing. #208

Closed dwrobel closed 3 years ago

dwrobel commented 5 years ago

On platforms where the LD_PRELOAD is used to overwrite functions it is needed to look first at the existing (preloaded/aliased) symbol instead of the real one from the shared library.

For example on Broadcom Nexus platform the following libraries are preloaded:

- libwayland-egl.so.1
- libGLESv2.so

where the libwayland-egl.so.1 overwrites eglGetDisplay() from the libGLESv2.so.

In that situation it is inapropriate for libepoxy to select the eglGetDisplay() from the libGLESv2.so shared library.

Signed-off-by: Damian Wrobel dwrobel@ertelnet.rybnik.pl

ebassi commented 5 years ago

This change is breaking the build on CI, so I guess it needs further work.

dwrobel commented 5 years ago

This change is breaking the build on CI, so I guess it needs further work.

I saw it it's the glx_alias_prefer_same_name test which fails - but it wasn't clear to me what is the purpose of this test. Can it be either a false positive or a broken test?

anholt commented 5 years ago

libGLESv2 is exposing egl functions? That sounds like nexus is really wrong.

Balajims88 commented 4 years ago

@dwrobel @anholt @ebassi any update is there?

ebassi commented 3 years ago

No updates, and no answer to @anholt's question of November 2019.