diff options
Diffstat (limited to 'src/gallium/state_trackers')
| -rw-r--r-- | src/gallium/state_trackers/egl/Makefile | 23 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d.c | 8 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/common/native.h | 3 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/common/native_probe.h | 4 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/fbdev/native_fbdev.c | 469 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/gdi/native_gdi.c | 5 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/kms/native_kms.c | 5 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/x11/native_dri2.c | 2 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/x11/native_x11.c | 9 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/x11/native_x11.h | 4 | ||||
| -rw-r--r-- | src/gallium/state_trackers/egl/x11/native_ximage.c | 2 |
11 files changed, 505 insertions, 29 deletions
diff --git a/src/gallium/state_trackers/egl/Makefile b/src/gallium/state_trackers/egl/Makefile index 8933890323..fec178ffb3 100644 --- a/src/gallium/state_trackers/egl/Makefile +++ b/src/gallium/state_trackers/egl/Makefile @@ -31,15 +31,20 @@ kms_SOURCES = $(wildcard kms/*.c) kms_OBJECTS = $(kms_SOURCES:.c=.o) -ALL_INCLUDES = $(common_INCLUDES) $(x11_INCLUDES) $(kms_INCLUDES) -ALL_SOURCES = $(common_SOURCES) $(x11_SOURCES) $(kms_SOURCES) -ALL_OBJECTS = $(common_OBJECTS) $(x11_OBJECTS) $(kms_OBJECTS) +fbdev_INCLUDES = -I$(TOP)/src/gallium/winsys/sw -I$(TOP)/src/gallium/drivers +fbdev_SOURCES = $(wildcard fbdev/*.c) +fbdev_OBJECTS = $(fbdev_SOURCES:.c=.o) + + +ALL_INCLUDES = $(common_INCLUDES) $(x11_INCLUDES) $(kms_INCLUDES) $(fbdev_INCLUDES) +ALL_SOURCES = $(common_SOURCES) $(x11_SOURCES) $(kms_SOURCES) $(fbdev_SOURCES) +ALL_OBJECTS = $(common_OBJECTS) $(x11_OBJECTS) $(kms_OBJECTS) $(fbdev_OBJECTS) ##### TARGETS ##### -EGL_DISPLAYS_MODS = $(foreach dpy, $(EGL_DISPLAYS), libegl$(dpy).a) +EGL_PLATFORMS_MODS = $(foreach plat, $(EGL_PLATFORMS), libegl$(plat).a) -default: depend $(EGL_DISPLAYS_MODS) +default: depend $(EGL_PLATFORMS_MODS) libeglx11.a: $(x11_OBJECTS) $(common_OBJECTS) Makefile @@ -48,6 +53,9 @@ libeglx11.a: $(x11_OBJECTS) $(common_OBJECTS) Makefile libeglkms.a: $(kms_OBJECTS) $(common_OBJECTS) Makefile $(MKLIB) -o eglkms -static $(kms_OBJECTS) $(common_OBJECTS) +libeglfbdev.a: $(fbdev_OBJECTS) $(common_OBJECTS) Makefile + $(MKLIB) -o eglfbdev -static $(fbdev_OBJECTS) $(common_OBJECTS) + depend: rm -f depend touch depend @@ -55,7 +63,7 @@ depend: clean: rm -f $(ALL_OBJECTS) - rm -f $(EGL_DISPLAYS_MODS) + rm -f $(EGL_PLATFORMS_MODS) rm -f depend depend.bak # Dummy target @@ -73,4 +81,7 @@ $(x11_OBJECTS): %.o: %.c $(kms_OBJECTS): %.o: %.c $(CC) -c $(common_INCLUDES) $(kms_INCLUDES) $(DEFINES) $(CFLAGS) $< -o $@ +$(fbdev_OBJECTS): %.o: %.c + $(CC) -c $(common_INCLUDES) $(fbdev_INCLUDES) $(DEFINES) $(CFLAGS) $< -o $@ + sinclude depend diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c index 361cc7960b..8c7d2cb33e 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d.c @@ -74,10 +74,10 @@ egl_g3d_get_probe(_EGLDriver *drv, _EGLDisplay *dpy) struct native_probe *nprobe; nprobe = (struct native_probe *) _eglGetProbeCache(gdrv->probe_key); - if (!nprobe || nprobe->display != dpy->NativeDisplay) { + if (!nprobe || nprobe->display != dpy->PlatformDisplay) { if (nprobe) nprobe->destroy(nprobe); - nprobe = native_create_probe(dpy->NativeDisplay); + nprobe = native_create_probe(dpy->PlatformDisplay); _eglSetProbeCache(gdrv->probe_key, (void *) nprobe); } @@ -96,7 +96,7 @@ egl_g3d_destroy_probe(_EGLDriver *drv, _EGLDisplay *dpy) struct native_probe *nprobe; nprobe = (struct native_probe *) _eglGetProbeCache(gdrv->probe_key); - if (nprobe && (!dpy || nprobe->display == dpy->NativeDisplay)) { + if (nprobe && (!dpy || nprobe->display == dpy->PlatformDisplay)) { nprobe->destroy(nprobe); _eglSetProbeCache(gdrv->probe_key, NULL); } @@ -479,7 +479,7 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy, } dpy->DriverData = gdpy; - gdpy->native = native_create_display(dpy->NativeDisplay, + gdpy->native = native_create_display(dpy->PlatformDisplay, &egl_g3d_native_event_handler); if (!gdpy->native) { _eglError(EGL_NOT_INITIALIZED, "eglInitialize(no usable display)"); diff --git a/src/gallium/state_trackers/egl/common/native.h b/src/gallium/state_trackers/egl/common/native.h index 3f60348c48..494becb61f 100644 --- a/src/gallium/state_trackers/egl/common/native.h +++ b/src/gallium/state_trackers/egl/common/native.h @@ -211,7 +211,6 @@ const char * native_get_name(void); struct native_display * -native_create_display(EGLNativeDisplayType dpy, - struct native_event_handler *handler); +native_create_display(void *dpy, struct native_event_handler *handler); #endif /* _NATIVE_H_ */ diff --git a/src/gallium/state_trackers/egl/common/native_probe.h b/src/gallium/state_trackers/egl/common/native_probe.h index aeed9f85dd..539c4aa70d 100644 --- a/src/gallium/state_trackers/egl/common/native_probe.h +++ b/src/gallium/state_trackers/egl/common/native_probe.h @@ -43,7 +43,7 @@ enum native_probe_result { */ struct native_probe { int magic; - EGLNativeDisplayType display; + void *display; void *data; void (*destroy)(struct native_probe *nprobe); @@ -57,7 +57,7 @@ struct native_probe { * same display. */ struct native_probe * -native_create_probe(EGLNativeDisplayType dpy); +native_create_probe(void *dpy); /** * Probe the probe object. diff --git a/src/gallium/state_trackers/egl/fbdev/native_fbdev.c b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c new file mode 100644 index 0000000000..399c1251ef --- /dev/null +++ b/src/gallium/state_trackers/egl/fbdev/native_fbdev.c @@ -0,0 +1,469 @@ +/* + * Mesa 3-D graphics library + * Version: 7.9 + * + * Copyright (C) 2010 LunarG Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: + * Chia-I Wu <olv@lunarg.com> + */ + +#include <sys/ioctl.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <linux/fb.h> + +#include "pipe/p_screen.h" +#include "util/u_memory.h" +#include "util/u_inlines.h" +#include "util/u_pointer.h" + +#include "common/native.h" +#include "common/native_helper.h" +#include "fbdev/fbdev_sw_winsys.h" + +struct fbdev_display { + struct native_display base; + + int fd; + struct native_event_handler *event_handler; + + struct fb_fix_screeninfo finfo; + struct fb_var_screeninfo vinfo; + + struct native_config config; + struct native_connector connector; + struct native_mode mode; + + struct fbdev_surface *current_surface; +}; + +struct fbdev_surface { + struct native_surface base; + + struct fbdev_display *fbdpy; + struct resource_surface *rsurf; + int width, height; + + unsigned int sequence_number; + + boolean is_current; +}; + +static INLINE struct fbdev_display * +fbdev_display(const struct native_display *ndpy) +{ + return (struct fbdev_display *) ndpy; +} + +static INLINE struct fbdev_surface * +fbdev_surface(const struct native_surface *nsurf) +{ + return (struct fbdev_surface *) nsurf; +} + +static boolean +fbdev_surface_validate(struct native_surface *nsurf, uint attachment_mask, + unsigned int *seq_num, struct pipe_resource **textures, + int *width, int *height) +{ + struct fbdev_surface *fbsurf = fbdev_surface(nsurf); + + if (!resource_surface_add_resources(fbsurf->rsurf, attachment_mask)) + return FALSE; + if (textures) + resource_surface_get_resources(fbsurf->rsurf, textures, attachment_mask); + + if (seq_num) + *seq_num = fbsurf->sequence_number; + if (width) + *width = fbsurf->width; + if (height) + *height = fbsurf->height; + + return TRUE; +} + +static boolean +fbdev_surface_flush_frontbuffer(struct native_surface *nsurf) +{ + struct fbdev_surface *fbsurf = fbdev_surface(nsurf); + + if (!fbsurf->is_current) + return TRUE; + + return resource_surface_present(fbsurf->rsurf, + NATIVE_ATTACHMENT_FRONT_LEFT, NULL); +} + +static boolean +fbdev_surface_swap_buffers(struct native_surface *nsurf) +{ + struct fbdev_surface *fbsurf = fbdev_surface(nsurf); + struct fbdev_display *fbdpy = fbsurf->fbdpy; + boolean ret = TRUE; + + if (fbsurf->is_current) { + ret = resource_surface_present(fbsurf->rsurf, + NATIVE_ATTACHMENT_BACK_LEFT, NULL); + } + + resource_surface_swap_buffers(fbsurf->rsurf, + NATIVE_ATTACHMENT_FRONT_LEFT, NATIVE_ATTACHMENT_BACK_LEFT, TRUE); + /* the front/back textures are swapped */ + fbsurf->sequence_number++; + fbdpy->event_handler->invalid_surface(&fbdpy->base, + &fbsurf->base, fbsurf->sequence_number); + + return ret; +} + +static void +fbdev_surface_wait(struct native_surface *nsurf) +{ + /* no-op */ +} + +static void +fbdev_surface_destroy(struct native_surface *nsurf) +{ + struct fbdev_surface *fbsurf = fbdev_surface(nsurf); + + resource_surface_destroy(fbsurf->rsurf); + FREE(fbsurf); +} + +static struct native_surface * +fbdev_display_create_scanout_surface(struct native_display *ndpy, + const struct native_config *nconf, + uint width, uint height) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + struct fbdev_surface *fbsurf; + + fbsurf = CALLOC_STRUCT(fbdev_surface); + if (!fbsurf) + return NULL; + + fbsurf->fbdpy = fbdpy; + fbsurf->width = width; + fbsurf->height = height; + + fbsurf->rsurf = resource_surface_create(fbdpy->base.screen, + nconf->color_format, + PIPE_BIND_RENDER_TARGET | + PIPE_BIND_DISPLAY_TARGET | + PIPE_BIND_SCANOUT); + if (!fbsurf->rsurf) { + FREE(fbsurf); + return NULL; + } + + resource_surface_set_size(fbsurf->rsurf, fbsurf->width, fbsurf->height); + + fbsurf->base.destroy = fbdev_surface_destroy; + fbsurf->base.swap_buffers = fbdev_surface_swap_buffers; + fbsurf->base.flush_frontbuffer = fbdev_surface_flush_frontbuffer; + fbsurf->base.validate = fbdev_surface_validate; + fbsurf->base.wait = fbdev_surface_wait; + + return &fbsurf->base; +} + +static boolean +fbdev_display_program(struct native_display *ndpy, int crtc_idx, + struct native_surface *nsurf, uint x, uint y, + const struct native_connector **nconns, int num_nconns, + const struct native_mode *nmode) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + struct fbdev_surface *fbsurf = fbdev_surface(nsurf); + + if (x || y) + return FALSE; + + if (fbdpy->current_surface) { + if (fbdpy->current_surface == fbsurf) + return TRUE; + fbdpy->current_surface->is_current = FALSE; + } + + if (fbsurf) + fbsurf->is_current = TRUE; + fbdpy->current_surface = fbsurf; + + return TRUE; +} + +static const struct native_mode ** +fbdev_display_get_modes(struct native_display *ndpy, + const struct native_connector *nconn, + int *num_modes) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + const struct native_mode **modes; + + modes = MALLOC(sizeof(*modes)); + if (modes) { + modes[0] = &fbdpy->mode; + if (num_modes) + *num_modes = 1; + } + + return modes; +} + +static const struct native_connector ** +fbdev_display_get_connectors(struct native_display *ndpy, int *num_connectors, + int *num_crtc) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + const struct native_connector **connectors; + + connectors = MALLOC(sizeof(*connectors)); + if (connectors) { + connectors[0] = &fbdpy->connector; + if (num_connectors) + *num_connectors = 1; + } + + return connectors; +} + +static struct native_display_modeset fbdev_display_modeset = { + .get_connectors = fbdev_display_get_connectors, + .get_modes = fbdev_display_get_modes, + .create_scanout_surface = fbdev_display_create_scanout_surface, + .program = fbdev_display_program +}; + +static const struct native_config ** +fbdev_display_get_configs(struct native_display *ndpy, int *num_configs) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + const struct native_config **configs; + + configs = MALLOC(sizeof(*configs)); + if (configs) { + configs[0] = &fbdpy->config; + if (num_configs) + *num_configs = 1; + } + + return configs; +} + +static int +fbdev_display_get_param(struct native_display *ndpy, + enum native_param_type param) +{ + int val; + + switch (param) { + default: + val = 0; + break; + } + + return val; +} + +static void +fbdev_display_destroy(struct native_display *ndpy) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + + fbdpy->base.screen->destroy(fbdpy->base.screen); + close(fbdpy->fd); + FREE(fbdpy); +} + +static boolean +fbdev_display_init_modes(struct native_display *ndpy) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + struct native_mode *nmode = &fbdpy->mode; + + nmode->desc = "Current Mode"; + nmode->width = fbdpy->vinfo.xres; + nmode->height = fbdpy->vinfo.yres; + nmode->refresh_rate = 60 * 1000; /* dummy */ + + return TRUE; +} + +static boolean +fbdev_display_init_connectors(struct native_display *ndpy) +{ + return TRUE; +} + +static enum pipe_format +vinfo_to_format(const struct fb_var_screeninfo *vinfo) +{ + enum pipe_format format = PIPE_FORMAT_NONE; + + switch (vinfo->bits_per_pixel) { + case 32: + if (vinfo->red.length == 8 && + vinfo->green.length == 8 && + vinfo->blue.length == 8) { + format = (vinfo->transp.length == 8) ? + PIPE_FORMAT_B8G8R8A8_UNORM : PIPE_FORMAT_B8G8R8X8_UNORM; + } + break; + case 16: + if (vinfo->red.length == 5 && + vinfo->green.length == 6 && + vinfo->blue.length == 5 && + vinfo->transp.length == 0) + format = PIPE_FORMAT_B5G6R5_UNORM; + break; + default: + break; + } + + return format; +} + +static boolean +fbdev_display_init_configs(struct native_display *ndpy) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + struct native_config *nconf = &fbdpy->config; + + nconf->color_format = vinfo_to_format(&fbdpy->vinfo); + if (nconf->color_format == PIPE_FORMAT_NONE) + return FALSE; + + nconf->buffer_mask = + (1 << NATIVE_ATTACHMENT_FRONT_LEFT) | + (1 << NATIVE_ATTACHMENT_BACK_LEFT); + + nconf->scanout_bit = TRUE; + + return TRUE; +} + +static boolean +fbdev_display_init(struct native_display *ndpy) +{ + struct fbdev_display *fbdpy = fbdev_display(ndpy); + struct sw_winsys *ws; + + if (ioctl(fbdpy->fd, FBIOGET_FSCREENINFO, &fbdpy->finfo)) + return FALSE; + + if (ioctl(fbdpy->fd, FBIOGET_VSCREENINFO, &fbdpy->vinfo)) + return FALSE; + + if (fbdpy->finfo.visual != FB_VISUAL_TRUECOLOR || + fbdpy->finfo.type != FB_TYPE_PACKED_PIXELS) + return FALSE; + + if (!fbdev_display_init_configs(&fbdpy->base) || + !fbdev_display_init_connectors(&fbdpy->base) || + !fbdev_display_init_modes(&fbdpy->base)) + return FALSE; + + ws = fbdev_create_sw_winsys(fbdpy->fd, fbdpy->config.color_format); + if (ws) + fbdpy->base.screen = native_create_sw_screen(ws); + + if (fbdpy->base.screen) { + if (!fbdpy->base.screen->is_format_supported(fbdpy->base.screen, + fbdpy->config.color_format, PIPE_TEXTURE_2D, 0, + PIPE_BIND_RENDER_TARGET, 0)) { + fbdpy->base.screen->destroy(fbdpy->base.screen); + fbdpy->base.screen = NULL; + } + } + + return (fbdpy->base.screen != NULL); +} + +static struct native_display * +fbdev_display_create(int fd, struct native_event_handler *event_handler) +{ + struct fbdev_display *fbdpy; + + fbdpy = CALLOC_STRUCT(fbdev_display); + if (!fbdpy) + return NULL; + + fbdpy->fd = fd; + fbdpy->event_handler = event_handler; + + if (!fbdev_display_init(&fbdpy->base)) { + FREE(fbdpy); + return NULL; + } + + fbdpy->base.destroy = fbdev_display_destroy; + fbdpy->base.get_param = fbdev_display_get_param; + fbdpy->base.get_configs = fbdev_display_get_configs; + + fbdpy->base.modeset = &fbdev_display_modeset; + + return &fbdpy->base; +} + +struct native_probe * +native_create_probe(void *dpy) +{ + return NULL; +} + +enum native_probe_result +native_get_probe_result(struct native_probe *nprobe) +{ + return NATIVE_PROBE_UNKNOWN; +} + +const char * +native_get_name(void) +{ + return "FBDEV"; +} + +struct native_display * +native_create_display(void *dpy, struct native_event_handler *event_handler) +{ + struct native_display *ndpy; + int fd; + + /* well, this makes fd 0 being ignored */ + if (!dpy) { + fd = open("/dev/fb0", O_RDWR); + } + else { + fd = dup((int) pointer_to_intptr(dpy)); + } + if (fd < 0) + return NULL; + + ndpy = fbdev_display_create(fd, event_handler); + if (!ndpy) + close(fd); + + return ndpy; +} diff --git a/src/gallium/state_trackers/egl/gdi/native_gdi.c b/src/gallium/state_trackers/egl/gdi/native_gdi.c index 1791d198d5..56f190de00 100644 --- a/src/gallium/state_trackers/egl/gdi/native_gdi.c +++ b/src/gallium/state_trackers/egl/gdi/native_gdi.c @@ -367,7 +367,7 @@ gdi_create_display(HDC hDC, struct pipe_screen *screen, } struct native_probe * -native_create_probe(EGLNativeDisplayType dpy) +native_create_probe(void *dpy) { return NULL; } @@ -385,8 +385,7 @@ native_get_name(void) } struct native_display * -native_create_display(EGLNativeDisplayType dpy, - struct native_event_handler *event_handler) +native_create_display(void *dpy, struct native_event_handler *event_handler) { struct sw_winsys *winsys; struct pipe_screen *screen; diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c index bfb4a9d258..f90b8714c9 100644 --- a/src/gallium/state_trackers/egl/kms/native_kms.c +++ b/src/gallium/state_trackers/egl/kms/native_kms.c @@ -779,7 +779,7 @@ kms_create_display(int fd, struct native_event_handler *event_handler, } struct native_probe * -native_create_probe(EGLNativeDisplayType dpy) +native_create_probe(void *dpy) { return NULL; } @@ -810,8 +810,7 @@ native_get_name(void) } struct native_display * -native_create_display(EGLNativeDisplayType dpy, - struct native_event_handler *event_handler) +native_create_display(void *dpy, struct native_event_handler *event_handler) { struct native_display *ndpy = NULL; int fd; diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c index 3f802dd713..e90c33b824 100644 --- a/src/gallium/state_trackers/egl/x11/native_dri2.c +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c @@ -741,7 +741,7 @@ dri2_display_hash_table_compare(void *key1, void *key2) } struct native_display * -x11_create_dri2_display(EGLNativeDisplayType dpy, +x11_create_dri2_display(Display *dpy, struct native_event_handler *event_handler, struct drm_api *api) { diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c index b6d51bbf9f..bfa12b26a7 100644 --- a/src/gallium/state_trackers/egl/x11/native_x11.c +++ b/src/gallium/state_trackers/egl/x11/native_x11.c @@ -46,7 +46,7 @@ x11_probe_destroy(struct native_probe *nprobe) } struct native_probe * -native_create_probe(EGLNativeDisplayType dpy) +native_create_probe(void *dpy) { struct native_probe *nprobe; struct x11_screen *xscr; @@ -127,8 +127,7 @@ native_get_name(void) } struct native_display * -native_create_display(EGLNativeDisplayType dpy, - struct native_event_handler *event_handler) +native_create_display(void *dpy, struct native_event_handler *event_handler) { struct native_display *ndpy = NULL; boolean force_sw; @@ -138,14 +137,14 @@ native_create_display(EGLNativeDisplayType dpy, force_sw = debug_get_bool_option("EGL_SOFTWARE", FALSE); if (api && !force_sw) { - ndpy = x11_create_dri2_display(dpy, event_handler, api); + ndpy = x11_create_dri2_display((Display *) dpy, event_handler, api); } if (!ndpy) { EGLint level = (force_sw) ? _EGL_INFO : _EGL_WARNING; _eglLog(level, "use software fallback"); - ndpy = x11_create_ximage_display(dpy, event_handler); + ndpy = x11_create_ximage_display((Display *) dpy, event_handler); } return ndpy; diff --git a/src/gallium/state_trackers/egl/x11/native_x11.h b/src/gallium/state_trackers/egl/x11/native_x11.h index 1678403b45..f1fea7f3de 100644 --- a/src/gallium/state_trackers/egl/x11/native_x11.h +++ b/src/gallium/state_trackers/egl/x11/native_x11.h @@ -30,11 +30,11 @@ #include "common/native.h" struct native_display * -x11_create_ximage_display(EGLNativeDisplayType dpy, +x11_create_ximage_display(Display *dpy, struct native_event_handler *event_handler); struct native_display * -x11_create_dri2_display(EGLNativeDisplayType dpy, +x11_create_dri2_display(Display *dpy, struct native_event_handler *event_handler, struct drm_api *api); diff --git a/src/gallium/state_trackers/egl/x11/native_ximage.c b/src/gallium/state_trackers/egl/x11/native_ximage.c index 45679fc9b4..ee10a04cfb 100644 --- a/src/gallium/state_trackers/egl/x11/native_ximage.c +++ b/src/gallium/state_trackers/egl/x11/native_ximage.c @@ -441,7 +441,7 @@ ximage_display_destroy(struct native_display *ndpy) } struct native_display * -x11_create_ximage_display(EGLNativeDisplayType dpy, +x11_create_ximage_display(Display *dpy, struct native_event_handler *event_handler) { struct ximage_display *xdpy; |
