llvmpipe: twoside for specular color also
[mesa.git] / src / mesa / drivers / dri / i965 / intel_structs.h
1 #ifndef INTEL_STRUCTS_H
2 #define INTEL_STRUCTS_H
3
4 struct br0 {
5 GLuint length:8;
6 GLuint pad0:3;
7 GLuint dst_tiled:1;
8 GLuint pad1:8;
9 GLuint write_rgb:1;
10 GLuint write_alpha:1;
11 GLuint opcode:7;
12 GLuint client:3;
13 };
14
15
16 struct br13 {
17 GLint dest_pitch:16;
18 GLuint rop:8;
19 GLuint color_depth:2;
20 GLuint pad1:3;
21 GLuint mono_source_transparency:1;
22 GLuint clipping_enable:1;
23 GLuint pad0:1;
24 };
25
26
27
28 /* This is an attempt to move some of the 2D interaction in this
29 * driver to using structs for packets rather than a bunch of #defines
30 * and dwords.
31 */
32 struct xy_color_blit {
33 struct br0 br0;
34 struct br13 br13;
35
36 struct {
37 GLuint dest_x1:16;
38 GLuint dest_y1:16;
39 } dw2;
40
41 struct {
42 GLuint dest_x2:16;
43 GLuint dest_y2:16;
44 } dw3;
45
46 GLuint dest_base_addr;
47 GLuint color;
48 };
49
50 struct xy_src_copy_blit {
51 struct br0 br0;
52 struct br13 br13;
53
54 struct {
55 GLuint dest_x1:16;
56 GLuint dest_y1:16;
57 } dw2;
58
59 struct {
60 GLuint dest_x2:16;
61 GLuint dest_y2:16;
62 } dw3;
63
64 GLuint dest_base_addr;
65
66 struct {
67 GLuint src_x1:16;
68 GLuint src_y1:16;
69 } dw5;
70
71 struct {
72 GLint src_pitch:16;
73 GLuint pad:16;
74 } dw6;
75
76 GLuint src_base_addr;
77 };
78
79 struct xy_setup_blit {
80 struct br0 br0;
81 struct br13 br13;
82
83 struct {
84 GLuint clip_x1:16;
85 GLuint clip_y1:16;
86 } dw2;
87
88 struct {
89 GLuint clip_x2:16;
90 GLuint clip_y2:16;
91 } dw3;
92
93 GLuint dest_base_addr;
94 GLuint background_color;
95 GLuint foreground_color;
96 GLuint pattern_base_addr;
97 };
98
99
100 struct xy_text_immediate_blit {
101 struct {
102 GLuint length:8;
103 GLuint pad2:3;
104 GLuint dst_tiled:1;
105 GLuint pad1:4;
106 GLuint byte_packed:1;
107 GLuint pad0:5;
108 GLuint opcode:7;
109 GLuint client:3;
110 } dw0;
111
112 struct {
113 GLuint dest_x1:16;
114 GLuint dest_y1:16;
115 } dw1;
116
117 struct {
118 GLuint dest_x2:16;
119 GLuint dest_y2:16;
120 } dw2;
121
122 /* Src bitmap data follows as inline dwords.
123 */
124 };
125
126
127 #define CLIENT_2D 0x2
128 #define OPCODE_XY_SETUP_BLT 0x1
129 #define OPCODE_XY_COLOR_BLT 0x50
130 #define OPCODE_XY_TEXT_IMMEDIATE_BLT 0x31
131
132 #endif