summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/r600_blit_shaders.c
blob: 3af3c6426a6e7785091a3a97d1c780d30fde7384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
/*
 * Copyright 2009 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 * Authors:
 *     Alex Deucher <alexander.deucher@amd.com>
 */

#include <linux/bug.h>
#include <linux/types.h>
#include <linux/kernel.h>

/*
 * R6xx+ cards need to use the 3D engine to blit data which requires
 * quite a bit of hw state setup.  Rather than pull the whole 3D driver
 * (which normally generates the 3D state) into the DRM, we opt to use
 * statically generated state tables.  The regsiter state and shaders
 * were hand generated to support blitting functionality.  See the 3D
 * driver or documentation for descriptions of the registers and
 * shader instructions.
 */

const u32 r6xx_default_state[] =
{
	0xc0002400, /* START_3D_CMDBUF */
	0x00000000,

	0xc0012800, /* CONTEXT_CONTROL */
	0x80000000,
	0x80000000,

	0xc0016800,
	0x00000010,
	0x00008000, /* WAIT_UNTIL */

	0xc0016800,
	0x00000542,
	0x07000003, /* TA_CNTL_AUX */

	0xc0016800,
	0x000005c5,
	0x00000000, /* VC_ENHANCE */

	0xc0016800,
	0x00000363,
	0x00000000, /* SQ_DYN_GPR_CNTL_PS_FLUSH_REQ */

	0xc0016800,
	0x0000060c,
	0x82000000, /* DB_DEBUG */

	0xc0016800,
	0x0000060e,
	0x01020204, /* DB_WATERMARKS */

	0xc0026f00,
	0x00000000,
	0x00000000, /* SQ_VTX_BASE_VTX_LOC */
	0x00000000, /* SQ_VTX_START_INST_LOC */

	0xc0096900,
	0x0000022a,
	0x00000000, /* SQ_ESGS_RING_ITEMSIZE */
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,

	0xc0016900,
	0x00000004,
	0x00000000, /* DB_DEPTH_INFO */

	0xc0026900,
	0x0000000a,
	0x00000000, /* DB_STENCIL_CLEAR */
	0x00000000, /* DB_DEPTH_CLEAR */

	0xc0016900,
	0x00000200,
	0x00000000, /* DB_DEPTH_CONTROL */

	0xc0026900,
	0x00000343,
	0x00000060, /* DB_RENDER_CONTROL */
	0x00000040, /* DB_RENDER_OVERRIDE */

	0xc0016900,
	0x00000351,
	0x0000aa00, /* DB_ALPHA_TO_MASK */

	0xc00f6900,
	0x00000100,
	0x00000800, /* VGT_MAX_VTX_INDX */
	0x00000000, /* VGT_MIN_VTX_INDX */
	0x00000000, /* VGT_INDX_OFFSET */
	0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */
	0x00000000, /* SX_ALPHA_TEST_CONTROL */
	0x00000000, /* CB_BLEND_RED */
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000, /* CB_FOG_RED */
	0x00000000,
	0x00000000,
	0x00000000, /* DB_STENCILREFMASK */
	0x00000000, /* DB_STENCILREFMASK_BF */
	0x00000000, /* SX_ALPHA_REF */

	0xc0046900,
	0x0000030c,
	0x01000000, /* CB_CLRCMP_CNTL */
	0x00000000,
	0x00000000,
	0x00000000,

	0xc0046900,
	0x00000048,
	0x3f800000, /* CB_CLEAR_RED */
	0x00000000,
	0x3f800000,
	0x3f800000,

	0xc0016900,
	0x00000080,
	0x00000000, /* PA_SC_WINDOW_OFFSET */

	0xc00a6900,
	0x00000083,
	0x0000ffff, /* PA_SC_CLIP_RECT_RULE */
	0x00000000, /* PA_SC_CLIPRECT_0_TL */
	0x20002000,
	0x00000000,
	0x20002000,
	0x00000000,
	0x20002000,
	0x00000000,
	0x20002000,
	0x00000000, /* PA_SC_EDGERULE */

	0xc0406900,
	0x00000094,
	0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */
	0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */
	0x80000000, /* PA_SC_VPORT_SCISSOR_1_TL */
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x00000000, /* PA_SC_VPORT_ZMIN_0 */
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,

	0xc0026900,
	0x00000292,
	0x00000000, /* PA_SC_MPASS_PS_CNTL */
	0x00004010, /* PA_SC_MODE_CNTL */

	0xc0096900,
	0x00000300,
	0x00000000, /* PA_SC_LINE_CNTL */
	0x00000000, /* PA_SC_AA_CONFIG */
	0x0000002d, /* PA_SU_VTX_CNTL */
	0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */
	0x3f800000,
	0x3f800000,
	0x3f800000,
	0x00000000, /* PA_SC_SAMPLE_LOCS_MCTX */
	0x00000000,

	0xc0016900,
	0x00000312,
	0xffffffff, /* PA_SC_AA_MASK */

	0xc0066900,
	0x0000037e,
	0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */
	0x00000000, /* PA_SU_POLY_OFFSET_CLAMP */
	0x00000000, /* PA_SU_POLY_OFFSET_FRONT_SCALE */
	0x00000000, /* PA_SU_POLY_OFFSET_FRONT_OFFSET */
	0x00000000, /* PA_SU_POLY_OFFSET_BACK_SCALE */
	0x00000000, /* PA_SU_POLY_OFFSET_BACK_OFFSET */

	0xc0046900,
	0x000001b6,
	0x00000000, /* SPI_INPUT_Z */
	0x00000000, /* SPI_FOG_CNTL */
	0x00000000, /* SPI_FOG_FUNC_SCALE */
	0x00000000, /* SPI_FOG_FUNC_BIAS */

	0xc0016900,
	0x00000225,
	0x00000000, /* SQ_PGM_START_FS */

	0xc0016900,
	0x00000229,
	0x00000000, /* SQ_PGM_RESOURCES_FS */

	0xc0016900,
	0x00000237,
	0x00000000, /* SQ_PGM_CF_OFFSET_FS */

	0xc0026900,
	0x000002a8,
	0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */
	0x00000000, /* VGT_INSTANCE_STEP_RATE_1 */

	0xc0116900,
	0x00000280,
	0x00000000, /* PA_SU_POINT_SIZE */
	0x00000000, /* PA_SU_POINT_MINMAX */
	0x00000008, /* PA_SU_LINE_CNTL */
	0x00000000, /* PA_SC_LINE_STIPPLE */
	0x00000000, /* VGT_OUTPUT_PATH_CNTL */
	0x00000000, /* VGT_HOS_CNTL */
	0x00000000, /* VGT_HOS_MAX_TESS_LEVEL */
	0x00000000, /* VGT_HOS_MIN_TESS_LEVEL */
	0x00000000, /* VGT_HOS_REUSE_DEPTH */
	0x00000000, /* VGT_GROUP_PRIM_TYPE */
	0x00000000, /* VGT_GROUP_FIRST_DECR */
	0x00000000, /* VGT_GROUP_DECR */
	0x00000000, /* VGT_GROUP_VECT_0_CNTL */
	0x00000000, /* VGT_GROUP_VECT_1_CNTL */
	0x00000000, /* VGT_GROUP_VECT_0_FMT_CNTL */
	0x00000000, /* VGT_GROUP_VECT_1_FMT_CNTL */
	0x00000000, /* VGT_GS_MODE */

	0xc0016900,
	0x000002a1,
	0x00000000, /* VGT_PRIMITIVEID_EN */

	0xc0016900,
	0x000002a5,
	0x00000000, /* VGT_MULTI_PRIM_ID_RESET_EN */

	0xc0036900,
	0x000002ac,
	0x00000000, /* VGT_STRMOUT_EN */
	0x00000000, /* VGT_REUSE_OFF */
	0x00000000, /* VGT_VTX_CNT_EN */

	0xc0016900,
	0x000002c8,
	0x00000000, /* VGT_STRMOUT_BUFFER_EN */

	0xc0076900,
	0x00000202,
	0x00cc0000, /* CB_COLOR_CONTROL */
	0x00000210, /* DB_SHADER_CNTL */
	0x00010000, /* PA_CL_CLIP_CNTL */
	0x00000244, /* PA_SU_SC_MODE_CNTL */
	0x00000100, /* PA_CL_VTE_CNTL */
	0x00000000, /* PA_CL_VS_OUT_CNTL */
	0x00000000, /* PA_CL_NANINF_CNTL */

	0xc0026900,
	0x0000008e,
	0x0000000f, /* CB_TARGET_MASK */
	0x0000000f, /* CB_SHADER_MASK */

	0xc0016900,
	0x000001e8,
	0x00000001, /* CB_SHADER_CONTROL */

	0xc0016900,
	0x00000185,
	0x00000000, /* SPI_VS_OUT_ID_0 */

	0xc0016900,
	0x00000191,
	0x00000b00, /* SPI_PS_INPUT_CNTL_0 */

	0xc0056900,
	0x000001b1,
	0x00000000, /* SPI_VS_OUT_CONFIG */
	0x00000000, /* SPI_THREAD_GROUPING */
	0x00000001, /* SPI_PS_IN_CONTROL_0 */
	0x00000000, /* SPI_PS_IN_CONTROL_1 */
	0x00000000, /* SPI_INTERP_CONTROL_0 */

	0xc0036e00, /* SET_SAMPLER */
	0x00000000,
	0x00000012,
	0x00000000,
	0x00000000,
};

