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