~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/mesa/glapi/glapi_nop.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Mesa 3-D graphics library
3
 
 * Version:  7.8
4
 
 *
5
 
 * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
6
 
 * Copyright (C) 2010  VMWare, Inc.  All Rights Reserved.
7
 
 *
8
 
 * Permission is hereby granted, free of charge, to any person obtaining a
9
 
 * copy of this software and associated documentation files (the "Software"),
10
 
 * to deal in the Software without restriction, including without limitation
11
 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
 
 * and/or sell copies of the Software, and to permit persons to whom the
13
 
 * Software is furnished to do so, subject to the following conditions:
14
 
 *
15
 
 * The above copyright notice and this permission notice shall be included
16
 
 * in all copies or substantial portions of the Software.
17
 
 *
18
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21
 
 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22
 
 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23
 
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
 
 */
25
 
 
26
 
 
27
 
/**
28
 
 * No-op dispatch table.
29
 
 *
30
 
 * This file defines a special dispatch table which is loaded with no-op
31
 
 * functions.
32
 
 *
33
 
 * When there's no current rendering context, calling a GL function like
34
 
 * glBegin() is a no-op.  Apps should never normally do this.  So as a
35
 
 * debugging aid, each of the no-op functions will emit a warning to
36
 
 * stderr if the MESA_DEBUG or LIBGL_DEBUG env var is set.
37
 
 */
38
 
 
39
 
 
40
 
 
41
 
#ifdef HAVE_DIX_CONFIG_H
42
 
#include <dix-config.h>
43
 
#include "glapi/mesa.h"
44
 
#else
45
 
#include "main/compiler.h"
46
 
#include "main/glheader.h"
47
 
#endif
48
 
 
49
 
#include "glapi/glapi.h"
50
 
 
51
 
 
52
 
/*
53
 
 * These stubs are kept so that the old DRI drivers still load.
54
 
 */
55
 
PUBLIC void
56
 
_glapi_noop_enable_warnings(GLboolean enable);
57
 
 
58
 
PUBLIC void
59
 
_glapi_set_warning_func(_glapi_proc func);
60
 
 
61
 
void
62
 
_glapi_noop_enable_warnings(GLboolean enable)
63
 
{
64
 
}
65
 
 
66
 
void
67
 
_glapi_set_warning_func(_glapi_proc func)
68
 
{
69
 
}
70
 
 
71
 
#ifdef DEBUG
72
 
 
73
 
/**
74
 
 * Called by each of the no-op GL entrypoints.
75
 
 */
76
 
static int
77
 
Warn(const char *func)
78
 
{
79
 
#if !defined(_WIN32_WCE)
80
 
   if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
81
 
      fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
82
 
              func);
83
 
   }
84
 
#endif
85
 
   return 0;
86
 
}
87
 
 
88
 
 
89
 
/**
90
 
 * This is called if the user somehow calls an unassigned GL dispatch function.
91
 
 */
92
 
static GLint
93
 
NoOpUnused(void)
94
 
{
95
 
   return Warn(" function");
96
 
}
97
 
 
98
 
/*
99
 
 * Defines for the glapitemp.h functions.
100
 
 */
101
 
#define KEYWORD1 static
102
 
#define KEYWORD1_ALT static
103
 
#define KEYWORD2 GLAPIENTRY
104
 
#define NAME(func)  NoOp##func
105
 
#define DISPATCH(func, args, msg)  Warn(#func);
106
 
#define RETURN_DISPATCH(func, args, msg)  Warn(#func); return 0
107
 
 
108
 
 
109
 
/*
110
 
 * Defines for the table of no-op entry points.
111
 
 */
112
 
#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
113
 
 
114
 
#else
115
 
 
116
 
static int
117
 
NoOpGeneric(void)
118
 
{
119
 
#if !defined(_WIN32_WCE)
120
 
   if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
121
 
      fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
122
 
   }
123
 
#endif
124
 
   return 0;
125
 
}
126
 
 
127
 
#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric
128
 
 
129
 
#endif
130
 
 
131
 
#define DISPATCH_TABLE_NAME __glapi_noop_table
132
 
#define UNUSED_TABLE_NAME __unused_noop_functions
133
 
 
134
 
#include "glapi/glapitemp.h"