config.h revision e4b2356c07d31fbeeabb13b2fb47db703b473080
1/** 2 * \file config.h 3 * Tunable configuration parameters. 4 */ 5 6/* 7 * Mesa 3-D graphics library 8 * Version: 6.3 9 * 10 * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. 11 * 12 * Permission is hereby granted, free of charge, to any person obtaining a 13 * copy of this software and associated documentation files (the "Software"), 14 * to deal in the Software without restriction, including without limitation 15 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 16 * and/or sell copies of the Software, and to permit persons to whom the 17 * Software is furnished to do so, subject to the following conditions: 18 * 19 * The above copyright notice and this permission notice shall be included 20 * in all copies or substantial portions of the Software. 21 * 22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 */ 29 30 31#ifndef CONFIG_H 32#define CONFIG_H 33 34#ifdef HAVE_CONFIG_H 35#include "conf.h" 36#endif 37 38 39/** 40 * \name OpenGL implementation limits 41 */ 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/** Maximum number of auxillary color buffers */ 75#define MAX_AUX_BUFFERS 4 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/** Minimum point size */ 88#define MIN_POINT_SIZE 1.0 89/** Maximum point size */ 90#define MAX_POINT_SIZE 20.0 91/** Point size granularity */ 92#define POINT_SIZE_GRANULARITY 0.1 93 94/** Minimum line width */ 95#define MIN_LINE_WIDTH 1.0 96/** Maximum line width */ 97#define MAX_LINE_WIDTH 10.0 98/** Line width granularity */ 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/*@}*/ 120 121 122/** 123 * \name Separate numbers of texture coordinates and texture image units. 124 * 125 * These values will eventually replace most instances of MAX_TEXTURE_UNITS. 126 * We should always have MAX_TEXTURE_COORD_UNITS <= MAX_TEXTURE_IMAGE_UNITS. 127 * And, GL_MAX_TEXTURE_UNITS <= MAX_TEXTURE_COORD_UNITS. 128 */ 129/*@{*/ 130#define MAX_TEXTURE_COORD_UNITS 8 131#define MAX_TEXTURE_IMAGE_UNITS 8 132/*@}*/ 133 134/** 135 * Maximum viewport/image width. Must accomodate all texture sizes too. 136 */ 137#define MAX_WIDTH 4096 138/** Maximum viewport/image height */ 139#define MAX_HEIGHT 4096 140 141/** Maxmimum size for CVA. May be overridden by the drivers. */ 142#define MAX_ARRAY_LOCK_SIZE 3000 143 144/** Subpixel precision for antialiasing, window coordinate snapping */ 145#define SUB_PIXEL_BITS 4 146 147/** Size of histogram tables */ 148#define HISTOGRAM_TABLE_SIZE 256 149 150/** Max convolution filter width */ 151#define MAX_CONVOLUTION_WIDTH 9 152/** Max convolution filter height */ 153#define MAX_CONVOLUTION_HEIGHT 9 154 155/** For GL_ARB_texture_compression */ 156#define MAX_COMPRESSED_TEXTURE_FORMATS 25 157 158/** For GL_EXT_texture_filter_anisotropic */ 159#define MAX_TEXTURE_MAX_ANISOTROPY 16.0 160 161/** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */ 162#define MAX_TEXTURE_LOD_BIAS 11.0 163 164/** For GL_NV_vertex_program */ 165/*@{*/ 166#define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128 167#define MAX_NV_VERTEX_PROGRAM_TEMPS 12 168#define MAX_NV_VERTEX_PROGRAM_PARAMS 128 /* KW: power of two */ 169#define MAX_NV_VERTEX_PROGRAM_INPUTS 16 170#define MAX_NV_VERTEX_PROGRAM_OUTPUTS 15 171/*@}*/ 172 173/** For GL_NV_fragment_program */ 174/*@{*/ 175#define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 128 176#define MAX_NV_FRAGMENT_PROGRAM_TEMPS 96 177#define MAX_NV_FRAGMENT_PROGRAM_PARAMS 64 178#define MAX_NV_FRAGMENT_PROGRAM_INPUTS 12 179#define MAX_NV_FRAGMENT_PROGRAM_OUTPUTS 3 180#define MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS 2 181/*@}*/ 182 183/** For GL_ARB_vertex_program */ 184/*@{*/ 185#define MAX_VERTEX_PROGRAM_ADDRESS_REGS 1 186#define MAX_VERTEX_PROGRAM_ATTRIBS 16 187/*@}*/ 188 189/** For GL_ARB_fragment_program */ 190/*@{*/ 191#define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 1 192#define MAX_FRAGMENT_PROGRAM_ALU_INSTRUCTIONS 48 193#define MAX_FRAGMENT_PROGRAM_TEX_INSTRUCTIONS 24 194#define MAX_FRAGMENT_PROGRAM_TEX_INDIRECTIONS 4 195/*@}*/ 196 197/** For any program target/extension */ 198/*@{*/ 199#define MAX_PROGRAM_LOCAL_PARAMS 128 /* KW: power of two */ 200#define MAX_PROGRAM_MATRICES 8 201#define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 202/*@}*/ 203 204/** For GL_ARB_fragment_shader */ 205/*@{*/ 206#define MAX_FRAGMENT_UNIFORM_COMPONENTS 64 207/*@}*/ 208 209/** For GL_ARB_vertex_shader */ 210/*@{*/ 211#define MAX_VERTEX_UNIFORM_COMPONENTS 512 212#define MAX_VARYING_FLOATS 32 213#define MAX_VERTEX_TEXTURE_IMAGE_UNITS 0 214#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS + MAX_VERTEX_TEXTURE_IMAGE_UNITS) 215/*@}*/ 216 217 218/** For GL_ARB_draw_buffers */ 219/*@{*/ 220#define MAX_DRAW_BUFFERS 1 221/*@}*/ 222 223 224/** For GL_EXT_framebuffer_object */ 225/*@{*/ 226#define MAX_COLOR_ATTACHMENTS 8 227/*@}*/ 228 229 230 231/** 232 * \name Mesa-specific parameters 233 */ 234/*@{*/ 235 236 237/** 238 * If non-zero use GLdouble for walking triangle edges, for better accuracy. 239 */ 240#define TRIANGLE_WALK_DOUBLE 0 241 242/** 243 * Bits per accumulation buffer color component: 8, 16 or 32 244 */ 245#define ACCUM_BITS 16 246 247/** 248 * Bits per depth buffer value. 249 * 250 * Any reasonable value up to 31 will work. 32 doesn't work because of integer 251 * overflow problems in the rasterizer code. 252 */ 253#ifndef DEFAULT_SOFTWARE_DEPTH_BITS 254#define DEFAULT_SOFTWARE_DEPTH_BITS 16 255#endif 256/** Depth buffer data type */ 257#if DEFAULT_SOFTWARE_DEPTH_BITS <= 16 258#define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort 259#else 260#define DEFAULT_SOFTWARE_DEPTH_TYPE GLuint 261#endif 262 263 264/** 265 * Bits per stencil value: 8 266 */ 267#define STENCIL_BITS 8 268 269 270/** 271 * Bits per color channel: 8, 16 or 32 272 */ 273#ifndef CHAN_BITS 274#define CHAN_BITS 8 275#endif 276 277 278/* 279 * Color channel component order 280 * 281 * \note Changes will almost certainly cause problems at this time. 282 */ 283#define RCOMP 0 284#define GCOMP 1 285#define BCOMP 2 286#define ACOMP 3 287 288 289/* 290 * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1. 291 */ 292#ifndef _HAVE_FULL_GL 293#define _HAVE_FULL_GL 1 294#endif 295 296#define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL 297#define FEATURE_ARB_vertex_program _HAVE_FULL_GL 298#define FEATURE_ARB_fragment_program _HAVE_FULL_GL 299#define FEATURE_ARB_occlusion_query _HAVE_FULL_GL 300#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL 301#define FEATURE_MESA_program_debug _HAVE_FULL_GL 302#define FEATURE_NV_fence _HAVE_FULL_GL 303#define FEATURE_NV_fragment_program _HAVE_FULL_GL 304#define FEATURE_NV_vertex_program _HAVE_FULL_GL 305#define FEATURE_userclip _HAVE_FULL_GL 306#define FEATURE_texgen _HAVE_FULL_GL 307#define FEATURE_windowpos _HAVE_FULL_GL 308#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL 309#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL 310#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader) 311#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects 312#define FEATURE_ATI_fragment_shader _HAVE_FULL_GL 313#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL 314/*@}*/ 315 316 317/** 318 * Maximum number of temporary vertices required for clipping. 319 * 320 * Used in array_cache and tnl modules. 321 */ 322#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1) 323 324 325/* XXX these are temporary */ 326#define NEW_RENDERBUFFER 1 327#define OLD_RENDERBUFFER 1 328 329 330#endif /* CONFIG_H */ 331