[Mesa-dev] [PATCH 08/12] egl: Resolve Haiku build issues
Alexander von Gluck IV
kallisti5 at unixzen.com
Mon Dec 22 06:36:07 PST 2014
From: Adrián Arroyo Calle <adrian.arroyocalle at gmail.com>
* Builds perfect and it loads the driver.
* It still reports EGL_NOT_INITIALIZED
---
src/egl/drivers/dri2/SConscript | 8 +++++++-
src/egl/drivers/dri2/platform_haiku.cpp | 4 ++++
src/egl/main/SConscript | 4 ++--
src/egl/main/egldisplay.c | 3 ++-
src/egl/main/egldisplay.h | 1 +
5 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/egl/drivers/dri2/SConscript b/src/egl/drivers/dri2/SConscript
index 2c081d2..26765c5 100644
--- a/src/egl/drivers/dri2/SConscript
+++ b/src/egl/drivers/dri2/SConscript
@@ -20,6 +20,7 @@ if env['platform'] == 'haiku':
sources.append('platform_haiku.cpp')
env.Append(CPPDEFINES = [
'HAVE_HAIKU_PLATFORM',
+ '_EGL_NATIVE_PLATFORM=haiku',
])
if env['x11']:
@@ -27,11 +28,16 @@ if env['x11']:
env.Append(CPPDEFINES = [
'HAVE_X11_PLATFORM',
])
- env.Append([CPPPATH = [
+ env.Append(CPPPATH = [
# 'XCB_DRI2_CFLAGS',
])
+env.Prepend(LIBS = [
+ libloader,
+])
+
egl_dri2 = env.ConvenienceLibrary(
+#egl_dri2 = env.SharedLibrary(
target = 'egl_dri2',
source = sources,
)
diff --git a/src/egl/drivers/dri2/platform_haiku.cpp b/src/egl/drivers/dri2/platform_haiku.cpp
index 15e6c95..ef85e27 100644
--- a/src/egl/drivers/dri2/platform_haiku.cpp
+++ b/src/egl/drivers/dri2/platform_haiku.cpp
@@ -26,10 +26,14 @@
#include <dlfcn.h>
#include <stdio.h>
+extern "C" {
+
#include "loader.h"
#include "egl_dri2.h"
#include "egl_dri2_fallbacks.h"
+}
+
#include <InterfaceKit.h>
static void
diff --git a/src/egl/main/SConscript b/src/egl/main/SConscript
index 6582621..a8725ca 100644
--- a/src/egl/main/SConscript
+++ b/src/egl/main/SConscript
@@ -7,7 +7,7 @@ Import('*')
env = env.Clone()
env.Append(CPPDEFINES = [
- #'_EGL_BUILT_IN_DRIVER_GALLIUM',
+ '_EGL_BUILT_IN_DRIVER_DRI2',
'_EGL_DRIVER_SEARCH_DIR=\\"\\"',
])
@@ -29,7 +29,7 @@ env.Append(CPPPATH = [
])
env.Prepend(LIBS = [
- 'egl_dri2',
+ egl_dri2,
libloader,
])
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 76dfee7..259ab6b 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -75,7 +75,8 @@ static const struct {
{ _EGL_PLATFORM_DRM, "drm" },
{ _EGL_PLATFORM_FBDEV, "fbdev" },
{ _EGL_PLATFORM_NULL, "null" },
- { _EGL_PLATFORM_ANDROID, "android" }
+ { _EGL_PLATFORM_ANDROID, "android" },
+ { _EGL_PLATFORM_HAIKU, "haiku" }
};
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index d4b9602..bcdc2b2 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -46,6 +46,7 @@ enum _egl_platform_type {
_EGL_PLATFORM_FBDEV,
_EGL_PLATFORM_NULL,
_EGL_PLATFORM_ANDROID,
+ _EGL_PLATFORM_HAIKU,
_EGL_NUM_PLATFORMS,
_EGL_INVALID_PLATFORM = -1
--
1.7.1
More information about the mesa-dev
mailing list