const u32 r7xx_default_state[] =
{
	0xc0012800, /* CONTEXT_CONTROL */
	0x80000000,
	0x80000000,

	0xc0016800,
	0x00000010,
	0x00008000, /* WAIT_UNTIL */

	0xc0016800,
	0x00000542,
	0x07000002, /* TA_CNTL_AUX */

	0xc0016800,
	0x000005c5,
	0x00000000, /* VC_ENHANCE */

	0xc0016800,
	0x00000363,
	0x00004000, /* SQ_DYN_GPR_CNTL_PS_FLUSH_REQ */

	0xc0016800,
	0x0000060c,
	0x00000000, /* DB_DEBUG */

	0xc0016800,
	0x0000060e,
	0x00420204, /* DB_WATERMARKS */

	0xc0026f00,
	0x00000000,
	0x00000000, /* SQ_VTX_BASE_VTX_LOC */
	0x00000000, /* SQ_VTX_START_INST_LOC */

	0xc0096900,
	0x0000022a,
	0x00000000, /* SQ_ESGS_RING_ITEMSIZE */
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,
	0x00000000,

	0xc0016900,
	0x00000004,
	0x00000000, /* DB_DEPTH_INFO */

	0xc0026900,
	0x0000000a,
	0x00000000, /* DB_STENCIL_CLEAR */
	0x00000000, /* DB_DEPTH_CLEAR */

	0xc0016900,
	0x00000200,
	0x00000000, /* DB_DEPTH_CONTROL */

	0xc0026900,
	0x00000343,
	0x00000060, /* DB_RENDER_CONTROL */
	0x00000000, /* DB_RENDER_OVERRIDE */

	0xc0016900,
	0x00000351,
	0x0000aa00, /* DB_ALPHA_TO_MASK */

	0xc0096900,
	0x00000100,
	0x00000800, /* VGT_MAX_VTX_INDX */
	0x00000000, /* VGT_MIN_VTX_INDX */
	0x00000000, /* VGT_INDX_OFFSET */
	0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */
	0x00000000, /* SX_ALPHA_TEST_CONTROL */
	0x00000000, /* CB_BLEND_RED */
	0x00000000,
	0x00000000,
	0x00000000,

	0xc0036900,
	0x0000010c,
	0x00000000, /* DB_STENCILREFMASK */
	0x00000000, /* DB_STENCILREFMASK_BF */
	0x00000000, /* SX_ALPHA_REF */

	0xc0046900,
	0x0000030c, /* CB_CLRCMP_CNTL */
	0x01000000,
	0x00000000,
	0x00000000,
	0x00000000,

	0xc0016900,
	0x00000080,
	0x00000000, /* PA_SC_WINDOW_OFFSET */

	0xc00a6900,
	0x00000083,
	0x0000ffff, /* PA_SC_CLIP_RECT_RULE */
	0x00000000, /* PA_SC_CLIPRECT_0_TL */
	0x20002000,
	0x00000000,
	0x20002000,
	0x00000000,
	0x20002000,
	0x00000000,
	0x20002000,
	0xaaaaaaaa, /* PA_SC_EDGERULE */

	0xc0406900,
	0x00000094,
	0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */
	0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */
	0x80000000, /* PA_SC_VPORT_SCISSOR_1_TL */
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x80000000,
	0x20002000,
	0x00000000, /* PA_SC_VPORT_ZMIN_0 */
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,
	0x00000000,
	0x3f800000,

	0xc0026900,
	0x00000292,
	0x00000000, /* PA_SC_MPASS_PS_CNTL */
	0x00514000, /* PA_SC_MODE_CNTL */

	0xc0096900,
	0x00000300,
	0x00000000, /* PA_SC_LINE_CNTL */
	0x00000000, /* PA_SC_AA_CONFIG */
	0x0000002d, /* PA_SU_VTX_CNTL */
	0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */
	0x3f800000,
	0x3f800000,
	0x3f800000,
	0x00000000, /* PA_SC_SAMPLE_LOCS_MCTX */
	0x00000000,

	0xc0016900,
	0x00000312,
	0xffffffff, /* PA_SC_AA_MASK */

	0xc0066900,
	0x0000037e,
	0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */
	0x00000000, /* PA_SU_POLY_OFFSET_CLAMP */
	0x00000000, /* PA_SU_POLY_OFFSET_FRONT_SCALE */
	0x00000000, /* PA_SU_POLY_OFFSET_FRONT_OFFSET */
	0x00000000, /* PA_SU_POLY_OFFSET_BACK_SCALE */
	0x00000000, /* PA_SU_POLY_OFFSET_BACK_OFFSET */

	0xc0046900,
	0x000001b6,
	0x00000000, /* SPI_INPUT_Z */
	0x00000000, /* SPI_FOG_CNTL */
	0x00000000, /* SPI_FOG_FUNC_SCALE */
	0x00000000, /* SPI_FOG_FUNC_BIAS */

	0xc0016900,
	0x00000225,
	0x00000000, /* SQ_PGM_START_FS */

	0xc0016900,
	0x00000229,
	0x00000000, /* SQ_PGM_RESOURCES_FS */

	0xc0016900,
	0x00000237,
	0x00000000, /* SQ_PGM_CF_OFFSET_FS */

	0xc0026900,
	0x000002a8,
	0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */
	0x00000000, /* VGT_INSTANCE_STEP_RATE_1 */

	0xc0116900,
	0x00000280,
	0x00000000, /* PA_SU_POINT_SIZE */
	0x00000000, /* PA_SU_POINT_MINMAX */
	0x00000008, /* PA_SU_LINE_CNTL */
	0x00000000, /* PA_SC_LINE_STIPPLE */
	0x00000000, /* VGT_OUTPUT_PATH_CNTL */
	0x00000000, /* VGT_HOS_CNTL */
	0x00000000, /* VGT_HOS_MAX_TESS_LEVEL */
	0x00000000, /* VGT_HOS_MIN_TESS_LEVEL */
	0x00000000, /* VGT_HOS_REUSE_DEPTH */
	0x00000000, /* VGT_GROUP_PRIM_TYPE */
	0x00000000, /* VGT_GROUP_FIRST_DECR */
	0x00000000, /* VGT_GROUP_DECR */
	0x00000000, /* VGT_GROUP_VECT_0_CNTL */
	0x00000000, /* VGT_GROUP_VECT_1_CNTL */
	0x00000000, /* VGT_GROUP_VECT_0_FMT_CNTL */
	0x00000000, /* VGT_GROUP_VECT_1_FMT_CNTL */
	0x00000000, /* VGT_GS_MODE */

	0xc0016900,
	0x000002a1,
	0x00000000, /* VGT_PRIMITIVEID_EN */

	0xc0016900,
	0x000002a5,
	0x00000000, /* VGT_MULTI_PRIM_ID_RESET_EN */

	0xc0036900,
	0x000002ac,
	0x00000000, /* VGT_STRMOUT_EN */
	0x00000000, /* VGT_REUSE_OFF */
	0x00000000, /* VGT_VTX_CNT_EN */

	0xc0016900,
	0x000002c8,
	0x00000000, /* VGT_STRMOUT_BUFFER_EN */

	0xc0076900,
	0x00000202,
	0x00cc0000, /* CB_COLOR_CONTROL */
	0x00000210, /* DB_SHADER_CNTL */
	0x00010000, /* PA_CL_CLIP_CNTL */
	0x00000244, /* PA_SU_SC_MODE_CNTL */
	0x00000100, /* PA_CL_VTE_CNTL */
	0x00000000, /* PA_CL_VS_OUT_CNTL */
	0x00000000, /* PA_CL_NANINF_CNTL */

	0xc0026900,
	0x0000008e,
	0x0000000f, /* CB_TARGET_MASK */
	0x0000000f, /* CB_SHADER_MASK */

	0xc0016900,
	0x000001e8,
	0x00000001, /* CB_SHADER_CONTROL */

	0xc0016900,
	0x00000185,
	0x00000000, /* SPI_VS_OUT_ID_0 */

	0xc0016900,
	0x00000191,
	0x00000b00, /* SPI_PS_INPUT_CNTL_0 */

	0xc0056900,
	0x000001b1,
	0x00000000, /* SPI_VS_OUT_CONFIG */
	0x00000001, /* SPI_THREAD_GROUPING */
	0x00000001, /* SPI_PS_IN_CONTROL_0 */
	0x00000000, /* SPI_PS_IN_CONTROL_1 */
	0x00000000, /* SPI_INTERP_CONTROL_0 */

	0xc0036e00, /* SET_SAMPLER */
	0x00000000,
	0x00000012,
	0x00000000,
	0x00000000,
};

/* same for r6xx/r7xx */
const u32 r6xx_vs[] =
{
	0x00000004,
	0x81000000,
	0x0000203c,
	0x94000b08,
	0x00004000,
	0x14200b1a,
	0x00000000,
	0x00000000,
	0x3c000000,
	0x68cd1000,
#ifdef __BIG_ENDIAN
	0x000a0000,
#else
	0x00080000,
#endif
	0x00000000,
};

const u32 r6xx_ps[] =
{
	0x00000002,
	0x80800000,
	0x00000000,
	0x94200688,
	0x00000010,
	0x000d1000,
	0xb0800000,
	0x00000000,
};

const u32 r6xx_ps_size = ARRAY_SIZE(r6xx_ps);
const u32 r6xx_vs_size = ARRAY_SIZE(r6xx_vs);
const u32 r6xx_default_size = ARRAY_SIZE(r6xx_default_state);
const u32 r7xx_default_size = ARRAY_SIZE(r7xx_default_state);