egl: consistently use dri2_egl_display() helper macro

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6133>
This commit is contained in:
Eric Engestrom 2019-09-10 14:18:47 +01:00 committed by Eric Engestrom
parent 27eea627ef
commit c1476044b5
3 changed files with 5 additions and 5 deletions

View file

@ -1388,7 +1388,7 @@ static const __DRIextension *droid_image_loader_extensions[] = {
static EGLBoolean
droid_load_driver(_EGLDisplay *disp, bool swrast)
{
struct dri2_egl_display *dri2_dpy = disp->DriverData;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const char *err;
dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd);

View file

@ -252,7 +252,7 @@ device_get_fd(_EGLDisplay *disp, _EGLDevice *dev)
static bool
device_probe_device(_EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = disp->DriverData;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
bool request_software = env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
if (request_software)
@ -298,7 +298,7 @@ err_name:
static bool
device_probe_device_sw(_EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = disp->DriverData;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
dri2_dpy->fd = -1;
dri2_dpy->driver_name = strdup("swrast");

View file

@ -226,7 +226,7 @@ surfaceless_probe_device(_EGLDisplay *disp, bool swrast)
{
#define MAX_DRM_DEVICES 64
const unsigned node_type = swrast ? DRM_NODE_PRIMARY : DRM_NODE_RENDER;
struct dri2_egl_display *dri2_dpy = disp->DriverData;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
drmDevicePtr device, devices[MAX_DRM_DEVICES] = { NULL };
int i, num_devices;
@ -292,7 +292,7 @@ surfaceless_probe_device(_EGLDisplay *disp, bool swrast)
static bool
surfaceless_probe_device_sw(_EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy = disp->DriverData;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
dri2_dpy->fd = -1;
disp->Device = _eglAddDevice(dri2_dpy->fd, true);