diff options
author | Chia-I Wu <[email protected]> | 2010-05-05 15:38:02 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-05-08 14:57:21 +0800 |
commit | 63ab2509bf324812d9632c12528677724bdb8775 (patch) | |
tree | 24a04e31adcef0f5ef4ab0f1b84178cd9e5cc8ab /src/gallium/state_trackers/vega | |
parent | 559046e7917e5b9e4226bb02e86da17e62f1385e (diff) |
gallium: Add egl-apis target.
The new target installs client API modules to EGL_DRIVER_INSTALL_DIR.
They are used by st/egl.
The client APIs are built from OpenGL and OpenVG state trackers. For
this to work, st/vega is modified to produce a static library,
libvega.a, instead. st/es is also not needed any more. It is removed
and --with-state-trackers=es is replaced by --enable-gles-overlay.
As st/egl now has its own client API modules, this solves the ABI issue
between st/egl and client APIs, as long as the client API modules are
distributed with st/egl. Plus, this allows st/egl to support OpenGL
with non-Gallium libGL.so.
Diffstat (limited to 'src/gallium/state_trackers/vega')
-rw-r--r-- | src/gallium/state_trackers/vega/Makefile | 67 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_api.h | 37 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/vg_manager.c | 10 |
3 files changed, 48 insertions, 66 deletions
diff --git a/src/gallium/state_trackers/vega/Makefile b/src/gallium/state_trackers/vega/Makefile index f6c80899ffc..e0a87151c43 100644 --- a/src/gallium/state_trackers/vega/Makefile +++ b/src/gallium/state_trackers/vega/Makefile @@ -3,16 +3,13 @@ TOP = ../../../.. include $(TOP)/configs/current -VG_LIB = OpenVG -VG_LIB_NAME = lib$(VG_LIB).so +LIBNAME = vega -VG_MAJOR = 1 -VG_MINOR = 0 -VG_TINY = 0 - -### Lists of source files, included by Makefiles +LIBRARY_INCLUDES = \ + -I$(TOP)/include \ + -I$(TOP)/src/mapi -VG_SOURCES = \ +C_SOURCES = \ api.c \ api_context.c \ api_filters.c \ @@ -41,56 +38,4 @@ VG_SOURCES = \ shader.c \ shaders_cache.c -VG_OBJECTS = $(VG_SOURCES:.c=.o) - -VG_LIBS = $(GALLIUM_AUXILIARIES) $(TOP)/src/mapi/vgapi/libvgapi.a -VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lm - -### Include directories - -INCLUDE_DIRS = \ - -I$(TOP)/include \ - -I$(TOP)/src/mapi \ - -I$(TOP)/src/gallium/include \ - -I$(TOP)/src/gallium/auxiliary - - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - -default: depend $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME) - -# Make the OpenVG library -$(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VG_OBJECTS) $(VG_LIBS) - $(MKLIB) -o $(VG_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - -major $(VG_MAJOR) \ - -minor $(VG_MINOR) \ - -patch $(VG_TINY) \ - -install $(TOP)/$(LIB_DIR) \ - $(VG_OBJECTS) $(VG_LIBS) $(VG_LIB_DEPS) - -###################################################################### -# Generic stuff - -depend: $(VG_SOURCES) - @ echo "running $(MKDEP)" - @ rm -f depend # workaround oops on gutsy?!? - @ touch depend - @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(VG_SOURCES) \ - > /dev/null 2>/dev/null - -install: default - $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/VG - $(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_DIR)/include/VG - $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) - $(MINSTALL) $(TOP)/$(LIB_DIR)/libOpenVG* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) - -# Emacs tags -tags: - etags `find . -name \*.[ch]` $(TOP)/include/VG/*.h - -clean: - rm -f $(VG_OBJECTS) - rm -f depend depend.bak - -sinclude depend +include ../../Makefile.template diff --git a/src/gallium/state_trackers/vega/vg_api.h b/src/gallium/state_trackers/vega/vg_api.h new file mode 100644 index 00000000000..ce2a0d6bb47 --- /dev/null +++ b/src/gallium/state_trackers/vega/vg_api.h @@ -0,0 +1,37 @@ +/* + * 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 <[email protected]> + */ + +#ifndef VG_API_H +#define VG_API_H + +struct st_api; + +const struct st_api * +vg_api_get(void); + +#endif /* VG_API_H */ diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index 9671bbed6cf..f1bc5787855 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -36,6 +36,7 @@ #include "util/u_format.h" #include "util/u_sampler.h" +#include "vg_api.h" #include "vg_manager.h" #include "vg_context.h" #include "image.h" @@ -543,10 +544,9 @@ vg_api_get_proc_address(struct st_api *stapi, const char *procname) static void vg_api_destroy(struct st_api *stapi) { - free(stapi); } -struct st_api st_vg_api = { +static const struct st_api vg_api = { vg_api_destroy, vg_api_get_proc_address, vg_api_is_visual_supported, @@ -555,8 +555,8 @@ struct st_api st_vg_api = { vg_api_get_current, }; -struct st_api * -st_api_create_OpenVG(void) +const struct st_api * +vg_api_get(void) { - return &st_vg_api; + return &vg_api; } |