glBindProgramARB dispatches to glBindProgramNV (remove _mesa_BindProgramARB).
[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 /* Maximum attribute stack depth: */
57 #define MAX_ATTRIB_STACK_DEPTH 16
58
59 /* Maximum client attribute stack depth: */
60 #define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
61
62 /* Maximum recursion depth of display list calls: */
63 #define MAX_LIST_NESTING 64
64
65 /* Maximum number of lights: */
66 #define MAX_LIGHTS 8
67
68 /* Maximum user-defined clipping planes: */
69 #define MAX_CLIP_PLANES 6
70
71 /* Maximum pixel map lookup table size: */
72 #define MAX_PIXEL_MAP_TABLE 256
73
74 /* Number of auxillary color buffers: */
75 #define NUM_AUX_BUFFERS 0
76
77 /* Maximum order (degree) of curves: */
78 #ifdef AMIGA
79 # define MAX_EVAL_ORDER 12
80 #else
81 # define MAX_EVAL_ORDER 30
82 #endif
83
84 /* Maximum Name stack depth */
85 #define MAX_NAME_STACK_DEPTH 64
86
87 /* Min and Max point sizes and granularity */
88 #define MIN_POINT_SIZE 1.0
89 #define MAX_POINT_SIZE 20.0
90 #define POINT_SIZE_GRANULARITY 0.1
91
92 /* Min and Max line widths and granularity */
93 #define MIN_LINE_WIDTH 1.0
94 #define MAX_LINE_WIDTH 10.0
95 #define LINE_WIDTH_GRANULARITY 0.1
96
97 /* Max texture palette / color table size */
98 #define MAX_COLOR_TABLE_SIZE 256
99
100 /* Number of 1D/2D texture mipmap levels */
101 #define MAX_TEXTURE_LEVELS 12
102
103 /* Number of 3D texture mipmap levels */
104 #define MAX_3D_TEXTURE_LEVELS 9
105
106 /* Number of cube texture mipmap levels - GL_ARB_texture_cube_map */
107 #define MAX_CUBE_TEXTURE_LEVELS 12
108
109 /* Maximum rectangular texture size - GL_NV_texture_rectangle */
110 #define MAX_TEXTURE_RECT_SIZE 2048
111
112 /* Number of texture units - GL_ARB_multitexture */
113 #define MAX_TEXTURE_UNITS 8
114
115 /* New: separate numbers of texture coordinates and texture image units.
116 * These values will eventually replace most instances of MAX_TEXTURE_UNITS.
117 * We should always have MAX_TEXTURE_COORD_UNITS <= MAX_TEXTURE_IMAGE_UNITS.
118 * And, GL_MAX_TEXTURE_UNITS <= MAX_TEXTURE_COORD_UNITS.
119 */
120 #define MAX_TEXTURE_COORD_UNITS 8
121 #define MAX_TEXTURE_IMAGE_UNITS 8
122
123 /* Maximum viewport/image size (must accomodate all texture sizes too): */
124 #define MAX_WIDTH 2048
125 #define MAX_HEIGHT 2048
126
127 /* Maxmimum size for CVA. May be overridden by the drivers. */
128 #define MAX_ARRAY_LOCK_SIZE 3000
129
130 /* Subpixel precision for antialiasing, window coordinate snapping */
131 #define SUB_PIXEL_BITS 4
132
133 /* Size of histogram tables */
134 #define HISTOGRAM_TABLE_SIZE 256
135
136 /* Max convolution filter sizes */
137 #define MAX_CONVOLUTION_WIDTH 9
138 #define MAX_CONVOLUTION_HEIGHT 9
139
140 /* GL_ARB_texture_compression */
141 #define MAX_COMPRESSED_TEXTURE_FORMATS 25
142
143 /* GL_EXT_texture_filter_anisotropic */
144 #define MAX_TEXTURE_MAX_ANISOTROPY 16.0
145
146 /* GL_EXT_texture_lod_bias */
147 #define MAX_TEXTURE_LOD_BIAS 4.0
148
149 /* GL_NV_vertex_program */
150 #define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128
151 #define MAX_NV_VERTEX_PROGRAM_TEMPS 12
152 #define MAX_NV_VERTEX_PROGRAM_PARAMS 96
153 #define MAX_NV_VERTEX_PROGRAM_INPUTS 16
154 #define MAX_NV_VERTEX_PROGRAM_OUTPUTS 15
155
156 /* GL_NV_fragment_program */
157 #define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 128
158 #define MAX_NV_FRAGMENT_PROGRAM_TEMPS 96
159 #define MAX_NV_FRAGMENT_PROGRAM_PARAMS 64
160 #define MAX_NV_FRAGMENT_PROGRAM_INPUTS 12
161 #define MAX_NV_FRAGMENT_PROGRAM_OUTPUTS 3
162 #define MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS 2
163
164 /* GL_ARB_vertex_program */
165 #define MAX_VERTEX_PROGRAM_ADDRESS_REGS 1
166
167 /* GL_ARB_fragment_program */
168 #define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 1
169 #define MAX_FRAGMENT_PROGRAM_ALU_INSTRUCTIONS 48
170 #define MAX_FRAGMENT_PROGRAM_TEX_INSTRUCTIONS 24
171 #define MAX_FRAGMENT_PROGRAM_TEX_INDIRECTIONS 4
172
173 /* Any program target/extension */
174 #define MAX_PROGRAM_LOCAL_PARAMS 96
175 #define MAX_PROGRAM_MATRICES 8
176 #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4
177
178
179
180
181 /*
182 * Mesa-specific parameters
183 */
184
185
186 /*
187 * Bits per accumulation buffer color component: 8, 16 or 32
188 */
189 #define ACCUM_BITS 16
190
191
192 /*
193 * Bits per depth buffer value. Any reasonable value up to 31 will
194 * work. 32 doesn't work because of integer overflow problems in the
195 * rasterizer code.
196 */
197 #ifndef DEFAULT_SOFTWARE_DEPTH_BITS
198 #define DEFAULT_SOFTWARE_DEPTH_BITS 16
199 #endif
200 #if DEFAULT_SOFTWARE_DEPTH_BITS <= 16
201 #define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort
202 #else
203 #define DEFAULT_SOFTWARE_DEPTH_TYPE GLuint
204 #endif
205
206
207
208 /*
209 * Bits per stencil value: 8
210 */
211 #define STENCIL_BITS 8
212
213
214 /*
215 * Bits per color channel: 8, 16 or 32
216 */
217 #ifndef CHAN_BITS
218 #define CHAN_BITS 8
219 #endif
220
221
222 /*
223 * Color channel component order
224 * (changes will almost certainly cause problems at this time)
225 */
226 #define RCOMP 0
227 #define GCOMP 1
228 #define BCOMP 2
229 #define ACOMP 3
230
231
232
233 /*
234 * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1.
235 */
236 #define FEATURE_NV_vertex_program 1
237
238 #define FEATURE_NV_fragment_program 1
239
240 #define FEATURE_ARB_vertex_buffer_object 1
241
242 #define FEATURE_ARB_vertex_program 1
243
244 #define FEATURE_ARB_fragment_program 1
245
246
247 #endif /* CONFIG_H */