summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaowei Guan <xiaowei.guan@samsung.com>2019-04-12 15:37:34 +0800
committerXuelian Bai <xuelian.bai@samsung.com>2019-04-19 02:57:21 +0800
commit1b183aa38cfa2f8ab842ebec7e51b7d347d0eebf (patch)
treecc590bfe3579ceb5c7e64748b8131e801413f698
parent9d06c14cab58a385070d2577f84e33d7b50cc3b5 (diff)
downloadmesa-1b183aa38cfa2f8ab842ebec7e51b7d347d0eebf.tar.gz
mesa-1b183aa38cfa2f8ab842ebec7e51b7d347d0eebf.tar.bz2
mesa-1b183aa38cfa2f8ab842ebec7e51b7d347d0eebf.zip
Fix build and launch error for mesa 19.0.0
Change-Id: I39bfbcbbde60eb0f9f77240e23573c23d17b89be
-rw-r--r--packaging/mesa.spec3
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h5
-rw-r--r--src/egl/drivers/dri2/platform_tizen.c15
-rw-r--r--src/egl/main/egldevice.h3
4 files changed, 18 insertions, 8 deletions
diff --git a/packaging/mesa.spec b/packaging/mesa.spec
index 2d3d21bed6b..000fb577e48 100644
--- a/packaging/mesa.spec
+++ b/packaging/mesa.spec
@@ -1,5 +1,5 @@
Name: mesa
-Version: 18.1.0
+Version: 19.0.0
Release: 0
License: MIT and Apache-2.0 and SGI Free Software License B v2.0 and BSD-3-Clause
Summary: System for rendering interactive 3-D graphics
@@ -71,6 +71,7 @@ cp %{SOURCE1002} .
--enable-shared-glapi \
--enable-gbm \
--with-platforms=tizen,wayland,drm \
+ --enable-autotools\
%ifarch %ix86 x86_64
--with-dri-drivers="i915,swrast" \
--with-gallium-drivers="i915,swrast"
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index c82923fef6d..b77f97b3944 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -252,9 +252,8 @@ struct dri2_egl_display
#ifdef HAVE_TIZEN_PLATFORM
tpl_display_t *tpl_display;
#endif
-
- int is_render_node;
- int is_different_gpu;
+ bool is_render_node;
+ bool is_different_gpu;
};
struct dri2_egl_context
diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c
index 119736f36e4..ad145b62ee2 100644
--- a/src/egl/drivers/dri2/platform_tizen.c
+++ b/src/egl/drivers/dri2/platform_tizen.c
@@ -1440,9 +1440,11 @@ tizen_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
EGLBoolean
dri2_initialize_tizen(_EGLDriver *drv, _EGLDisplay *disp)
{
+ _EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
tpl_display_t *tpl_display = NULL;
const char *err;
+ int tbm_bufmgr_fd = -1;
char *tbm_bufmgr_device_name = NULL;
int hw_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);
@@ -1553,13 +1555,22 @@ dri2_initialize_tizen(_EGLDriver *drv, _EGLDisplay *disp)
goto cleanup_driver;
}
- dri2_setup_screen(disp);
+
+ dev = _eglAddDevice(dri2_dpy->fd, false);
+ if (!dev) {
+ err = "DRI2: failed to find EGLDevice";
+ goto cleanup_screen;;
+ }
+
+ disp->Device = dev;
if (!dri2_setup_extensions(disp)) {
- err = "DRI2: failed to setup extensions";
+ err = "DRI2: failed to find required DRI extensions";
goto cleanup_screen;
}
+ dri2_setup_screen(disp);
+
if (!tizen_add_configs(drv, disp)) {
err = "DRI2: failed to add configs";
goto cleanup_screen;
diff --git a/src/egl/main/egldevice.h b/src/egl/main/egldevice.h
index 883f96f8e30..ed8837b4fbd 100644
--- a/src/egl/main/egldevice.h
+++ b/src/egl/main/egldevice.h
@@ -50,8 +50,7 @@ static inline _EGLDevice *
_eglLookupDevice(EGLDeviceEXT device)
{
_EGLDevice *dev = (_EGLDevice *) device;
- if (!_eglCheckDeviceHandle(device))
- dev = NULL;
+ _eglCheckDeviceHandle(device);
return dev;
}