Minor r200 vertex program cleanups. Remove disabled leftovers from r300 vertex progra...
[mesa.git] / src / mesa / drivers / dri / i965 / brw_attrib.h
1 /*
2 Copyright (C) Intel Corp. 2006. All Rights Reserved.
3 Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
4 develop this 3D driver.
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files (the
8 "Software"), to deal in the Software without restriction, including
9 without limitation the rights to use, copy, modify, merge, publish,
10 distribute, sublicense, and/or sell copies of the Software, and to
11 permit persons to whom the Software is furnished to do so, subject to
12 the following conditions:
13
14 The above copyright notice and this permission notice (including the
15 next paragraph) shall be included in all copies or substantial
16 portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
22 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26 **********************************************************************/
27 /*
28 * Authors:
29 * Keith Whitwell <keith@tungstengraphics.com>
30 */
31
32 #ifndef BRW_ATTRIB_H
33 #define BRW_ATTRIB_H
34
35
36 /*
37 * Note: The first attributes match the VERT_ATTRIB_* definitions
38 * in mtypes.h. However, the tnl module has additional attributes
39 * for materials, color indexes, edge flags, etc.
40 */
41 /* Although it's nice to use these as bit indexes in a DWORD flag, we
42 * could manage without if necessary. Another limit currently is the
43 * number of bits allocated for these numbers in places like vertex
44 * program instruction formats and register layouts.
45 */
46 enum {
47 BRW_ATTRIB_POS = 0,
48 BRW_ATTRIB_WEIGHT = 1,
49 BRW_ATTRIB_NORMAL = 2,
50 BRW_ATTRIB_COLOR0 = 3,
51 BRW_ATTRIB_COLOR1 = 4,
52 BRW_ATTRIB_FOG = 5,
53 BRW_ATTRIB_SIX = 6,
54 BRW_ATTRIB_SEVEN = 7,
55 BRW_ATTRIB_TEX0 = 8,
56 BRW_ATTRIB_TEX1 = 9,
57 BRW_ATTRIB_TEX2 = 10,
58 BRW_ATTRIB_TEX3 = 11,
59 BRW_ATTRIB_TEX4 = 12,
60 BRW_ATTRIB_TEX5 = 13,
61 BRW_ATTRIB_TEX6 = 14,
62 BRW_ATTRIB_TEX7 = 15,
63 BRW_ATTRIB_MAT_FRONT_AMBIENT = 16,
64 BRW_ATTRIB_MAT_BACK_AMBIENT = 17,
65 BRW_ATTRIB_MAT_FRONT_DIFFUSE = 18,
66 BRW_ATTRIB_MAT_BACK_DIFFUSE = 19,
67 BRW_ATTRIB_MAT_FRONT_SPECULAR = 20,
68 BRW_ATTRIB_MAT_BACK_SPECULAR = 21,
69 BRW_ATTRIB_MAT_FRONT_EMISSION = 22,
70 BRW_ATTRIB_MAT_BACK_EMISSION = 23,
71 BRW_ATTRIB_MAT_FRONT_SHININESS = 24,
72 BRW_ATTRIB_MAT_BACK_SHININESS = 25,
73 BRW_ATTRIB_MAT_FRONT_INDEXES = 26,
74 BRW_ATTRIB_MAT_BACK_INDEXES = 27,
75 BRW_ATTRIB_INDEX = 28,
76 BRW_ATTRIB_EDGEFLAG = 29,
77
78 BRW_ATTRIB_MAX = 30
79 } ;
80
81 #define BRW_ATTRIB_FIRST_MATERIAL BRW_ATTRIB_MAT_FRONT_AMBIENT
82
83 /* Will probably have to revise this scheme fairly shortly, eg. by
84 * compacting all the MAT flags down to one bit, or by using two
85 * dwords to store the flags.
86 */
87 #define BRW_BIT_POS (1<<0)
88 #define BRW_BIT_WEIGHT (1<<1)
89 #define BRW_BIT_NORMAL (1<<2)
90 #define BRW_BIT_COLOR0 (1<<3)
91 #define BRW_BIT_COLOR1 (1<<4)
92 #define BRW_BIT_FOG (1<<5)
93 #define BRW_BIT_SIX (1<<6)
94 #define BRW_BIT_SEVEN (1<<7)
95 #define BRW_BIT_TEX0 (1<<8)
96 #define BRW_BIT_TEX1 (1<<9)
97 #define BRW_BIT_TEX2 (1<<10)
98 #define BRW_BIT_TEX3 (1<<11)
99 #define BRW_BIT_TEX4 (1<<12)
100 #define BRW_BIT_TEX5 (1<<13)
101 #define BRW_BIT_TEX6 (1<<14)
102 #define BRW_BIT_TEX7 (1<<15)
103 #define BRW_BIT_MAT_FRONT_AMBIENT (1<<16)
104 #define BRW_BIT_MAT_BACK_AMBIENT (1<<17)
105 #define BRW_BIT_MAT_FRONT_DIFFUSE (1<<18)
106 #define BRW_BIT_MAT_BACK_DIFFUSE (1<<19)
107 #define BRW_BIT_MAT_FRONT_SPECULAR (1<<20)
108 #define BRW_BIT_MAT_BACK_SPECULAR (1<<21)
109 #define BRW_BIT_MAT_FRONT_EMISSION (1<<22)
110 #define BRW_BIT_MAT_BACK_EMISSION (1<<23)
111 #define BRW_BIT_MAT_FRONT_SHININESS (1<<24)
112 #define BRW_BIT_MAT_BACK_SHININESS (1<<25)
113 #define BRW_BIT_MAT_FRONT_INDEXES (1<<26)
114 #define BRW_BIT_MAT_BACK_INDEXES (1<<27)
115 #define BRW_BIT_INDEX (1<<28)
116 #define BRW_BIT_EDGEFLAG (1<<29)
117
118
119 #define BRW_MAX_COPIED_VERTS 3
120
121 #endif