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