config.h revision 86a4810b09097714942bf2b889e6c62357bba931
16dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
26dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \file config.h
36dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * Tunable configuration parameters.
46dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell */
56dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
6afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg/*
7afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * Mesa 3-D graphics library
8009ddb4e509f7dd39a17408332c6b0eff47a16feBrian * Version:  7.1
922144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
10009ddb4e509f7dd39a17408332c6b0eff47a16feBrian * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
1122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
12afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * Permission is hereby granted, free of charge, to any person obtaining a
13afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * copy of this software and associated documentation files (the "Software"),
14afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * to deal in the Software without restriction, including without limitation
15afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * and/or sell copies of the Software, and to permit persons to whom the
17afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * Software is furnished to do so, subject to the following conditions:
1822144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
19afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * The above copyright notice and this permission notice shall be included
20afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * in all copies or substantial portions of the Software.
2122144ab7552f0799bcfca506bf4ffa7f70a06649Gareth Hughes *
22afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
25afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg */
29afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
30afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
31d00ef005fedb21a1b42c0a12264433089b7a10c5Brian Paul#ifndef MESA_CONFIG_H_INCLUDED
32d00ef005fedb21a1b42c0a12264433089b7a10c5Brian Paul#define MESA_CONFIG_H_INCLUDED
33afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
346dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
356dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \name OpenGL implementation limits
36afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg */
376dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@{*/
38afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
396dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum modelview matrix stack depth */
40afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_MODELVIEW_STACK_DEPTH 32
41afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
426dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum projection matrix stack depth */
43afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_PROJECTION_STACK_DEPTH 32
44afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
456dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum texture matrix stack depth */
46afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_TEXTURE_STACK_DEPTH 10
47afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
486dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum color matrix stack depth */
49250069dbb443f26f4dcc409c9c873019a5f50f9dBrian Paul#define MAX_COLOR_STACK_DEPTH 4
50250069dbb443f26f4dcc409c9c873019a5f50f9dBrian Paul
516dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum attribute stack depth */
52afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_ATTRIB_STACK_DEPTH 16
53afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
546dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum client attribute stack depth */
55afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
56afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
576dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum recursion depth of display list calls */
58afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_LIST_NESTING 64
59afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
606dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum number of lights */
61afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_LIGHTS 8
62afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
636dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum user-defined clipping planes */
64afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_CLIP_PLANES 6
65afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
666dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum pixel map lookup table size */
67afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_PIXEL_MAP_TABLE 256
68afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
69e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul/** Maximum number of auxillary color buffers */
70894844a8d956a0ee5f95836331dc318f49fdb845Brian Paul#define MAX_AUX_BUFFERS 4
71afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
726dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum order (degree) of curves */
73afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#ifdef AMIGA
74afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#   define MAX_EVAL_ORDER 12
75afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#else
76afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#   define MAX_EVAL_ORDER 30
77afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#endif
78afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
796dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum Name stack depth */
80afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_NAME_STACK_DEPTH 64
81afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
826dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Minimum point size */
83afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MIN_POINT_SIZE 1.0
846dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum point size */
851a55e97c9c1734f0808e4ed570be3826dba24417Brian#define MAX_POINT_SIZE 60.0
866dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Point size granularity */
87afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define POINT_SIZE_GRANULARITY 0.1
88afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
896dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Minimum line width */
90afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MIN_LINE_WIDTH 1.0
916dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum line width */
92afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_LINE_WIDTH 10.0
936dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Line width granularity */
9465cd4d80c4093e44e6a340b41e7bae3489b7ea4aBrian Paul#define LINE_WIDTH_GRANULARITY 0.1
95afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
966dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Max texture palette / color table size */
9713811376c99addb0616c9397cc7d5715befcd8d4Brian Paul#define MAX_COLOR_TABLE_SIZE 256
98afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
996dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Number of 1D/2D texture mipmap levels */
100afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_TEXTURE_LEVELS 12
101afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
1026dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Number of 3D texture mipmap levels */
103738318bb75dea8dac4465f53850987f6062a732dBrian Paul#define MAX_3D_TEXTURE_LEVELS 9
104cd1cefae9146fc14b35ee93a04bdb1b1590fba7bBrian Paul
1056dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Number of cube texture mipmap levels - GL_ARB_texture_cube_map */
106cd1cefae9146fc14b35ee93a04bdb1b1590fba7bBrian Paul#define MAX_CUBE_TEXTURE_LEVELS 12
107cd1cefae9146fc14b35ee93a04bdb1b1590fba7bBrian Paul
1086dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum rectangular texture size - GL_NV_texture_rectangle */
1098afe7de8deaf3c9613fd68b344de8c52b02b1879Brian Paul#define MAX_TEXTURE_RECT_SIZE 2048
1108afe7de8deaf3c9613fd68b344de8c52b02b1879Brian Paul
111bb372f1c9bc08e8b0dca983cb4ba36b2f2f039fbIan Romanick/** Maximum number of layers in a 1D or 2D array texture - GL_MESA_texture_array */
112bb372f1c9bc08e8b0dca983cb4ba36b2f2f039fbIan Romanick#define MAX_ARRAY_TEXTURE_LAYERS 64
113bb372f1c9bc08e8b0dca983cb4ba36b2f2f039fbIan Romanick
114da238ee06a8d169eb590aa5e50998136f1b5aba5Brian Paul/** Number of texture units - GL_ARB_multitexture
115da238ee06a8d169eb590aa5e50998136f1b5aba5Brian Paul * This needs to be the larger of MAX_TEXTURE_COORD_UNITS and
116da238ee06a8d169eb590aa5e50998136f1b5aba5Brian Paul * MAX_TEXTURE_IMAGE_UNITS seen below, since MAX_TEXTURE_UNITS is used
117da238ee06a8d169eb590aa5e50998136f1b5aba5Brian Paul * to dimension some arrays that store both coord and image data.
118da238ee06a8d169eb590aa5e50998136f1b5aba5Brian Paul*/
11988f3b89a2cb77766d2009b9868c44e03abe2dbb2Keith Whitwell#define MAX_TEXTURE_UNITS 8
120afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
121de4b3bb7766f242cd7c46841250405f5fd6bb7d3Brian Paul/*@}*/
122de4b3bb7766f242cd7c46841250405f5fd6bb7d3Brian Paul
123de4b3bb7766f242cd7c46841250405f5fd6bb7d3Brian Paul
1246dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
1256dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \name Separate numbers of texture coordinates and texture image units.
1266dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell *
127610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul * These values will eventually replace most instances of MAX_TEXTURE_UNITS.
128610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul * We should always have MAX_TEXTURE_COORD_UNITS <= MAX_TEXTURE_IMAGE_UNITS.
129610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul * And, GL_MAX_TEXTURE_UNITS <= MAX_TEXTURE_COORD_UNITS.
130610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul */
1316dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@{*/
132610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul#define MAX_TEXTURE_COORD_UNITS 8
133610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul#define MAX_TEXTURE_IMAGE_UNITS 8
1346dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@}*/
135610d59981a9f43fefe29b34ef19c184d28e2bef5Brian Paul
1366dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
1376dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * Maximum viewport/image width. Must accomodate all texture sizes too.
1386dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell */
1398533b915437464f335f52bfacf93292098f64f4dBrian Paul#define MAX_WIDTH 4096
1406dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maximum viewport/image height */
1418533b915437464f335f52bfacf93292098f64f4dBrian Paul#define MAX_HEIGHT 4096
142afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
1436dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Maxmimum size for CVA.  May be overridden by the drivers.  */
144afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define MAX_ARRAY_LOCK_SIZE 3000
145afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
1466dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Subpixel precision for antialiasing, window coordinate snapping */
14765cd4d80c4093e44e6a340b41e7bae3489b7ea4aBrian Paul#define SUB_PIXEL_BITS 4
14865cd4d80c4093e44e6a340b41e7bae3489b7ea4aBrian Paul
1496dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Size of histogram tables */
1500771d159d59a856135e375ba89f6af2a057d4f5bBrian Paul#define HISTOGRAM_TABLE_SIZE 256
1510771d159d59a856135e375ba89f6af2a057d4f5bBrian Paul
1526dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Max convolution filter width */
153a6d46f6b9922327fe9a268b003134a27ba8b931fBrian Paul#define MAX_CONVOLUTION_WIDTH 9
1546dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Max convolution filter height */
155a6d46f6b9922327fe9a268b003134a27ba8b931fBrian Paul#define MAX_CONVOLUTION_HEIGHT 9
156afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
15784b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/** For GL_ARB_texture_compression */
1581207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul#define MAX_COMPRESSED_TEXTURE_FORMATS 25
1591207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul
16084b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/** For GL_EXT_texture_filter_anisotropic */
1612c3d34c905fa6b831a066afae83b938de05eb241Gareth Hughes#define MAX_TEXTURE_MAX_ANISOTROPY 16.0
1622c3d34c905fa6b831a066afae83b938de05eb241Gareth Hughes
1637a5eb9a7606bd951cb9cba56b0ff96c121084d44Brian Paul/** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */
1647a5eb9a7606bd951cb9cba56b0ff96c121084d44Brian Paul#define MAX_TEXTURE_LOD_BIAS 11.0
16587c964d3885d84959f86d5d7d9c4358240b6da3cBrian Paul
16684b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/** For GL_ARB_vertex_program */
16784b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/*@{*/
168451f31093e950e2c76e8d7dee3cb097049a906b5Brian Paul#define MAX_VERTEX_PROGRAM_ADDRESS_REGS 1
1699bc3753a513f2045f3613389c2ddb604df8693e7Karl Rasche#define MAX_VERTEX_PROGRAM_ATTRIBS     16
17084b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/*@}*/
171451f31093e950e2c76e8d7dee3cb097049a906b5Brian Paul
17284b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/** For GL_ARB_fragment_program */
17384b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/*@{*/
17405051037101dfa053798cf5ad91d1975fd1aa6a7Brian Paul#define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 0
175451f31093e950e2c76e8d7dee3cb097049a906b5Brian Paul#define MAX_FRAGMENT_PROGRAM_ALU_INSTRUCTIONS 48
176451f31093e950e2c76e8d7dee3cb097049a906b5Brian Paul#define MAX_FRAGMENT_PROGRAM_TEX_INSTRUCTIONS 24
177451f31093e950e2c76e8d7dee3cb097049a906b5Brian Paul#define MAX_FRAGMENT_PROGRAM_TEX_INDIRECTIONS  4
17884b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/*@}*/
1791207bf057aeea3376e5e0f03f789a5d67ed4d29dBrian Paul
18084b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/** For any program target/extension */
18184b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/*@{*/
1826a13c7da4c79f7e811fbddc68f59441070ff0cc8Keith Whitwell#define MAX_PROGRAM_LOCAL_PARAMS 128 /* KW: power of two */
183b7aeac0de1c9c533f78c5d6acf358bdc206161abBrian#define MAX_PROGRAM_ENV_PARAMS 128
184edd677454dc38a590bd6fc1cd3e2759d2a4d55e3Brian Paul#define MAX_PROGRAM_MATRICES 8
185edd677454dc38a590bd6fc1cd3e2759d2a4d55e3Brian Paul#define MAX_PROGRAM_MATRIX_STACK_DEPTH 4
1863dedeaa0557f17770f6ab7f163dcdde8e93609b8Brian Paul#define MAX_PROGRAM_CALL_DEPTH 8
187a90046f1097ad95de2aa95ca65741dff5cddced9Brian#define MAX_PROGRAM_TEMPS 128
188b85d4d61a7f93a9f2d58a1d701808584e0fce8c7Brian#define MAX_PROGRAM_ADDRESS_REGS 2
189a90046f1097ad95de2aa95ca65741dff5cddced9Brian#define MAX_UNIFORMS 128
190a90046f1097ad95de2aa95ca65741dff5cddced9Brian#define MAX_VARYING 8
191efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul/*@}*/
192efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul
19386a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger/** For GL_NV_vertex_program */
19486a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger/*@{*/
19586a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128
19686a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_VERTEX_PROGRAM_TEMPS         12
19786a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_VERTEX_PROGRAM_PARAMS        MAX_PROGRAM_ENV_PARAMS
19886a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_VERTEX_PROGRAM_INPUTS        16
19986a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_VERTEX_PROGRAM_OUTPUTS       15
20086a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger/*@}*/
20186a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger
20286a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger/** For GL_NV_fragment_program */
20386a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger/*@{*/
20486a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 1024 /* 72 for GL_ARB_f_p */
20586a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_FRAGMENT_PROGRAM_TEMPS         96
20686a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_FRAGMENT_PROGRAM_PARAMS        64
20786a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_FRAGMENT_PROGRAM_INPUTS        12
20886a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_FRAGMENT_PROGRAM_OUTPUTS        3
20986a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger#define MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS    2
21086a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger/*@}*/
21186a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger
21286a4810b09097714942bf2b889e6c62357bba931Roland Scheidegger
213efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul/** For GL_ARB_vertex_shader */
214efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul/*@{*/
215ae76be49eb4954a691b765077fc77875964b37e1Michal Krol#define MAX_VERTEX_ATTRIBS 16
216efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul#define MAX_VERTEX_TEXTURE_IMAGE_UNITS 0
217efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_TEXTURE_IMAGE_UNITS + MAX_VERTEX_TEXTURE_IMAGE_UNITS)
21884b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul/*@}*/
219edd677454dc38a590bd6fc1cd3e2759d2a4d55e3Brian Paul
220edd677454dc38a590bd6fc1cd3e2759d2a4d55e3Brian Paul
22153f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul/** For GL_ARB_draw_buffers */
22253f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul/*@{*/
2231c09bcfdda4083636a3ac27d804a34ef87875ce7Brian#define MAX_DRAW_BUFFERS 4
22453f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul/*@}*/
22553f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul
22653f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul
2273deaa01c2bd576ae81fc6d3ea67c583cb3c22159Brian Paul/** For GL_EXT_framebuffer_object */
2283deaa01c2bd576ae81fc6d3ea67c583cb3c22159Brian Paul/*@{*/
229e4b2356c07d31fbeeabb13b2fb47db703b473080Brian Paul#define MAX_COLOR_ATTACHMENTS 8
2303deaa01c2bd576ae81fc6d3ea67c583cb3c22159Brian Paul/*@}*/
2313deaa01c2bd576ae81fc6d3ea67c583cb3c22159Brian Paul
2323deaa01c2bd576ae81fc6d3ea67c583cb3c22159Brian Paul
23353f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul
2346dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
2356dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \name Mesa-specific parameters
236afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg */
2376dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/*@{*/
238afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
239afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
2406dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
24184b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul * If non-zero use GLdouble for walking triangle edges, for better accuracy.
24284b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul */
24384b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul#define TRIANGLE_WALK_DOUBLE 0
24484b4a3a087a1475d4e9bd713e4bae91ba6363a50Brian Paul
245afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
2466dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
247009ddb4e509f7dd39a17408332c6b0eff47a16feBrian * Bits per depth buffer value (max is 32).
248fbd8f212c3866ec98c1d8c9d3db3ddb7e7c479a5Brian Paul */
249a1503b00f863a48a517939a42d512f9cfe77f79cBrian Paul#ifndef DEFAULT_SOFTWARE_DEPTH_BITS
250ed30dfa1264ec8875a3162c3c8778bc703bf11d5Brian Paul#define DEFAULT_SOFTWARE_DEPTH_BITS 16
251a1503b00f863a48a517939a42d512f9cfe77f79cBrian Paul#endif
2526dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/** Depth buffer data type */
25366202b75d561b2275022bea8b5936a7482c1c315Brian Paul#if DEFAULT_SOFTWARE_DEPTH_BITS <= 16
254ed30dfa1264ec8875a3162c3c8778bc703bf11d5Brian Paul#define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort
25566202b75d561b2275022bea8b5936a7482c1c315Brian Paul#else
25666202b75d561b2275022bea8b5936a7482c1c315Brian Paul#define DEFAULT_SOFTWARE_DEPTH_TYPE GLuint
25766202b75d561b2275022bea8b5936a7482c1c315Brian Paul#endif
258ed30dfa1264ec8875a3162c3c8778bc703bf11d5Brian Paul
259afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
2606dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
2616dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * Bits per stencil value: 8
262afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg */
263afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define STENCIL_BITS 8
264afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
265afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
2666dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell/**
267d8af040f5eb2dd2e40339b83a02f4a42b64619adBrian Paul * Bits per color channel:  8, 16 or 32
268afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg */
269785c3469f45ef4b96f2622cd1575229a1fd9d250Brian Paul#ifndef CHAN_BITS
270afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define CHAN_BITS 8
271785c3469f45ef4b96f2622cd1575229a1fd9d250Brian Paul#endif
272afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
273afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
274afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg/*
275afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg * Color channel component order
2766dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell *
2776dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell * \note Changes will almost certainly cause problems at this time.
278afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg */
279afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define RCOMP 0
280afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define GCOMP 1
281afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define BCOMP 2
282afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg#define ACOMP 3
283afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1cjtg
2848dfc5b9863f08a713177fd92847573e17febbac9Brian Paul
2858dfc5b9863f08a713177fd92847573e17febbac9Brian Paul/*
2868dfc5b9863f08a713177fd92847573e17febbac9Brian Paul * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1.
2878dfc5b9863f08a713177fd92847573e17febbac9Brian Paul */
2886dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#ifndef _HAVE_FULL_GL
2896dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#define _HAVE_FULL_GL 1
2906dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell#endif
2916dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
292978646d86fd19c0f564b01a469ffe0432fc5ab98Brian Paul#define FEATURE_userclip  _HAVE_FULL_GL
293978646d86fd19c0f564b01a469ffe0432fc5ab98Brian Paul#define FEATURE_texgen  _HAVE_FULL_GL
294978646d86fd19c0f564b01a469ffe0432fc5ab98Brian Paul#define FEATURE_windowpos  _HAVE_FULL_GL
295c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_ARB_occlusion_query  _HAVE_FULL_GL
296c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_ARB_fragment_program  _HAVE_FULL_GL
297c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_ARB_vertex_buffer_object  _HAVE_FULL_GL
298c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_ARB_vertex_program  _HAVE_FULL_GL
299c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul
3002f11cbd15bed4422d96b3c6809f7bb13c670d043Michal Krol#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL
3012f11cbd15bed4422d96b3c6809f7bb13c670d043Michal Krol#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL
302efb41b07ff213735e8ea08f38a7799f9d80459fcBrian Paul#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
3035c968cbc5e1d355a362018defde7ebe926dd1f65Michal Krol#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
304af807a4696866a4ee08bb2a4e95b9c02011db530Brian#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects
305c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul
3060bffb1192a599b11af11604ad590f6a50c054bf1Brian Paul#define FEATURE_EXT_framebuffer_blit _HAVE_FULL_GL
307c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL
308c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_EXT_pixel_buffer_object  _HAVE_FULL_GL
3098d214bc8044e5027e3fa9302b259d0c557270b00Brian Paul#define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL
310c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_EXT_timer_query  _HAVE_FULL_GL
311c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_ATI_fragment_shader _HAVE_FULL_GL
312c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_MESA_program_debug  _HAVE_FULL_GL
313c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_NV_fence  _HAVE_FULL_GL
314c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_NV_fragment_program  _HAVE_FULL_GL
315c1c282f36ad31f99b9d5b38a2d39118740bca928Brian Paul#define FEATURE_NV_vertex_program  _HAVE_FULL_GL
316978646d86fd19c0f564b01a469ffe0432fc5ab98Brian Paul/*@}*/
317978646d86fd19c0f564b01a469ffe0432fc5ab98Brian Paul
3186dc85575000127630489b407c50a4b3ea87c9acbKeith Whitwell
31953f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul/**
32053f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul * Maximum number of temporary vertices required for clipping.
32153f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul *
32253f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul * Used in array_cache and tnl modules.
32353f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul */
32453f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1)
32553f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul
32653f82c5aadbb15585754bfacf3237093eccdb2ceBrian Paul
327d00ef005fedb21a1b42c0a12264433089b7a10c5Brian Paul#endif /* MESA_CONFIG_H_INCLUDED */
328