Commit Graph

8 Commits

Author SHA1 Message Date
Matt Turner d5e9426b96 build: Move src/mapi/mapi/* to src/mapi/
Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-15 12:04:25 -07:00
Chia-I Wu 97185bf265 mapi: Add support for bridge mode.
In bridge mode, mapi no longer implements glapi.h.  It becomes a user of
glapi.h.  Imagine an app that uses both libGL.so and libGLESv2.so.
There will be two copies of glapi in the app's memory.  It is possible
that _glapi_get_dispatch does not return what _glapi_set_dispatch set,
if they access different copies of the global variables.  The solution
to this situation to build either one of the libraries as a bridge to
the other.  Or build both libraries as bridges to another shared
glapi library.
2011-01-20 17:15:50 +08:00
Chia-I Wu 6fc152f660 mapi: Add a new glapi.h implementation.
The new implementation is based on mapi.  No new script is needed.  As
noted in sources.mk, the way to use it is to compile MAPI_GLAPI_SOURCES
with MAPI_MODE_GLAPI defined.
2011-01-20 17:15:50 +08:00
Chia-I Wu 7048095513 mapi: Clean up sources.mk.
Rename MAPI_GLAPI_SOURCES to MAPI_UTIL_SOURCES.  Rename macro
MAPI_GLAPI_CURRENT to MAPI_MODE_UTIL.  Update the comments to make it
clear that mapi may be used in two ways and how.
2010-12-18 15:05:58 +08:00
Chia-I Wu c17d4999f1 mapi: Clean up u_current interface.
Try not to use macros to make u_current.h appear to be glapi.h.  Use
u_current.h to implement glapi.h instead whenever possible.
2010-12-18 15:05:52 +08:00
Chia-I Wu df98423f24 mapi: Prefix functions in u_current.h by u_current.
That is, replace the old _glapi_* names by new names that start with
u_current_.  When MAPI_GLAPI_CURRENT is defined, u_current.h defines
rename macros to restore the old names.  That is done for ABI
compatibility.
2010-08-21 14:13:59 +08:00
Chia-I Wu 760451baae glapi: Move public function/variable declarations to glapi.h.
glapi defines an interface that is used by DRI drivers.  It must not be
changed in an ABI incompatible way.  This commit moves all
functions/variables belong to the interface to glapi.h.  Instead of
including u_current.h from glapi.h, u_current.h now includes glapi.h.
2010-08-21 14:13:59 +08:00
Chia-I Wu a73c6540d9 mapi: Add mapi and share the code with glapi.
Specifically, move all or most of

      glapi/glapi.c         to mapi/u_current.c,
      glapi/glapi_execmem.c to mapi/u_execmem.c,
      glapi/glthread.[ch]   to mapi/u_thread.[ch]

and remove their dependencies on core Mesa headers.
2010-05-07 10:41:11 +08:00