2 * Copyright (C) 2008-2010 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * Richard Li <RichardZ.Li@amd.com>, <richardradeon@gmail.com>
27 #ifndef _EVERGREEN_CHIP_H_
28 #define _EVERGREEN_CHIP_H_
30 #include "r700_chip.h"
32 #define EVERGREEN_MAX_DX9_CONSTS 256
33 #define EVERGREEN_MAX_SHADER_EXPORTS 32
34 #define EVERGREEN_MAX_VIEWPORTS 16
36 typedef struct _EVERGREEN_VIEWPORT_STATE
38 union UINT_FLOAT PA_SC_VPORT_SCISSOR_0_TL; ////0,1 // = 0x28250, // DIFF
39 union UINT_FLOAT PA_SC_VPORT_SCISSOR_0_BR; ////0,1 // = 0x28254, // DIFF
40 union UINT_FLOAT PA_SC_VPORT_ZMIN_0; ////0 // = 0x282D0, // SAME
41 union UINT_FLOAT PA_SC_VPORT_ZMAX_0; ////0 // = 0x282D4, // SAME
42 union UINT_FLOAT PA_CL_VPORT_XSCALE; //// // = 0x2843C, // SAME
43 union UINT_FLOAT PA_CL_VPORT_XOFFSET; //// // = 0x28440, // SAME
44 union UINT_FLOAT PA_CL_VPORT_YSCALE; //// // = 0x28444, // SAME
45 union UINT_FLOAT PA_CL_VPORT_YOFFSET; //// // = 0x28448, // SAME
46 union UINT_FLOAT PA_CL_VPORT_ZSCALE; //// // = 0x2844C, // SAME
47 union UINT_FLOAT PA_CL_VPORT_ZOFFSET; //// // = 0x28450, // SAME
50 } EVERGREEN_VIEWPORT_STATE;
52 #define EVERGREEN_MAX_UCP 6
54 typedef struct _EVERGREEN_UCP_STATE
56 union UINT_FLOAT PA_CL_UCP_0_X; // = 0x285BC, // SAME 0x28E20
57 union UINT_FLOAT PA_CL_UCP_0_Y; // = 0x285C0, // SAME 0x28E24
58 union UINT_FLOAT PA_CL_UCP_0_Z; // = 0x285C4, // SAME 0x28E28
59 union UINT_FLOAT PA_CL_UCP_0_W; // = 0x285C8, // SAME 0x28E2C
62 } EVERGREEN_UCP_STATE;
64 #define EVERGREEN_MAX_RENDER_TARGETS 12
66 typedef struct _EVERGREEN_RENDER_TARGET_STATE
68 union UINT_FLOAT CB_COLOR0_BASE; ////0 // = 0x28C60, // SAME 0x28040
69 union UINT_FLOAT CB_COLOR0_PITCH; ////0 // = 0x28C64, //
70 union UINT_FLOAT CB_COLOR0_SLICE; ////0 // = 0x28C68, //
71 union UINT_FLOAT CB_COLOR0_VIEW; ////0 // = 0x28C6C, // SAME 0x28080
72 union UINT_FLOAT CB_COLOR0_INFO; ////0,1,2,3,4,5,6,78,9,10,11 // = 0x28C70, // DIFF 0x280A0
73 union UINT_FLOAT CB_COLOR0_ATTRIB; ////0 // = 0x28C74, //
74 union UINT_FLOAT CB_COLOR0_DIM; // = 0x28C78, //
75 union UINT_FLOAT CB_COLOR0_CMASK; ////0 // = 0x28C7C, //
76 union UINT_FLOAT CB_COLOR0_CMASK_SLICE; ////0 // = 0x28C80, //
77 union UINT_FLOAT CB_COLOR0_FMASK; ////0 // = 0x28C84, //
78 union UINT_FLOAT CB_COLOR0_FMASK_SLICE; ////0 // = 0x28C88, //
79 union UINT_FLOAT CB_COLOR0_CLEAR_WORD0; // = 0x28C8C, //
80 union UINT_FLOAT CB_COLOR0_CLEAR_WORD1; // = 0x28C90, //
81 union UINT_FLOAT CB_COLOR0_CLEAR_WORD2; // = 0x28C94, //
82 union UINT_FLOAT CB_COLOR0_CLEAR_WORD3; // = 0x28C98, //
85 } EVERGREEN_RENDER_TARGET_STATE;
87 typedef struct _EVERGREEN_CONFIG
89 union UINT_FLOAT SPI_CONFIG_CNTL; // = 0x9100, // DIFF
90 union UINT_FLOAT SPI_CONFIG_CNTL_1; // = 0x913C, // DIFF
91 union UINT_FLOAT CP_PERFMON_CNTL; // = 0x87FC, // SAME
92 union UINT_FLOAT SQ_MS_FIFO_SIZES; // = 0x8CF0, // SAME
94 union UINT_FLOAT SQ_CONFIG; // = 0x8C00, // DIFF
95 union UINT_FLOAT SQ_GPR_RESOURCE_MGMT_1; // = 0x8C04, // SAME
96 union UINT_FLOAT SQ_GPR_RESOURCE_MGMT_2; // = 0x8C08, // SAME
97 union UINT_FLOAT SQ_GPR_RESOURCE_MGMT_3; // = 0x8C0C, //
99 union UINT_FLOAT SQ_THREAD_RESOURCE_MGMT; // = 0x8C18, // SAME 0x8C0C
100 union UINT_FLOAT SQ_THREAD_RESOURCE_MGMT_2; // = 0x8C1C, //
101 union UINT_FLOAT SQ_STACK_RESOURCE_MGMT_1; // = 0x8C20, // SAME 0x8C10
102 union UINT_FLOAT SQ_STACK_RESOURCE_MGMT_2; // = 0x8C24, // SAME 0x8C14
103 union UINT_FLOAT SQ_STACK_RESOURCE_MGMT_3; // = 0x8C28, //
105 union UINT_FLOAT SQ_DYN_GPR_CNTL_PS_FLUSH_REQ; // = 0x8D8C, // DIFF
106 union UINT_FLOAT SQ_LDS_RESOURCE_MGMT; // = 0x8E2C, //
107 union UINT_FLOAT VGT_CACHE_INVALIDATION; // = 0x88C4, // DIFF
108 union UINT_FLOAT VGT_GS_VERTEX_REUSE; // = 0x88D4, // SAME
109 union UINT_FLOAT PA_SC_FORCE_EOV_MAX_CNTS; // = 0x8B24, // SAME
110 union UINT_FLOAT PA_SC_LINE_STIPPLE_STATE; // = 0x8B10, // SAME
111 union UINT_FLOAT PA_CL_ENHANCE; // = 0x8A14, // SAME
114 typedef struct _EVERGREEN_PS_RES
116 union UINT_FLOAT SQ_PGM_START_PS; //// // = 0x28840, // SAME
119 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_0; // = 0x28940, // SAME
120 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_1; // = 0x28944, // SAME
121 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_2; // = 0x28948, // SAME
122 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_3; // = 0x2894C, // SAME
123 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_4; // = 0x28950, // SAME
124 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_5; // = 0x28954, // SAME
125 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_6; // = 0x28958, // SAME
126 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_7; // = 0x2895C, // SAME
127 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_8; // = 0x28960, // SAME
128 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_9; // = 0x28964, // SAME
129 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_10; // = 0x28968, // SAME
130 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_11; // = 0x2896C, // SAME
131 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_12; // = 0x28970, // SAME
132 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_13; // = 0x28974, // SAME
133 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_14; // = 0x28978, // SAME
134 union UINT_FLOAT SQ_ALU_CONST_CACHE_PS_15; // = 0x2897C, // SAME
137 union UINT_FLOAT consts[EVERGREEN_MAX_DX9_CONSTS][4];
140 typedef struct _EVERGREEN_VS_RES
142 union UINT_FLOAT SQ_PGM_START_VS; //// // = 0x2885C, // SAME 0x28858
143 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_VS_0; //// // = 0x28180, //?
144 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_0; //// // = 0x28980, // SAME
146 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_1; // = 0x28984, // SAME
147 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_2; // = 0x28988, // SAME
148 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_3; // = 0x2898C, // SAME
149 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_4; // = 0x28990, // SAME
150 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_5; // = 0x28994, // SAME
151 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_6; // = 0x28998, // SAME
152 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_7; // = 0x2899C, // SAME
153 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_8; // = 0x289A0, // SAME
154 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_9; // = 0x289A4, // SAME
155 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_10; // = 0x289A8, // SAME
156 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_11; // = 0x289AC, // SAME
157 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_12; // = 0x289B0, // SAME
158 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_13; // = 0x289B4, // SAME
159 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_14; // = 0x289B8, // SAME
160 union UINT_FLOAT SQ_ALU_CONST_CACHE_VS_15; // = 0x289BC, // SAME
164 union UINT_FLOAT consts[EVERGREEN_MAX_DX9_CONSTS][4];
167 typedef struct _EVERGREEN_CHIP_CONTEXT
169 /* Registers from PA block: */
170 union UINT_FLOAT PA_SC_SCREEN_SCISSOR_TL; //// // = 0x28030, // DIFF
171 union UINT_FLOAT PA_SC_SCREEN_SCISSOR_BR; //// // = 0x28034, // DIFF
172 union UINT_FLOAT PA_SC_WINDOW_OFFSET; //// // = 0x28200, // DIFF
173 union UINT_FLOAT PA_SC_WINDOW_SCISSOR_TL; //// // = 0x28204, // DIFF
174 union UINT_FLOAT PA_SC_WINDOW_SCISSOR_BR; //// // = 0x28208, // DIFF
175 union UINT_FLOAT PA_SC_CLIPRECT_RULE; //// // = 0x2820C, // SAME
176 union UINT_FLOAT PA_SC_CLIPRECT_0_TL; //// // = 0x28210, // DIFF
177 union UINT_FLOAT PA_SC_CLIPRECT_0_BR; //// // = 0x28214, // DIFF
178 union UINT_FLOAT PA_SC_CLIPRECT_1_TL; //// // = 0x28218, // DIFF
179 union UINT_FLOAT PA_SC_CLIPRECT_1_BR; //// // = 0x2821C, // DIFF
180 union UINT_FLOAT PA_SC_CLIPRECT_2_TL; //// // = 0x28220, // DIFF
181 union UINT_FLOAT PA_SC_CLIPRECT_2_BR; //// // = 0x28224, // DIFF
182 union UINT_FLOAT PA_SC_CLIPRECT_3_TL; //// // = 0x28228, // DIFF
183 union UINT_FLOAT PA_SC_CLIPRECT_3_BR; //// // = 0x2822C, // DIFF
184 union UINT_FLOAT PA_SC_EDGERULE; // = 0x28230, // SAME
185 union UINT_FLOAT PA_SU_HARDWARE_SCREEN_OFFSET; // = 0x28234, //
186 union UINT_FLOAT PA_SC_GENERIC_SCISSOR_TL; //// // = 0x28240, // DIFF
187 union UINT_FLOAT PA_SC_GENERIC_SCISSOR_BR; //// // = 0x28244, // DIFF
189 EVERGREEN_VIEWPORT_STATE viewport[EVERGREEN_MAX_VIEWPORTS];
190 EVERGREEN_UCP_STATE ucp[EVERGREEN_MAX_UCP];
192 union UINT_FLOAT PA_CL_POINT_X_RAD; // = 0x287D4, // SAME 0x28E10
193 union UINT_FLOAT PA_CL_POINT_Y_RAD; // = 0x287D8, // SAME 0x28E14
194 union UINT_FLOAT PA_CL_POINT_SIZE; // = 0x287DC, // SAME 0x28E18
195 union UINT_FLOAT PA_CL_POINT_CULL_RAD; // = 0x287E0, // SAME 0x28E1C
196 union UINT_FLOAT PA_CL_CLIP_CNTL; //// // = 0x28810, // SAME
197 union UINT_FLOAT PA_SU_SC_MODE_CNTL; //// // = 0x28814, // SAME
198 union UINT_FLOAT PA_CL_VTE_CNTL; //// // = 0x28818, // SAME
199 union UINT_FLOAT PA_CL_VS_OUT_CNTL; //// // = 0x2881C, // SAME
200 union UINT_FLOAT PA_CL_NANINF_CNTL; //// // = 0x28820, // SAME
201 union UINT_FLOAT PA_SU_LINE_STIPPLE_CNTL; // = 0x28824, //
202 union UINT_FLOAT PA_SU_LINE_STIPPLE_SCALE; // = 0x28828, //
203 union UINT_FLOAT PA_SU_PRIM_FILTER_CNTL; // = 0x2882C, //
204 union UINT_FLOAT PA_SU_POINT_SIZE; //// // = 0x28A00, // SAME
205 union UINT_FLOAT PA_SU_POINT_MINMAX; //// // = 0x28A04, // SAME
206 union UINT_FLOAT PA_SU_LINE_CNTL; //// // = 0x28A08, // SAME
207 union UINT_FLOAT PA_SC_LINE_STIPPLE; // = 0x28A0C, // SAME
208 union UINT_FLOAT PA_SC_MODE_CNTL_0; //// // = 0x28A48, //
209 union UINT_FLOAT PA_SC_MODE_CNTL_1; //// // = 0x28A4C, //
210 union UINT_FLOAT PA_SU_POLY_OFFSET_DB_FMT_CNTL; //// // = 0x28B78, // SAME 0x28DF8
211 union UINT_FLOAT PA_SU_POLY_OFFSET_CLAMP; //// // = 0x28B7C, // SAME 0x28DFC
212 union UINT_FLOAT PA_SU_POLY_OFFSET_FRONT_SCALE;//// // = 0x28B80, // SAME 0x28E00
213 union UINT_FLOAT PA_SU_POLY_OFFSET_FRONT_OFFSET; //// // = 0x28B84, // SAME 0x28E04
214 union UINT_FLOAT PA_SU_POLY_OFFSET_BACK_SCALE; //// // = 0x28B88, // SAME 0x28E08
215 union UINT_FLOAT PA_SU_POLY_OFFSET_BACK_OFFSET; //// // = 0x28B8C, // SAME 0x28E0C
216 union UINT_FLOAT PA_SC_LINE_CNTL; //// // = 0x28C00, // DIFF
217 union UINT_FLOAT PA_SC_AA_CONFIG; //// // = 0x28C04, // SAME
218 union UINT_FLOAT PA_SU_VTX_CNTL; //// // = 0x28C08, // SAME
219 union UINT_FLOAT PA_CL_GB_VERT_CLIP_ADJ; //// // = 0x28C0C, // SAME
220 union UINT_FLOAT PA_CL_GB_VERT_DISC_ADJ; //// // = 0x28C10, // SAME
221 union UINT_FLOAT PA_CL_GB_HORZ_CLIP_ADJ; //// // = 0x28C14, // SAME
222 union UINT_FLOAT PA_CL_GB_HORZ_DISC_ADJ; //// // = 0x28C18, // SAME
223 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_0; //// // = 0x28C1C, //
224 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_1; //// // = 0x28C20, //
225 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_2; //// // = 0x28C24, //
226 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_3; //// // = 0x28C28, //
227 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_4; //// // = 0x28C2C, //
228 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_5; //// // = 0x28C30, //
229 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_6; //// // = 0x28C34, //
230 union UINT_FLOAT PA_SC_AA_SAMPLE_LOCS_7; //// // = 0x28C38, //
231 union UINT_FLOAT PA_SC_AA_MASK; //// // = 0x28C3C, // SAME 0x28C48
233 /* Registers from VGT block: */
234 union UINT_FLOAT VGT_INDEX_TYPE; // = 0x895C, // SAME
235 union UINT_FLOAT VGT_PRIMITIVE_TYPE; // = 0x8958, // SAME
236 union UINT_FLOAT VGT_MAX_VTX_INDX; //// // = 0x28400, // SAME
237 union UINT_FLOAT VGT_MIN_VTX_INDX; //// // = 0x28404, // SAME
238 union UINT_FLOAT VGT_INDX_OFFSET; //// // = 0x28408, // SAME
239 union UINT_FLOAT VGT_MULTI_PRIM_IB_RESET_INDX; // = 0x2840C, // SAME
241 union UINT_FLOAT VGT_DRAW_INITIATOR; // = 0x287F0, // SAME
242 union UINT_FLOAT VGT_IMMED_DATA; // = 0x287F4, // SAME
244 union UINT_FLOAT VGT_OUTPUT_PATH_CNTL; //// // = 0x28A10, // DIFF
245 union UINT_FLOAT VGT_HOS_CNTL; // = 0x28A14, // SAME
246 union UINT_FLOAT VGT_HOS_MAX_TESS_LEVEL; // = 0x28A18, // SAME
247 union UINT_FLOAT VGT_HOS_MIN_TESS_LEVEL; // = 0x28A1C, // SAME
248 union UINT_FLOAT VGT_HOS_REUSE_DEPTH; // = 0x28A20, // SAME
249 union UINT_FLOAT VGT_GROUP_PRIM_TYPE; // = 0x28A24, // SAME
250 union UINT_FLOAT VGT_GROUP_FIRST_DECR; // = 0x28A28, // SAME
251 union UINT_FLOAT VGT_GROUP_DECR; // = 0x28A2C, // SAME
252 union UINT_FLOAT VGT_GROUP_VECT_0_CNTL; // = 0x28A30, // SAME
253 union UINT_FLOAT VGT_GROUP_VECT_1_CNTL; // = 0x28A34, // SAME
254 union UINT_FLOAT VGT_GROUP_VECT_0_FMT_CNTL; // = 0x28A38, // SAME
255 union UINT_FLOAT VGT_GROUP_VECT_1_FMT_CNTL; // = 0x28A3C, // SAME
256 union UINT_FLOAT VGT_GS_MODE; //// // = 0x28A40, // DIFF
258 union UINT_FLOAT VGT_PRIMITIVEID_EN; //// // = 0x28A84, // SAME
259 union UINT_FLOAT VGT_DMA_NUM_INSTANCES; //// // = 0x28A88, // SAME
260 union UINT_FLOAT VGT_EVENT_INITIATOR; // = 0x28A90, // SAME
261 union UINT_FLOAT VGT_MULTI_PRIM_IB_RESET_EN; // = 0x28A94, // SAME
262 union UINT_FLOAT VGT_INSTANCE_STEP_RATE_0; //// // = 0x28AA0, // SAME
263 union UINT_FLOAT VGT_INSTANCE_STEP_RATE_1; //// // = 0x28AA4, // SAME
264 union UINT_FLOAT VGT_REUSE_OFF; //// // = 0x28AB4, // SAME
265 union UINT_FLOAT VGT_VTX_CNT_EN; //// // = 0x28AB8, // SAME
267 union UINT_FLOAT VGT_SHADER_STAGES_EN; //// // = 0x28B54, //
269 union UINT_FLOAT VGT_STRMOUT_CONFIG; //// // = 0x28B94, //
270 union UINT_FLOAT VGT_STRMOUT_BUFFER_CONFIG; //// // = 0x28B98, //
271 union UINT_FLOAT VGT_VERTEX_REUSE_BLOCK_CNTL;//// // = 0x28C58, // SAME
272 union UINT_FLOAT VGT_OUT_DEALLOC_CNTL; //// // = 0x28C5C, // SAME
274 /* Registers from SQ block: */
275 union UINT_FLOAT SQ_VTX_SEMANTIC_0; //// // = 0x28380, // SAME
276 union UINT_FLOAT SQ_VTX_SEMANTIC_1; //// // = 0x28384, // SAME
277 union UINT_FLOAT SQ_VTX_SEMANTIC_2; //// // = 0x28388, // SAME
278 union UINT_FLOAT SQ_VTX_SEMANTIC_3; //// // = 0x2838C, // SAME
279 union UINT_FLOAT SQ_VTX_SEMANTIC_4; //// // = 0x28390, // SAME
280 union UINT_FLOAT SQ_VTX_SEMANTIC_5; //// // = 0x28394, // SAME
281 union UINT_FLOAT SQ_VTX_SEMANTIC_6; //// // = 0x28398, // SAME
282 union UINT_FLOAT SQ_VTX_SEMANTIC_7; //// // = 0x2839C, // SAME
283 union UINT_FLOAT SQ_VTX_SEMANTIC_8; //// // = 0x283A0, // SAME
284 union UINT_FLOAT SQ_VTX_SEMANTIC_9; //// // = 0x283A4, // SAME
285 union UINT_FLOAT SQ_VTX_SEMANTIC_10; //// // = 0x283A8, // SAME
286 union UINT_FLOAT SQ_VTX_SEMANTIC_11; //// // = 0x283AC, // SAME
287 union UINT_FLOAT SQ_VTX_SEMANTIC_12; //// // = 0x283B0, // SAME
288 union UINT_FLOAT SQ_VTX_SEMANTIC_13; //// // = 0x283B4, // SAME
289 union UINT_FLOAT SQ_VTX_SEMANTIC_14; //// // = 0x283B8, // SAME
290 union UINT_FLOAT SQ_VTX_SEMANTIC_15; //// // = 0x283BC, // SAME
291 union UINT_FLOAT SQ_VTX_SEMANTIC_16; //// // = 0x283C0, // SAME
292 union UINT_FLOAT SQ_VTX_SEMANTIC_17; //// // = 0x283C4, // SAME
293 union UINT_FLOAT SQ_VTX_SEMANTIC_18; //// // = 0x283C8, // SAME
294 union UINT_FLOAT SQ_VTX_SEMANTIC_19; //// // = 0x283CC, // SAME
295 union UINT_FLOAT SQ_VTX_SEMANTIC_20; //// // = 0x283D0, // SAME
296 union UINT_FLOAT SQ_VTX_SEMANTIC_21; //// // = 0x283D4, // SAME
297 union UINT_FLOAT SQ_VTX_SEMANTIC_22; //// // = 0x283D8, // SAME
298 union UINT_FLOAT SQ_VTX_SEMANTIC_23; //// // = 0x283DC, // SAME
299 union UINT_FLOAT SQ_VTX_SEMANTIC_24; //// // = 0x283E0, // SAME
300 union UINT_FLOAT SQ_VTX_SEMANTIC_25; //// // = 0x283E4, // SAME
301 union UINT_FLOAT SQ_VTX_SEMANTIC_26; //// // = 0x283E8, // SAME
302 union UINT_FLOAT SQ_VTX_SEMANTIC_27; //// // = 0x283EC, // SAME
303 union UINT_FLOAT SQ_VTX_SEMANTIC_28; //// // = 0x283F0, // SAME
304 union UINT_FLOAT SQ_VTX_SEMANTIC_29; //// // = 0x283F4, // SAME
305 union UINT_FLOAT SQ_VTX_SEMANTIC_30; //// // = 0x283F8, // SAME
306 union UINT_FLOAT SQ_VTX_SEMANTIC_31; //// // = 0x283FC, // SAME
307 union UINT_FLOAT SQ_DYN_GPR_RESOURCE_LIMIT_1;//// // = 0x28838, //
309 union UINT_FLOAT SQ_PGM_RESOURCES_PS; //// // = 0x28844, // DIFF 0x28850
310 union UINT_FLOAT SQ_PGM_RESOURCES_2_PS; //// // = 0x28848, //
311 union UINT_FLOAT SQ_PGM_EXPORTS_PS; //// // = 0x2884C, // SAME 0x28854
313 union UINT_FLOAT SQ_PGM_RESOURCES_VS;//// // = 0x28860, // DIFF 0x28868
314 union UINT_FLOAT SQ_PGM_RESOURCES_2_VS; //// // = 0x28864, //
315 union UINT_FLOAT SQ_PGM_START_GS; //// // = 0x28874, // SAME 0x2886C
316 union UINT_FLOAT SQ_PGM_RESOURCES_GS; //// // = 0x28878, // DIFF 0x2887C
317 union UINT_FLOAT SQ_PGM_RESOURCES_2_GS; //// // = 0x2887C, //
318 union UINT_FLOAT SQ_PGM_START_ES; //// // = 0x2888C, // SAME 0x28880
319 union UINT_FLOAT SQ_PGM_RESOURCES_ES; //// // = 0x28890, // DIFF
320 union UINT_FLOAT SQ_PGM_RESOURCES_2_ES; //// // = 0x28894, //
321 union UINT_FLOAT SQ_PGM_START_FS; //// // = 0x288A4, // SAME 0x28894
322 union UINT_FLOAT SQ_PGM_RESOURCES_FS; //// // = 0x288A8, // DIFF 0x288A4
323 union UINT_FLOAT SQ_PGM_START_HS; // = 0x288B8, //
324 union UINT_FLOAT SQ_PGM_RESOURCES_HS; // = 0x288BC, //
325 union UINT_FLOAT SQ_PGM_RESOURCES_2_HS;//// // = 0x288C0, //
326 union UINT_FLOAT SQ_PGM_START_LS; // = 0x288D0, //
327 union UINT_FLOAT SQ_PGM_RESOURCES_LS; // = 0x288D4, //
328 union UINT_FLOAT SQ_PGM_RESOURCES_2_LS; //// // = 0x288D8, //
329 union UINT_FLOAT SQ_LDS_ALLOC_PS; //// // = 0x288EC, //
330 union UINT_FLOAT SQ_ESGS_RING_ITEMSIZE; //// // = 0x28900, // SAME 0x288A8
331 union UINT_FLOAT SQ_GSVS_RING_ITEMSIZE; //// // = 0x28904, // SAME 0x288AC
332 union UINT_FLOAT SQ_ESTMP_RING_ITEMSIZE; //// // = 0x28908, // SAME 0x288B0
333 union UINT_FLOAT SQ_GSTMP_RING_ITEMSIZE; //// // = 0x2890C, // SAME 0x288B4
334 union UINT_FLOAT SQ_VSTMP_RING_ITEMSIZE; //// // = 0x28910, // SAME 0x288B8
335 union UINT_FLOAT SQ_PSTMP_RING_ITEMSIZE; //// // = 0x28914, // SAME 0x288BC
336 union UINT_FLOAT SQ_GS_VERT_ITEMSIZE; //// // = 0x2891C, // SAME 0x288C8
337 union UINT_FLOAT SQ_GS_VERT_ITEMSIZE_1; // = 0x28920, //
338 union UINT_FLOAT SQ_GS_VERT_ITEMSIZE_2; // = 0x28924, //
339 union UINT_FLOAT SQ_GS_VERT_ITEMSIZE_3; // = 0x28928, //
341 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_0; // = 0x289C0, // SAME
342 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_1; // = 0x289C4, // SAME
343 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_2; // = 0x289C8, // SAME
344 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_3; // = 0x289CC, // SAME
345 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_4; // = 0x289D0, // SAME
346 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_5; // = 0x289D4, // SAME
347 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_6; // = 0x289D8, // SAME
348 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_7; // = 0x289DC, // SAME
349 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_8; // = 0x289E0, // SAME
350 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_9; // = 0x289E4, // SAME
351 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_10; // = 0x289E8, // SAME
352 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_11; // = 0x289EC, // SAME
353 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_12; // = 0x289F0, // SAME
354 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_13; // = 0x289F4, // SAME
355 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_14; // = 0x289F8, // SAME
356 union UINT_FLOAT SQ_ALU_CONST_CACHE_GS_15; // = 0x289FC, // SAME
357 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_0; // = 0x28F00, //
358 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_1; // = 0x28F04, //
359 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_2; // = 0x28F08, //
360 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_3; // = 0x28F0C, //
361 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_4; // = 0x28F10, //
362 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_5; // = 0x28F14, //
363 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_6; // = 0x28F18, //
364 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_7; // = 0x28F1C, //
365 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_8; // = 0x28F20, //
366 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_9; // = 0x28F24, //
367 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_10; // = 0x28F28, //
368 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_11; // = 0x28F2C, //
369 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_12; // = 0x28F30, //
370 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_13; // = 0x28F34, //
371 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_14; // = 0x28F38, //
372 union UINT_FLOAT SQ_ALU_CONST_CACHE_HS_15; // = 0x28F3C, //
373 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_0; // = 0x28F40, //
374 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_1; // = 0x28F44, //
375 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_2; // = 0x28F48, //
376 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_3; // = 0x28F4C, //
377 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_4; // = 0x28F50, //
378 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_5; // = 0x28F54, //
379 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_6; // = 0x28F58, //
380 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_7; // = 0x28F5C, //
381 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_8; // = 0x28F60, //
382 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_9; // = 0x28F64, //
383 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_10; // = 0x28F68, //
384 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_11; // = 0x28F6C, //
385 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_12; // = 0x28F70, //
386 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_13; // = 0x28F74, //
387 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_14; // = 0x28F78, //
388 union UINT_FLOAT SQ_ALU_CONST_CACHE_LS_15; // = 0x28F7C, //
389 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_0; // = 0x28F80, //
390 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_1; // = 0x28F84, //
391 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_2; // = 0x28F88, //
392 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_3; // = 0x28F8C, //
393 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_4; // = 0x28F90, //
394 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_5; // = 0x28F94, //
395 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_6; // = 0x28F98, //
396 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_7; // = 0x28F9C, //
397 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_8; // = 0x28FA0, //
398 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_9; // = 0x28FA4, //
399 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_10; // = 0x28FA8, //
400 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_11; // = 0x28FAC, //
401 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_12; // = 0x28FB0, //
402 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_13; // = 0x28FB4, //
403 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_14; // = 0x28FB8, //
404 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_HS_15; // = 0x28FBC, //
405 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_0; // = 0x28FC0, //
406 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_1; // = 0x28FC4, //
407 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_2; // = 0x28FC8, //
408 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_3; // = 0x28FCC, //
409 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_4; // = 0x28FD0, //
410 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_5; // = 0x28FD4, //
411 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_6; // = 0x28FD8, //
412 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_7; // = 0x28FDC, //
413 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_8; // = 0x28FE0, //
414 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_9; // = 0x28FE4, //
415 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_10; // = 0x28FE8, //
416 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_11; // = 0x28FEC, //
417 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_12; // = 0x28FF0, //
418 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_13; // = 0x28FF4, //
419 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_14; // = 0x28FF8, //
420 union UINT_FLOAT SQ_ALU_CONST_BUFFER_SIZE_LS_15; // = 0x28FFC, //
425 /* Registers from SPI block: */
426 union UINT_FLOAT SPI_VS_OUT_ID_0; //// // = 0x2861C, // SAME 0x28614
427 union UINT_FLOAT SPI_VS_OUT_ID_1; //// // = 0x28620, // SAME 0x28618
428 union UINT_FLOAT SPI_VS_OUT_ID_2; //// // = 0x28624, // SAME 0x2861C
429 union UINT_FLOAT SPI_VS_OUT_ID_3; //// // = 0x28628, // SAME 0x28620
430 union UINT_FLOAT SPI_VS_OUT_ID_4; //// // = 0x2862C, // SAME 0x28624
431 union UINT_FLOAT SPI_VS_OUT_ID_5; //// // = 0x28630, // SAME 0x28628
432 union UINT_FLOAT SPI_VS_OUT_ID_6; //// // = 0x28634, // SAME 0x2862C
433 union UINT_FLOAT SPI_VS_OUT_ID_7; //// // = 0x28638, // SAME 0x28630
434 union UINT_FLOAT SPI_VS_OUT_ID_8; //// // = 0x2863C, // SAME 0x28634
435 union UINT_FLOAT SPI_VS_OUT_ID_9; //// // = 0x28640, // SAME 0x28638
436 union UINT_FLOAT SPI_PS_INPUT_CNTL[32]; //// // = 0x28644, // SAME
438 union UINT_FLOAT SPI_VS_OUT_CONFIG; //// // = 0x286C4, // SAME
439 union UINT_FLOAT SPI_THREAD_GROUPING; //// // = 0x286C8, // DIFF
440 union UINT_FLOAT SPI_PS_IN_CONTROL_0; //// // = 0x286CC, // SAME
441 union UINT_FLOAT SPI_PS_IN_CONTROL_1; //// // = 0x286D0, // SAME
442 union UINT_FLOAT SPI_INTERP_CONTROL_0; //// // = 0x286D4, // SAME
443 union UINT_FLOAT SPI_INPUT_Z; //// // = 0x286D8, // SAME
444 union UINT_FLOAT SPI_FOG_CNTL; //// // = 0x286DC, // SAME
445 union UINT_FLOAT SPI_BARYC_CNTL; //// // = 0x286E0, //
446 union UINT_FLOAT SPI_PS_IN_CONTROL_2; //// // = 0x286E4, //
447 union UINT_FLOAT SPI_COMPUTE_INPUT_CNTL; // = 0x286E8, //
448 union UINT_FLOAT SPI_COMPUTE_NUM_THREAD_X; // = 0x286EC, //
449 union UINT_FLOAT SPI_COMPUTE_NUM_THREAD_Y; // = 0x286F0, //
450 union UINT_FLOAT SPI_COMPUTE_NUM_THREAD_Z; // = 0x286F4, //
452 /* Registers from SX block: */
453 union UINT_FLOAT SX_MISC; // = 0x28350, // SAME
454 union UINT_FLOAT SX_SURFACE_SYNC; // = 0x28354, // DIFF
455 union UINT_FLOAT SX_ALPHA_TEST_CONTROL; //// // = 0x28410, // SAME
456 union UINT_FLOAT SX_ALPHA_REF; // = 0x28438, // SAME
458 /* Registers from DB block: */
459 union UINT_FLOAT DB_RENDER_CONTROL; //// // = 0x28000, // DIFF 0x28D0C
460 union UINT_FLOAT DB_COUNT_CONTROL; //// // = 0x28004, //
461 union UINT_FLOAT DB_DEPTH_VIEW; //// // = 0x28008, // DIFF 0x28004
462 union UINT_FLOAT DB_RENDER_OVERRIDE; //// // = 0x2800C, // DIFF 0x28D10
463 union UINT_FLOAT DB_RENDER_OVERRIDE2; //// // = 0x28010, //
464 union UINT_FLOAT DB_HTILE_DATA_BASE; //// // = 0x28014, // SAME
465 union UINT_FLOAT DB_STENCIL_CLEAR; //// // = 0x28028, // SAME
466 union UINT_FLOAT DB_DEPTH_CLEAR; //// // = 0x2802C, // SAME
467 union UINT_FLOAT DB_Z_INFO; //// // = 0x28040, //
468 union UINT_FLOAT DB_STENCIL_INFO; //// // = 0x28044, //
469 union UINT_FLOAT DB_Z_READ_BASE; //// // = 0x28048, //
470 union UINT_FLOAT DB_STENCIL_READ_BASE;//// // = 0x2804C, //
471 union UINT_FLOAT DB_Z_WRITE_BASE; //// // = 0x28050, //
472 union UINT_FLOAT DB_STENCIL_WRITE_BASE; //// // = 0x28054, //
473 union UINT_FLOAT DB_DEPTH_SIZE; //// // = 0x28058, // DIFF 0x28000
474 union UINT_FLOAT DB_DEPTH_SLICE; //// // = 0x2805C, //
475 union UINT_FLOAT DB_STENCILREFMASK; // = 0x28430, // SAME
476 union UINT_FLOAT DB_STENCILREFMASK_BF; // = 0x28434, // SAME
477 union UINT_FLOAT DB_DEPTH_CONTROL; //// // = 0x28800, // SAME
478 union UINT_FLOAT DB_SHADER_CONTROL;//// // = 0x2880C, // DIFF
479 union UINT_FLOAT DB_HTILE_SURFACE; //// // = 0x28ABC, // SAME 0x28D24
480 union UINT_FLOAT DB_SRESULTS_COMPARE_STATE0; //// // = 0x28AC0, // SAME 0x28D28
481 union UINT_FLOAT DB_SRESULTS_COMPARE_STATE1; //// // = 0x28AC4, // SAME 0x28D2C
482 union UINT_FLOAT DB_PRELOAD_CONTROL; //// // = 0x28AC8, // SAME 0x28D30
483 union UINT_FLOAT DB_ALPHA_TO_MASK; //// // = 0x28B70, // SAME 0x28D44
485 /* Registers from CB block: */
486 union UINT_FLOAT CB_TARGET_MASK; //// // = 0x28238, // SAME
487 union UINT_FLOAT CB_SHADER_MASK; //// // = 0x2823C, // SAME
488 union UINT_FLOAT CB_BLEND_RED; //// // = 0x28414, // SAME
489 union UINT_FLOAT CB_BLEND_GREEN; //// // = 0x28418, // SAME
490 union UINT_FLOAT CB_BLEND_BLUE; //// // = 0x2841C, // SAME
491 union UINT_FLOAT CB_BLEND_ALPHA; //// // = 0x28420, // SAME
492 union UINT_FLOAT CB_BLEND0_CONTROL; //// // = 0x28780, // DIFF
493 union UINT_FLOAT CB_BLEND1_CONTROL; // = 0x28784, // DIFF
494 union UINT_FLOAT CB_BLEND2_CONTROL; // = 0x28788, // DIFF
495 union UINT_FLOAT CB_BLEND3_CONTROL; // = 0x2878C, // DIFF
496 union UINT_FLOAT CB_BLEND4_CONTROL; // = 0x28790, // DIFF
497 union UINT_FLOAT CB_BLEND5_CONTROL; // = 0x28794, // DIFF
498 union UINT_FLOAT CB_BLEND6_CONTROL; // = 0x28798, // DIFF
499 union UINT_FLOAT CB_BLEND7_CONTROL; // = 0x2879C, // DIFF
500 union UINT_FLOAT CB_COLOR_CONTROL; //// // = 0x28808, // DIFF
501 union UINT_FLOAT CB_CLRCMP_CONTROL; //// // = 0x28C40, // SAME 0x28C30
502 union UINT_FLOAT CB_CLRCMP_SRC; //// // = 0x28C44, // SAME 0x28C34
503 union UINT_FLOAT CB_CLRCMP_DST; //// // = 0x28C48, // SAME 0x28C38
504 union UINT_FLOAT CB_CLRCMP_MSK; //// // = 0x28C4C, // SAME 0x28C3C
506 EVERGREEN_RENDER_TARGET_STATE render_target[EVERGREEN_MAX_RENDER_TARGETS];
508 radeonTexObj* textures[R700_TEXTURE_NUMBERUNITS];
510 EVERGREEN_CONFIG evergreen_config;
512 GLboolean bEnablePerspective;
514 } EVERGREEN_CHIP_CONTEXT;
516 #endif /* _EVERGREEN_CHIP_H_ */