aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-03-03 16:01:22 +0000
committerJose Fonseca <[email protected]>2015-03-04 11:01:42 +0000
commit5564c361b5cc1f5ec4be3622d7f9be601e3c268a (patch)
treeedd2e212e86ad94257f5b4bf80659e4affee82a0 /src/gallium/targets
parent17b2825d760fb6a7b643e5f9c067d249a582cfdb (diff)
st/egl: Remove.
Largely superseeded by src/egl, and WGL/GLX_EXT_create_context_es_profile extensions. Note this will break Android.mk with gallium drivers -- somebody familiar with that build infrastructure will need to update it to use gallium drivers through egl_dri2. v2: Remove the _EGL_BUILT_IN_DRIVER_GALLIUM define from src/egl/main/Android.mk; and update the src/egl/main/Sconscript to create a SharedLibrary, add versioning, create symlink - copy the bits from egl-static, per Emil Velikov. Reviewed-by: Emil Velikov <[email protected]> v3: Disallow undefined symbols in libEGL.so. Update release notes
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/egl-static/Android.mk81
-rw-r--r--src/gallium/targets/egl-static/Makefile.am210
-rw-r--r--src/gallium/targets/egl-static/SConscript114
-rw-r--r--src/gallium/targets/egl-static/egl.c122
-rw-r--r--src/gallium/targets/egl-static/egl.sym6
-rw-r--r--src/gallium/targets/egl-static/egl_pipe.c41
-rw-r--r--src/gallium/targets/egl-static/egl_pipe.h36
-rw-r--r--src/gallium/targets/egl-static/egl_st.c167
-rw-r--r--src/gallium/targets/egl-static/egl_st.h39
-rw-r--r--src/gallium/targets/egl-static/st_GL.c37
10 files changed, 0 insertions, 853 deletions
diff --git a/src/gallium/targets/egl-static/Android.mk b/src/gallium/targets/egl-static/Android.mk
deleted file mode 100644
index adaf582e15e..00000000000
--- a/src/gallium/targets/egl-static/Android.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-# Mesa 3-D graphics library
-#
-# Copyright (C) 2010-2011 Chia-I Wu <[email protected]>
-# Copyright (C) 2010-2011 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- egl.c \
- egl_pipe.c \
- egl_st.c
-
-LOCAL_CFLAGS := \
- -DFEATURE_ES1=1 \
- -DFEATURE_ES2=1 \
- -D_EGL_MAIN=_eglBuiltInDriverGALLIUM
-
-LOCAL_C_INCLUDES := \
- $(GALLIUM_TOP)/state_trackers/vega \
- $(GALLIUM_TOP)/state_trackers/egl \
- $(MESA_TOP)/src/egl/main \
- $(MESA_TOP)/src/loader \
- $(MESA_TOP)/src/mesa
-
-# swrast
-LOCAL_CFLAGS += -DGALLIUM_SOFTPIPE
-
-# !swrast only
-ifneq ($(MESA_GPU_DRIVERS),swrast)
-LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libdrm
-endif
-
-ifneq ($(filter freedreno, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_FREEDRENO
-endif
-ifneq ($(filter i915g, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_I915
-endif
-ifneq ($(filter ilo, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_ILO
-endif
-ifneq ($(filter nouveau, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_NOUVEAU
-endif
-ifneq ($(filter r300g, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_R300
-endif
-ifneq ($(filter r600g, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_R600
-endif
-ifneq ($(filter radeonsi, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_RADEONSI
-endif
-ifneq ($(filter vmwgfx, $(MESA_GPU_DRIVERS)),)
-LOCAL_CFLAGS += -DGALLIUM_VMWGFX
-endif
-
-LOCAL_MODULE := libmesa_egl_gallium
-
-include $(GALLIUM_COMMON_MK)
-include $(BUILD_STATIC_LIBRARY)
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
deleted file mode 100644
index 653fab15104..00000000000
--- a/src/gallium/targets/egl-static/Makefile.am
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright © 2012 Intel Corporation
-#
-# 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 (including the next
-# paragraph) 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.
-
-# This is Makefile for egl_gallium.so. It is static in that all state trackers
-# and pipe drivers are linked statically when possible.
-#
-# The following variables are examined
-#
-# EGL_CLIENT_APIS - state trackers to support
-# GALLIUM_WINSYS_DIRS - pipe drivers to support
-#
-include $(top_srcdir)/src/gallium/Automake.inc
-
-AM_CFLAGS = \
- $(GALLIUM_TARGET_CFLAGS) \
- $(MSVC2013_COMPAT_CFLAGS)
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src/gallium/state_trackers/egl \
- -I$(top_srcdir)/src/egl/main \
- -DGALLIUM_TRACE \
- -DGALLIUM_RBUG \
- -D_EGL_MAIN=_eglMain
-
-AM_LDFLAGS = \
- -module \
- -no-undefined \
- -avoid-version \
- $(GC_SECTIONS) \
- $(LD_NO_UNDEFINED)
-
-if HAVE_LD_VERSION_SCRIPT
-AM_LDFLAGS += \
- -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.sym
-endif
-
-egldir = $(libdir)/egl
-egl_LTLIBRARIES = egl_gallium.la
-
-nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
-egl_gallium_la_SOURCES = \
- egl.c \
- egl_pipe.c \
- egl_pipe.h \
- egl_st.c \
- egl_st.h
-
-egl_gallium_la_LIBADD = \
- $(top_builddir)/src/loader/libloader.la \
- $(top_builddir)/src/gallium/auxiliary/libgalliumvl_stub.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
- $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
- $(top_builddir)/src/gallium/state_trackers/egl/libegl.la \
- $(top_builddir)/src/egl/main/libEGL.la \
- $(GALLIUM_COMMON_LIB_DEPS)
-
-if HAVE_EGL_PLATFORM_X11
-AM_CPPFLAGS += $(LIBDRM_CFLAGS)
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
- -lX11 -lXext -lXfixes $(LIBDRM_LIBS)
-endif
-
-if HAVE_EGL_PLATFORM_WAYLAND
-AM_CPPFLAGS += $(LIBDRM_CFLAGS)
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/gallium/winsys/sw/wayland/libws_wayland.la \
- $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la \
- $(LIBDRM_LIBS) \
- $(WAYLAND_LIBS)
-endif
-
-if HAVE_EGL_PLATFORM_DRM
-AM_CPPFLAGS += $(LIBDRM_CFLAGS)
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/gbm/libgbm.la \
- $(LIBDRM_LIBS)
-endif
-
-if HAVE_EGL_PLATFORM_FBDEV
-egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/fbdev/libfbdev.la
-endif
-
-if HAVE_EGL_PLATFORM_NULL
-egl_gallium_la_LIBADD += $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la
-endif
-
-if HAVE_OPENGL
-AM_CPPFLAGS += \
- -I$(top_srcdir)/src/mesa \
- -DFEATURE_GL=1
-
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/mesa/libmesagallium.la
-# make st/mesa built-in when there is a single glapi provider
-if HAVE_SHARED_GLAPI
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/mapi/shared-glapi/libglapi.la
-else
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/mapi/glapi/libglapi.la
-
-AM_CPPFLAGS += -D_EGL_EXTERNAL_GL=1
-egl_LTLIBRARIES += st_GL.la
-
-nodist_EXTRA_st_GL_la_SOURCES = dummy.cpp
-st_GL_la_SOURCES = st_GL.c
-
-# st_GL, built only when shared glapi is not enabled
-st_GL_la_LIBADD = \
- $(top_builddir)/src/mesa/libmesagallium.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/mapi/glapi/libglapi.la \
- $(GALLIUM_COMMON_LIB_DEPS)
-endif
-endif
-
-if HAVE_OPENGL_ES1
-AM_CPPFLAGS += \
- -DFEATURE_ES1=1
-endif
-
-if HAVE_OPENGL_ES2
-AM_CPPFLAGS += \
- -DFEATURE_ES2=1
-endif
-
-if HAVE_OPENVG
-AM_CPPFLAGS += \
- -I$(top_srcdir)/src/gallium/state_trackers/vega \
- -DFEATURE_VG=1
-egl_gallium_la_LIBADD += \
- $(top_builddir)/src/gallium/state_trackers/vega/libvega.la \
- $(top_builddir)/src/mapi/vgapi/libOpenVG.la
-endif
-
-EXTRA_egl_gallium_la_DEPENDENCIES = egl.sym
-EXTRA_DIST = SConscript
-
-#if HAVE_GALLIUM_STATIC_TARGETS
-
-TARGET_DRIVERS =
-TARGET_CPPFLAGS =
-TARGET_LIB_DEPS =
-
-include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
-
-include $(top_srcdir)/src/gallium/drivers/ilo/Automake.inc
-
-include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
-
-include $(top_srcdir)/src/gallium/drivers/r300/Automake.inc
-include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
-include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc
-
-include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
-
-include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
-
-include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
-include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
-
-egl_gallium_la_CPPFLAGS = $(AM_CPPFLAGS) $(TARGET_CPPFLAGS)
-egl_gallium_la_LIBADD += $(TARGET_LIB_DEPS) \
- $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
-
-
-#else # HAVE_GALLIUM_STATIC_TARGETS
-
-#egl_gallium_la_LIBADD += \
-# $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la \
-# $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
-# $(GALLIUM_PIPE_LOADER_LIBS)
-#endif
-
-if HAVE_MESA_LLVM
-
-AM_LDFLAGS += $(LLVM_LDFLAGS)
-
-egl_gallium_la_LIBADD += $(LLVM_LIBS)
-
-if HAVE_OPENGL
-if !HAVE_SHARED_GLAPI
-st_GL_la_LIBADD += $(LLVM_LIBS)
-endif
-endif
-
-endif
-
-include $(top_srcdir)/install-gallium-links.mk
diff --git a/src/gallium/targets/egl-static/SConscript b/src/gallium/targets/egl-static/SConscript
deleted file mode 100644
index e423d5d2b72..00000000000
--- a/src/gallium/targets/egl-static/SConscript
+++ /dev/null
@@ -1,114 +0,0 @@
-#######################################################################
-# SConscript for egl-static target
-
-Import('*')
-
-env = env.Clone()
-
-env.Append(CPPPATH = [
- '#/include',
- '#/src/loader',
- '#/src/egl/main',
- '#/src/gallium/auxiliary',
- '#/src/gallium/drivers',
- '#/src/gallium/include',
- '#/src/gallium/winsys',
- '#/src/gallium/state_trackers/egl',
- '#/src/gallium/state_trackers/vega',
- '#/src/mesa',
-])
-
-env.Append(CPPDEFINES = [
- 'GALLIUM_SOFTPIPE',
- 'GALLIUM_RBUG',
- 'GALLIUM_TRACE',
- 'GALLIUM_GALAHAD',
- '_EGL_MAIN=_eglBuiltInDriverGALLIUM',
-])
-
-env.Prepend(LIBS = [
- softpipe,
- rbug,
- trace,
- galahad,
- libloader,
- mesautil,
- gallium,
- egl,
- st_egl,
-])
-
-if env['llvm']:
- env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
- env.Prepend(LIBS = [llvmpipe])
-
-sources = [
- 'egl.c',
- 'egl_pipe.c',
- 'egl_st.c',
-]
-
-if env['platform'] == 'windows':
- sources.append('#src/egl/main/egl.def')
-
- env.Append(LIBS = [
- 'gdi32',
- 'user32',
- 'kernel32',
- 'ws2_32',
- ])
-
- env.Prepend(LIBS = [
- ws_gdi,
- ])
-
-# OpenGL ES and OpenGL
-if env['gles']:
- env.Append(CPPDEFINES = [
- 'FEATURE_GL=1',
- 'FEATURE_ES1=1',
- 'FEATURE_ES2=1'
- ])
- env.Prepend(LIBPATH = [shared_glapi.dir])
- # manually add LIBPREFIX on windows
- glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
- env.Prepend(LIBS = [glapi_name, glsl, mesa])
-
-# OpenVG
-if True:
- env.Append(CPPDEFINES = ['FEATURE_VG=1'])
- env.Prepend(LIBPATH = [openvg.dir])
- # manually add LIBPREFIX on windows
- openvg_name = 'OpenVG' if env['platform'] != 'windows' else 'libOpenVG'
- env.Prepend(LIBS = [openvg_name, st_vega])
-
-if env['HAVE_X11']:
- env.Prepend(LIBS = [
- ws_xlib,
- ])
- env.PkgUseModules('X11')
-
-# pipe drivers
-if env['HAVE_DRM']:
- env.PkgUseModules('DRM')
-
- env.Append(CPPDEFINES = ['GALLIUM_VMWGFX'])
- env.Prepend(LIBS = [
- svgadrm,
- svga,
- ])
-
-# libEGL.dll
-env['LIBPREFIX'] = 'lib'
-env['SHLIBPREFIX'] = 'lib'
-
-egl_gallium = env.SharedLibrary(
- target ='EGL',
- source = sources,
-)
-
-env.Depends(egl_gallium, [openvg])
-
-egl_gallium = env.InstallSharedLibrary(egl_gallium, version=(1, 4, 0))
-
-env.Alias('egl-gallium', egl_gallium)
diff --git a/src/gallium/targets/egl-static/egl.c b/src/gallium/targets/egl-static/egl.c
deleted file mode 100644
index d6bce8b3bcc..00000000000
--- a/src/gallium/targets/egl-static/egl.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2010-2011 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 <[email protected]>
- */
-
-#include "common/egl_g3d_loader.h"
-#include "egldriver.h"
-#include "egllog.h"
-#include "loader.h"
-
-#include "egl_pipe.h"
-#include "egl_st.h"
-#include "target-helpers/inline_drm_helper.h"
-
-static struct egl_g3d_loader egl_g3d_loader;
-
-static struct st_module {
- boolean initialized;
- struct st_api *stapi;
-} st_modules[ST_API_COUNT];
-
-static struct st_api *
-get_st_api(enum st_api_type api)
-{
- struct st_module *stmod = &st_modules[api];
-
- if (!stmod->initialized) {
- stmod->stapi = egl_st_create_api(api);
- stmod->initialized = TRUE;
- }
-
- return stmod->stapi;
-}
-
-
-static struct pipe_screen *
-create_drm_screen(const char *constname, int fd)
-{
- return dd_create_screen(fd);
-}
-
-static struct pipe_screen *
-create_sw_screen(struct sw_winsys *ws)
-{
- return egl_pipe_create_swrast_screen(ws);
-}
-
-static const struct egl_g3d_loader *
-loader_init(void)
-{
- egl_g3d_loader.get_st_api = get_st_api;
- egl_g3d_loader.create_drm_screen = create_drm_screen;
- egl_g3d_loader.create_sw_screen = create_sw_screen;
-
- loader_set_logger(_eglLog);
-
- return &egl_g3d_loader;
-}
-
-static void
-loader_fini(void)
-{
- int i;
-
- for (i = 0; i < ST_API_COUNT; i++) {
- struct st_module *stmod = &st_modules[i];
-
- if (stmod->stapi) {
- egl_st_destroy_api(stmod->stapi);
- stmod->stapi = NULL;
- }
- stmod->initialized = FALSE;
- }
-}
-
-static void
-egl_g3d_unload(_EGLDriver *drv)
-{
- egl_g3d_destroy_driver(drv);
- loader_fini();
-}
-
-_EGLDriver *
-_EGL_MAIN(const char *args)
-{
- const struct egl_g3d_loader *loader;
- _EGLDriver *drv;
-
- loader = loader_init();
- drv = egl_g3d_create_driver(loader);
- if (!drv) {
- loader_fini();
- return NULL;
- }
-
- drv->Name = "Gallium";
- drv->Unload = egl_g3d_unload;
-
- return drv;
-}
diff --git a/src/gallium/targets/egl-static/egl.sym b/src/gallium/targets/egl-static/egl.sym
deleted file mode 100644
index 3fe7d670e6d..00000000000
--- a/src/gallium/targets/egl-static/egl.sym
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- global:
- _eglMain;
- local:
- *;
-};
diff --git a/src/gallium/targets/egl-static/egl_pipe.c b/src/gallium/targets/egl-static/egl_pipe.c
deleted file mode 100644
index c38e4bc3c7f..00000000000
--- a/src/gallium/targets/egl-static/egl_pipe.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2011 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 <[email protected]>
- */
-#include "target-helpers/inline_debug_helper.h"
-#include "target-helpers/inline_sw_helper.h"
-#include "egl_pipe.h"
-
-struct pipe_screen *
-egl_pipe_create_swrast_screen(struct sw_winsys *ws)
-{
- struct pipe_screen *screen;
-
- screen = sw_screen_create(ws);
- if (screen)
- screen = debug_screen_wrap(screen);
-
- return screen;
-}
diff --git a/src/gallium/targets/egl-static/egl_pipe.h b/src/gallium/targets/egl-static/egl_pipe.h
deleted file mode 100644
index 15cc1c17c6e..00000000000
--- a/src/gallium/targets/egl-static/egl_pipe.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2011 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 <[email protected]>
- */
-#ifndef _EGL_PIPE_H_
-#define _EGL_PIPE_H_
-
-struct pipe_screen;
-struct sw_winsys;
-
-struct pipe_screen *
-egl_pipe_create_swrast_screen(struct sw_winsys *ws);
-
-#endif /* _EGL_PIPE_H_ */
diff --git a/src/gallium/targets/egl-static/egl_st.c b/src/gallium/targets/egl-static/egl_st.c
deleted file mode 100644
index 656135b05aa..00000000000
--- a/src/gallium/targets/egl-static/egl_st.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2011 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 <[email protected]>
- */
-#include "util/u_debug.h"
-#include "state_tracker/st_api.h"
-#include "egl_st.h"
-
-#if FEATURE_GL || FEATURE_ES1 || FEATURE_ES2
-#include "state_tracker/st_gl_api.h"
-#endif
-
-#if FEATURE_VG
-#include "vg_api.h"
-#endif
-
-#if _EGL_EXTERNAL_GL
-
-#include "util/u_string.h"
-#include "util/u_dl.h"
-#include "egldriver.h"
-#include "egllog.h"
-
-static struct util_dl_library *egl_st_gl_lib;
-
-static EGLBoolean
-dlopen_gl_lib_cb(const char *dir, size_t len, void *callback_data)
-{
- const char *name = (const char *) callback_data;
- char path[1024];
- int ret;
-
- if (len) {
- assert(len <= INT_MAX && "path is insanely long!");
- ret = util_snprintf(path, sizeof(path), "%.*s/%s" UTIL_DL_EXT,
- (int)len, dir, name);
- }
- else {
- ret = util_snprintf(path, sizeof(path), "%s" UTIL_DL_EXT, name);
- }
-
- if (ret > 0 && ret < sizeof(path)) {
- egl_st_gl_lib = util_dl_open(path);
- if (egl_st_gl_lib)
- _eglLog(_EGL_DEBUG, "loaded %s", path);
- }
-
- return !egl_st_gl_lib;
-}
-
-static struct st_api *
-load_gl(const char *name, const char *procname)
-{
- struct st_api *(*create_api)(void);
- struct st_api *stapi = NULL;
-
- _eglSearchPathForEach(dlopen_gl_lib_cb, (void *) name);
- if (!egl_st_gl_lib)
- return NULL;
-
- create_api = (struct st_api *(*)(void))
- util_dl_get_proc_address(egl_st_gl_lib, procname);
- if (create_api)
- stapi = create_api();
-
- if (!stapi) {
- util_dl_close(egl_st_gl_lib);
- egl_st_gl_lib = NULL;
- }
-
- return stapi;
-}
-
-static struct st_api *
-egl_st_load_gl(void)
-{
- const char module[] = "st_GL";
- const char symbol[] = "st_api_create_OpenGL";
- struct st_api *stapi;
-
- stapi = load_gl(module, symbol);
-
- /* try again with libglapi.so loaded */
- if (!stapi) {
- struct util_dl_library *glapi = util_dl_open("libglapi" UTIL_DL_EXT);
-
- if (glapi) {
- _eglLog(_EGL_DEBUG, "retry with libglapi" UTIL_DL_EXT " loaded");
-
- stapi = load_gl(module, symbol);
- util_dl_close(glapi);
- }
- }
- if (!stapi)
- _eglLog(_EGL_WARNING, "unable to load %s" UTIL_DL_EXT, module);
-
- return stapi;
-}
-
-#endif /* _EGL_EXTERNAL_GL */
-
-struct st_api *
-egl_st_create_api(enum st_api_type api)
-{
- struct st_api *stapi = NULL;
-
- switch (api) {
- case ST_API_OPENGL:
-#if FEATURE_GL || FEATURE_ES1 || FEATURE_ES2
-#if _EGL_EXTERNAL_GL
- stapi = egl_st_load_gl();
-#else
- stapi = st_gl_api_create();
-#endif
-#endif
- break;
- case ST_API_OPENVG:
-#if FEATURE_VG
- stapi = (struct st_api *) vg_api_get();
-#endif
- break;
- default:
- assert(!"Unknown API Type\n");
- break;
- }
-
- return stapi;
-}
-
-void
-egl_st_destroy_api(struct st_api *stapi)
-{
-#if _EGL_EXTERNAL_GL
- boolean is_gl = (stapi->api == ST_API_OPENGL);
-
- stapi->destroy(stapi);
-
- if (is_gl) {
- util_dl_close(egl_st_gl_lib);
- egl_st_gl_lib = NULL;
- }
-#else
- stapi->destroy(stapi);
-#endif
-}
diff --git a/src/gallium/targets/egl-static/egl_st.h b/src/gallium/targets/egl-static/egl_st.h
deleted file mode 100644
index 1d947b22164..00000000000
--- a/src/gallium/targets/egl-static/egl_st.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2011 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 <[email protected]>
- */
-#ifndef _EGL_ST_H_
-#define _EGL_ST_H_
-
-#include "pipe/p_compiler.h"
-#include "state_tracker/st_api.h"
-
-struct st_api *
-egl_st_create_api(enum st_api_type api);
-
-void
-egl_st_destroy_api(struct st_api *stapi);
-
-#endif /* _EGL_ST_H_ */
diff --git a/src/gallium/targets/egl-static/st_GL.c b/src/gallium/targets/egl-static/st_GL.c
deleted file mode 100644
index 86fc98e8abe..00000000000
--- a/src/gallium/targets/egl-static/st_GL.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2011 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 <[email protected]>
- */
-#include "state_tracker/st_gl_api.h"
-#include "pipe/p_compiler.h"
-
-PUBLIC struct st_api *
-st_api_create_OpenGL(void);
-
-struct st_api *
-st_api_create_OpenGL(void)
-{
- return st_gl_api_create();
-}