~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/glx/mini/dispatch.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * \file miniglx/dispatch.c
3
 
 *
4
 
 * \brief C-based dispatch of the OpenGL entry points (glAccum(), glBegin(),
5
 
 * etc).
6
 
 * 
7
 
 * \author Brian Paul <brian@precisioninsight.com>
8
 
 * 
9
 
 * \note This code IS NOT USED if we're compiling on an x86 system and using
10
 
 * the glapi_x86.S assembly code.
11
 
 */
12
 
 
13
 
/* 
14
 
 * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
15
 
 * All Rights Reserved.
16
 
 * 
17
 
 * Permission is hereby granted, free of charge, to any person obtaining a
18
 
 * copy of this software and associated documentation files (the
19
 
 * "Software"), to deal in the Software without restriction, including
20
 
 * without limitation the rights to use, copy, modify, merge, publish,
21
 
 * distribute, sub license, and/or sell copies of the Software, and to
22
 
 * permit persons to whom the Software is furnished to do so, subject to
23
 
 * the following conditions:
24
 
 * 
25
 
 * The above copyright notice and this permission notice (including the
26
 
 * next paragraph) shall be included in all copies or substantial portions
27
 
 * of the Software.
28
 
 * 
29
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
30
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
32
 
 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
33
 
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
34
 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
35
 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36
 
 */
37
 
 
38
 
#include "glheader.h"
39
 
#include "glapi.h"
40
 
#include "glapitable.h"
41
 
 
42
 
 
43
 
#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))
44
 
 
45
 
#define KEYWORD1
46
 
 
47
 
#define KEYWORD2
48
 
 
49
 
#define NAME(func) gl##func
50
 
 
51
 
#define DISPATCH(func, args, msg)                                       \
52
 
   const struct _glapi_table *dispatch;                                 \
53
 
   dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
54
 
   (dispatch->func) args
55
 
 
56
 
#define RETURN_DISPATCH(func, args, msg)                                \
57
 
   const struct _glapi_table *dispatch;                                 \
58
 
   dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\
59
 
   return (dispatch->func) args
60
 
 
61
 
 
62
 
#include "glapitemp.h"
63
 
 
64
 
#endif /* USE_X86_ASM */