OSDN Git Service

mesa: remove outdated version lines in comments
[android-x86/external-mesa.git] / src / mapi / glapi / glapi_dispatch.c
1 /*
2  * Mesa 3-D graphics library
3  *
4  * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22  * OTHER DEALINGS IN THE SOFTWARE.
23  */
24
25
26 /**
27  * \file glapi_dispatch.c
28  *
29  * This file generates all the gl* function entrypoints.  This code is not
30  * used if optimized assembly stubs are available (e.g., using
31  * glapi/glapi_x86.S on IA32 or glapi/glapi_sparc.S on SPARC).
32  *
33  * \note
34  * This file is also used to build the client-side libGL that loads DRI-based
35  * device drivers.  At build-time it is symlinked to src/glx.
36  *
37  * \author Brian Paul <brian@precisioninsight.com>
38  */
39
40 #include "glapi/glapi_priv.h"
41 #include "glapi/glapitable.h"
42
43
44 #if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM))
45
46 #if defined(_WIN32)
47 #define KEYWORD1 GLAPI
48 #else
49 #define KEYWORD1 PUBLIC
50 #endif
51
52 #define KEYWORD2 GLAPIENTRY
53
54 #if defined(USE_MGL_NAMESPACE)
55 #define NAME(func)  mgl##func
56 #else
57 #define NAME(func)  gl##func
58 #endif
59
60 #if 0  /* Use this to log GL calls to stdout (for DEBUG only!) */
61
62 #define F stdout
63 #define DISPATCH(FUNC, ARGS, MESSAGE)           \
64    fprintf MESSAGE;                             \
65    GET_DISPATCH()->FUNC ARGS
66
67 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE)    \
68    fprintf MESSAGE;                             \
69    return GET_DISPATCH()->FUNC ARGS
70
71 #else
72
73 #define DISPATCH(FUNC, ARGS, MESSAGE)           \
74    GET_DISPATCH()->FUNC ARGS
75
76 #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE)    \
77    return GET_DISPATCH()->FUNC ARGS
78
79 #endif /* logging */
80
81
82 #ifndef GLAPIENTRY
83 #define GLAPIENTRY
84 #endif
85
86 #ifdef GLX_INDIRECT_RENDERING
87 /* those link to libglapi.a should provide the entry points */
88 #define _GLAPI_SKIP_PROTO_ENTRY_POINTS
89 #endif
90 #include "glapi/glapitemp.h"
91
92 #endif /* USE_X86_ASM */