config.h revision 6061df09a45c42745253965df012ddf76910ea33
1/* $Id: config.h,v 1.45 2003/03/29 17:01:03 brianp Exp $ */
2
3/*
4 * Mesa 3-D graphics library
5 * Version:  5.1
6 *
7 * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28/*
29 * Tunable configuration parameters.
30 */
31
32
33
34#ifndef CONFIG_H
35#define CONFIG_H
36
37#ifdef HAVE_CONFIG_H
38#include "conf.h"
39#endif
40
41
42/*
43 * OpenGL implementation limits
44 */
45
46/* Maximum modelview matrix stack depth: */
47#define MAX_MODELVIEW_STACK_DEPTH 32
48
49/* Maximum projection matrix stack depth: */
50#define MAX_PROJECTION_STACK_DEPTH 32
51
52/* Maximum texture matrix stack depth: */
53#define MAX_TEXTURE_STACK_DEPTH 10
54
55/* Maximum color matrix stack depth: */
56#define MAX_COLOR_STACK_DEPTH 4
57
58/* Vertex program matrix stacks: */
59#define MAX_PROGRAM_MATRICES 8
60#define MAX_PROGRAM_STACK_DEPTH 4
61
62/* Maximum attribute stack depth: */
63#define MAX_ATTRIB_STACK_DEPTH 16
64
65/* Maximum client attribute stack depth: */
66#define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
67
68/* Maximum recursion depth of display list calls: */
69#define MAX_LIST_NESTING 64
70
71/* Maximum number of lights: */
72#define MAX_LIGHTS 8
73
74/* Maximum user-defined clipping planes: */
75#define MAX_CLIP_PLANES 6
76
77/* Maximum pixel map lookup table size: */
78#define MAX_PIXEL_MAP_TABLE 256
79
80/* Number of auxillary color buffers: */
81#define NUM_AUX_BUFFERS 0
82
83/* Maximum order (degree) of curves: */
84#ifdef AMIGA
85#   define MAX_EVAL_ORDER 12
86#else
87#   define MAX_EVAL_ORDER 30
88#endif
89
90/* Maximum Name stack depth */
91#define MAX_NAME_STACK_DEPTH 64
92
93/* Min and Max point sizes and granularity */
94#define MIN_POINT_SIZE 1.0
95#define MAX_POINT_SIZE 20.0
96#define POINT_SIZE_GRANULARITY 0.1
97
98/* Min and Max line widths and granularity */
99#define MIN_LINE_WIDTH 1.0
100#define MAX_LINE_WIDTH 10.0
101#define LINE_WIDTH_GRANULARITY 0.1
102
103/* Max texture palette / color table size */
104#define MAX_COLOR_TABLE_SIZE 256
105
106/* Number of 1D/2D texture mipmap levels */
107#define MAX_TEXTURE_LEVELS 12
108
109/* Number of 3D texture mipmap levels */
110#define MAX_3D_TEXTURE_LEVELS 8
111
112/* Number of cube texture mipmap levels - GL_ARB_texture_cube_map */
113#define MAX_CUBE_TEXTURE_LEVELS 12
114
115/* Maximum rectangular texture size - GL_NV_texture_rectangle */
116#define MAX_TEXTURE_RECT_SIZE 2048
117
118/* Number of texture units - GL_ARB_multitexture */
119#define MAX_TEXTURE_UNITS 8
120
121/* New: separate numbers of texture coordinates and texture image units.
122 * These values will eventually replace most instances of MAX_TEXTURE_UNITS.
123 * We should always have MAX_TEXTURE_COORD_UNITS <= MAX_TEXTURE_IMAGE_UNITS.
124 * And, GL_MAX_TEXTURE_UNITS <= MAX_TEXTURE_COORD_UNITS.
125 */
126#define MAX_TEXTURE_COORD_UNITS 8
127#define MAX_TEXTURE_IMAGE_UNITS 8
128
129/* Maximum viewport/image size: */
130#define MAX_WIDTH 2048
131#define MAX_HEIGHT 2048
132
133/* Maxmimum size for CVA.  May be overridden by the drivers.  */
134#define MAX_ARRAY_LOCK_SIZE 3000
135
136/* Subpixel precision for antialiasing, window coordinate snapping */
137#define SUB_PIXEL_BITS 4
138
139/* Size of histogram tables */
140#define HISTOGRAM_TABLE_SIZE 256
141
142/* Max convolution filter sizes */
143#define MAX_CONVOLUTION_WIDTH 9
144#define MAX_CONVOLUTION_HEIGHT 9
145
146/* GL_ARB_texture_compression */
147#define MAX_COMPRESSED_TEXTURE_FORMATS 25
148
149/* GL_EXT_texture_filter_anisotropic */
150#define MAX_TEXTURE_MAX_ANISOTROPY 16.0
151
152/* GL_EXT_texture_lod_bias */
153#define MAX_TEXTURE_LOD_BIAS 4.0
154
155/* GL_NV_vertex_program */
156#define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128
157#define MAX_NV_VERTEX_PROGRAM_TEMPS         12
158#define MAX_NV_VERTEX_PROGRAM_PARAMS        96
159#define MAX_NV_VERTEX_PROGRAM_INPUTS        16
160#define MAX_NV_VERTEX_PROGRAM_OUTPUTS       15
161
162/* GL_NV_fragment_program */
163#define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 128
164#define MAX_NV_FRAGMENT_PROGRAM_TEMPS         96
165#define MAX_NV_FRAGMENT_PROGRAM_PARAMS        64
166#define MAX_NV_FRAGMENT_PROGRAM_INPUTS        12
167#define MAX_NV_FRAGMENT_PROGRAM_OUTPUTS        3
168#define MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS    2
169
170
171
172/*
173 * Mesa-specific parameters
174 */
175
176
177/*
178 * Bits per accumulation buffer color component:  8, 16 or 32
179 */
180#define ACCUM_BITS 16
181
182
183/*
184 * Bits per depth buffer value.  Any reasonable value up to 31 will
185 * work.  32 doesn't work because of integer overflow problems in the
186 * rasterizer code.
187 */
188#ifndef DEFAULT_SOFTWARE_DEPTH_BITS
189#define DEFAULT_SOFTWARE_DEPTH_BITS 16
190#endif
191#if DEFAULT_SOFTWARE_DEPTH_BITS <= 16
192#define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort
193#else
194#define DEFAULT_SOFTWARE_DEPTH_TYPE GLuint
195#endif
196
197
198
199/*
200 * Bits per stencil value:  8
201 */
202#define STENCIL_BITS 8
203
204
205/*
206 * Bits per color channel:  8, 16 or 32
207 */
208#ifndef CHAN_BITS
209#define CHAN_BITS 8
210#endif
211
212
213/*
214 * Color channel component order
215 * (changes will almost certainly cause problems at this time)
216 */
217#define RCOMP 0
218#define GCOMP 1
219#define BCOMP 2
220#define ACOMP 3
221
222
223
224/*
225 * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1.
226 */
227#define FEATURE_NV_vertex_program 1
228
229#define FEATURE_NV_fragment_program 1
230
231#define FEATURE_ARB_vertex_buffer_object 1
232
233#endif /* CONFIG_H */
234