summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/egl')
-rw-r--r--src/gallium/state_trackers/egl/Android.mk5
-rw-r--r--src/gallium/state_trackers/egl/SConscript12
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d.c20
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_loader.h1
4 files changed, 28 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/egl/Android.mk b/src/gallium/state_trackers/egl/Android.mk
index b27e14b1f06..7c4c93669c1 100644
--- a/src/gallium/state_trackers/egl/Android.mk
+++ b/src/gallium/state_trackers/egl/Android.mk
@@ -32,7 +32,10 @@ LOCAL_SRC_FILES := \
$(common_FILES) \
$(android_FILES)
-LOCAL_CFLAGS := -DHAVE_ANDROID_BACKEND
+LOCAL_CFLAGS := \
+ -DFEATURE_ES1=1 \
+ -DFEATURE_ES2=1 \
+ -DHAVE_ANDROID_BACKEND
LOCAL_C_INCLUDES := \
$(GALLIUM_TOP)/state_trackers/egl \
diff --git a/src/gallium/state_trackers/egl/SConscript b/src/gallium/state_trackers/egl/SConscript
index 3ddf0bca489..3727fb2b047 100644
--- a/src/gallium/state_trackers/egl/SConscript
+++ b/src/gallium/state_trackers/egl/SConscript
@@ -14,6 +14,18 @@ env.Append(CPPPATH = [
sources = env.ParseSourceList('Makefile.sources', 'common_FILES')
+# OpenGL ES and OpenGL
+if env['gles']:
+ env.Append(CPPDEFINES = [
+ 'FEATURE_GL=1',
+ 'FEATURE_ES1=1',
+ 'FEATURE_ES2=1'
+ ])
+
+# OpenVG
+if True:
+ env.Append(CPPDEFINES = ['FEATURE_VG=1'])
+
if env['platform'] == 'windows':
env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
sources.append(env.ParseSourceList('Makefile.sources', 'gdi_FILES'))
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 7cc4e8f6cba..d3f5e929d19 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -548,14 +548,18 @@ egl_g3d_initialize(_EGLDriver *drv, _EGLDisplay *dpy)
goto fail;
}
- if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_DEFAULT_MASK)
- dpy->ClientAPIs |= EGL_OPENGL_BIT;
- if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_OPENGL_ES1_MASK)
- dpy->ClientAPIs |= EGL_OPENGL_ES_BIT;
- if (gdpy->loader->profile_masks[ST_API_OPENGL] & ST_PROFILE_OPENGL_ES2_MASK)
- dpy->ClientAPIs |= EGL_OPENGL_ES2_BIT;
- if (gdpy->loader->profile_masks[ST_API_OPENVG] & ST_PROFILE_DEFAULT_MASK)
- dpy->ClientAPIs |= EGL_OPENVG_BIT;
+#if FEATURE_GL
+ dpy->ClientAPIs |= EGL_OPENGL_BIT;
+#endif
+#if FEATURE_ES1
+ dpy->ClientAPIs |= EGL_OPENGL_ES_BIT;
+#endif
+#if FEATURE_ES2
+ dpy->ClientAPIs |= EGL_OPENGL_ES2_BIT;
+#endif
+#if FEATURE_VG
+ dpy->ClientAPIs |= EGL_OPENVG_BIT;
+#endif
gdpy->smapi = egl_g3d_create_st_manager(dpy);
if (!gdpy->smapi) {
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_loader.h b/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
index 51b4d19e0c8..03db15321ba 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_loader.h
@@ -36,7 +36,6 @@ struct pipe_screen;
struct sw_winsys;
struct egl_g3d_loader {
- uint profile_masks[ST_API_COUNT];
struct st_api *(*get_st_api)(enum st_api_type api);
struct pipe_screen *(*create_drm_screen)(const char *name, int fd);