r600_blit_shaders.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. /*
  2. * Copyright 2009 Advanced Micro Devices, Inc.
  3. *
  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:
  10. *
  11. * The above copyright notice and this permission notice (including the next
  12. * paragraph) shall be included in all copies or substantial portions of the
  13. * Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  18. * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  19. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  20. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. * DEALINGS IN THE SOFTWARE.
  22. *
  23. * Authors:
  24. * Alex Deucher <alexander.deucher@amd.com>
  25. */
  26. #include <linux/bug.h>
  27. #include <linux/types.h>
  28. #include <linux/kernel.h>
  29. /*
  30. * R6xx+ cards need to use the 3D engine to blit data which requires
  31. * quite a bit of hw state setup. Rather than pull the whole 3D driver
  32. * (which normally generates the 3D state) into the DRM, we opt to use
  33. * statically generated state tables. The register state and shaders
  34. * were hand generated to support blitting functionality. See the 3D
  35. * driver or documentation for descriptions of the registers and
  36. * shader instructions.
  37. */
  38. const u32 r6xx_default_state[] =
  39. {
  40. 0xc0002400, /* START_3D_CMDBUF */
  41. 0x00000000,
  42. 0xc0012800, /* CONTEXT_CONTROL */
  43. 0x80000000,
  44. 0x80000000,
  45. 0xc0016800,
  46. 0x00000010,
  47. 0x00008000, /* WAIT_UNTIL */
  48. 0xc0016800,
  49. 0x00000542,
  50. 0x07000003, /* TA_CNTL_AUX */
  51. 0xc0016800,
  52. 0x000005c5,
  53. 0x00000000, /* VC_ENHANCE */
  54. 0xc0016800,
  55. 0x00000363,
  56. 0x00000000, /* SQ_DYN_GPR_CNTL_PS_FLUSH_REQ */
  57. 0xc0016800,
  58. 0x0000060c,
  59. 0x82000000, /* DB_DEBUG */
  60. 0xc0016800,
  61. 0x0000060e,
  62. 0x01020204, /* DB_WATERMARKS */
  63. 0xc0026f00,
  64. 0x00000000,
  65. 0x00000000, /* SQ_VTX_BASE_VTX_LOC */
  66. 0x00000000, /* SQ_VTX_START_INST_LOC */
  67. 0xc0096900,
  68. 0x0000022a,
  69. 0x00000000, /* SQ_ESGS_RING_ITEMSIZE */
  70. 0x00000000,
  71. 0x00000000,
  72. 0x00000000,
  73. 0x00000000,
  74. 0x00000000,
  75. 0x00000000,
  76. 0x00000000,
  77. 0x00000000,
  78. 0xc0016900,
  79. 0x00000004,
  80. 0x00000000, /* DB_DEPTH_INFO */
  81. 0xc0026900,
  82. 0x0000000a,
  83. 0x00000000, /* DB_STENCIL_CLEAR */
  84. 0x00000000, /* DB_DEPTH_CLEAR */
  85. 0xc0016900,
  86. 0x00000200,
  87. 0x00000000, /* DB_DEPTH_CONTROL */
  88. 0xc0026900,
  89. 0x00000343,
  90. 0x00000060, /* DB_RENDER_CONTROL */
  91. 0x00000040, /* DB_RENDER_OVERRIDE */
  92. 0xc0016900,
  93. 0x00000351,
  94. 0x0000aa00, /* DB_ALPHA_TO_MASK */
  95. 0xc00f6900,
  96. 0x00000100,
  97. 0x00000800, /* VGT_MAX_VTX_INDX */
  98. 0x00000000, /* VGT_MIN_VTX_INDX */
  99. 0x00000000, /* VGT_INDX_OFFSET */
  100. 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */
  101. 0x00000000, /* SX_ALPHA_TEST_CONTROL */
  102. 0x00000000, /* CB_BLEND_RED */
  103. 0x00000000,
  104. 0x00000000,
  105. 0x00000000,
  106. 0x00000000, /* CB_FOG_RED */
  107. 0x00000000,
  108. 0x00000000,
  109. 0x00000000, /* DB_STENCILREFMASK */
  110. 0x00000000, /* DB_STENCILREFMASK_BF */
  111. 0x00000000, /* SX_ALPHA_REF */
  112. 0xc0046900,
  113. 0x0000030c,
  114. 0x01000000, /* CB_CLRCMP_CNTL */
  115. 0x00000000,
  116. 0x00000000,
  117. 0x00000000,
  118. 0xc0046900,
  119. 0x00000048,
  120. 0x3f800000, /* CB_CLEAR_RED */
  121. 0x00000000,
  122. 0x3f800000,
  123. 0x3f800000,
  124. 0xc0016900,
  125. 0x00000080,
  126. 0x00000000, /* PA_SC_WINDOW_OFFSET */
  127. 0xc00a6900,
  128. 0x00000083,
  129. 0x0000ffff, /* PA_SC_CLIP_RECT_RULE */
  130. 0x00000000, /* PA_SC_CLIPRECT_0_TL */
  131. 0x20002000,
  132. 0x00000000,
  133. 0x20002000,
  134. 0x00000000,
  135. 0x20002000,
  136. 0x00000000,
  137. 0x20002000,
  138. 0x00000000, /* PA_SC_EDGERULE */
  139. 0xc0406900,
  140. 0x00000094,
  141. 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */
  142. 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */
  143. 0x80000000, /* PA_SC_VPORT_SCISSOR_1_TL */
  144. 0x20002000,
  145. 0x80000000,
  146. 0x20002000,
  147. 0x80000000,
  148. 0x20002000,
  149. 0x80000000,
  150. 0x20002000,
  151. 0x80000000,
  152. 0x20002000,
  153. 0x80000000,
  154. 0x20002000,
  155. 0x80000000,
  156. 0x20002000,
  157. 0x80000000,
  158. 0x20002000,
  159. 0x80000000,
  160. 0x20002000,
  161. 0x80000000,
  162. 0x20002000,
  163. 0x80000000,
  164. 0x20002000,
  165. 0x80000000,
  166. 0x20002000,
  167. 0x80000000,
  168. 0x20002000,
  169. 0x80000000,
  170. 0x20002000,
  171. 0x80000000,
  172. 0x20002000,
  173. 0x00000000, /* PA_SC_VPORT_ZMIN_0 */
  174. 0x3f800000,
  175. 0x00000000,
  176. 0x3f800000,
  177. 0x00000000,
  178. 0x3f800000,
  179. 0x00000000,
  180. 0x3f800000,
  181. 0x00000000,
  182. 0x3f800000,
  183. 0x00000000,
  184. 0x3f800000,
  185. 0x00000000,
  186. 0x3f800000,
  187. 0x00000000,
  188. 0x3f800000,
  189. 0x00000000,
  190. 0x3f800000,
  191. 0x00000000,
  192. 0x3f800000,
  193. 0x00000000,
  194. 0x3f800000,
  195. 0x00000000,
  196. 0x3f800000,
  197. 0x00000000,
  198. 0x3f800000,
  199. 0x00000000,
  200. 0x3f800000,
  201. 0x00000000,
  202. 0x3f800000,
  203. 0x00000000,
  204. 0x3f800000,
  205. 0xc0026900,
  206. 0x00000292,
  207. 0x00000000, /* PA_SC_MPASS_PS_CNTL */
  208. 0x00004010, /* PA_SC_MODE_CNTL */
  209. 0xc0096900,
  210. 0x00000300,
  211. 0x00000000, /* PA_SC_LINE_CNTL */
  212. 0x00000000, /* PA_SC_AA_CONFIG */
  213. 0x0000002d, /* PA_SU_VTX_CNTL */
  214. 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */
  215. 0x3f800000,
  216. 0x3f800000,
  217. 0x3f800000,
  218. 0x00000000, /* PA_SC_SAMPLE_LOCS_MCTX */
  219. 0x00000000,
  220. 0xc0016900,
  221. 0x00000312,
  222. 0xffffffff, /* PA_SC_AA_MASK */
  223. 0xc0066900,
  224. 0x0000037e,
  225. 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */
  226. 0x00000000, /* PA_SU_POLY_OFFSET_CLAMP */
  227. 0x00000000, /* PA_SU_POLY_OFFSET_FRONT_SCALE */
  228. 0x00000000, /* PA_SU_POLY_OFFSET_FRONT_OFFSET */
  229. 0x00000000, /* PA_SU_POLY_OFFSET_BACK_SCALE */
  230. 0x00000000, /* PA_SU_POLY_OFFSET_BACK_OFFSET */
  231. 0xc0046900,
  232. 0x000001b6,
  233. 0x00000000, /* SPI_INPUT_Z */
  234. 0x00000000, /* SPI_FOG_CNTL */
  235. 0x00000000, /* SPI_FOG_FUNC_SCALE */
  236. 0x00000000, /* SPI_FOG_FUNC_BIAS */
  237. 0xc0016900,
  238. 0x00000225,
  239. 0x00000000, /* SQ_PGM_START_FS */
  240. 0xc0016900,
  241. 0x00000229,
  242. 0x00000000, /* SQ_PGM_RESOURCES_FS */
  243. 0xc0016900,
  244. 0x00000237,
  245. 0x00000000, /* SQ_PGM_CF_OFFSET_FS */
  246. 0xc0026900,
  247. 0x000002a8,
  248. 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */
  249. 0x00000000, /* VGT_INSTANCE_STEP_RATE_1 */
  250. 0xc0116900,
  251. 0x00000280,
  252. 0x00000000, /* PA_SU_POINT_SIZE */
  253. 0x00000000, /* PA_SU_POINT_MINMAX */
  254. 0x00000008, /* PA_SU_LINE_CNTL */
  255. 0x00000000, /* PA_SC_LINE_STIPPLE */
  256. 0x00000000, /* VGT_OUTPUT_PATH_CNTL */
  257. 0x00000000, /* VGT_HOS_CNTL */
  258. 0x00000000, /* VGT_HOS_MAX_TESS_LEVEL */
  259. 0x00000000, /* VGT_HOS_MIN_TESS_LEVEL */
  260. 0x00000000, /* VGT_HOS_REUSE_DEPTH */
  261. 0x00000000, /* VGT_GROUP_PRIM_TYPE */
  262. 0x00000000, /* VGT_GROUP_FIRST_DECR */
  263. 0x00000000, /* VGT_GROUP_DECR */
  264. 0x00000000, /* VGT_GROUP_VECT_0_CNTL */
  265. 0x00000000, /* VGT_GROUP_VECT_1_CNTL */
  266. 0x00000000, /* VGT_GROUP_VECT_0_FMT_CNTL */
  267. 0x00000000, /* VGT_GROUP_VECT_1_FMT_CNTL */
  268. 0x00000000, /* VGT_GS_MODE */
  269. 0xc0016900,
  270. 0x000002a1,
  271. 0x00000000, /* VGT_PRIMITIVEID_EN */
  272. 0xc0016900,
  273. 0x000002a5,
  274. 0x00000000, /* VGT_MULTI_PRIM_ID_RESET_EN */
  275. 0xc0036900,
  276. 0x000002ac,
  277. 0x00000000, /* VGT_STRMOUT_EN */
  278. 0x00000000, /* VGT_REUSE_OFF */
  279. 0x00000000, /* VGT_VTX_CNT_EN */
  280. 0xc0016900,
  281. 0x000000d4,
  282. 0x00000000, /* SX_MISC */
  283. 0xc0016900,
  284. 0x000002c8,
  285. 0x00000000, /* VGT_STRMOUT_BUFFER_EN */
  286. 0xc0076900,
  287. 0x00000202,
  288. 0x00cc0000, /* CB_COLOR_CONTROL */
  289. 0x00000210, /* DB_SHADER_CNTL */
  290. 0x00010000, /* PA_CL_CLIP_CNTL */
  291. 0x00000244, /* PA_SU_SC_MODE_CNTL */
  292. 0x00000100, /* PA_CL_VTE_CNTL */
  293. 0x00000000, /* PA_CL_VS_OUT_CNTL */
  294. 0x00000000, /* PA_CL_NANINF_CNTL */
  295. 0xc0026900,
  296. 0x0000008e,
  297. 0x0000000f, /* CB_TARGET_MASK */
  298. 0x0000000f, /* CB_SHADER_MASK */
  299. 0xc0016900,
  300. 0x000001e8,
  301. 0x00000001, /* CB_SHADER_CONTROL */
  302. 0xc0016900,
  303. 0x00000185,
  304. 0x00000000, /* SPI_VS_OUT_ID_0 */
  305. 0xc0016900,
  306. 0x00000191,
  307. 0x00000b00, /* SPI_PS_INPUT_CNTL_0 */
  308. 0xc0056900,
  309. 0x000001b1,
  310. 0x00000000, /* SPI_VS_OUT_CONFIG */
  311. 0x00000000, /* SPI_THREAD_GROUPING */
  312. 0x00000001, /* SPI_PS_IN_CONTROL_0 */
  313. 0x00000000, /* SPI_PS_IN_CONTROL_1 */
  314. 0x00000000, /* SPI_INTERP_CONTROL_0 */
  315. 0xc0036e00, /* SET_SAMPLER */
  316. 0x00000000,
  317. 0x00000012,
  318. 0x00000000,
  319. 0x00000000,
  320. };
  321. const u32 r7xx_default_state[] =
  322. {
  323. 0xc0012800, /* CONTEXT_CONTROL */
  324. 0x80000000,
  325. 0x80000000,
  326. 0xc0016800,
  327. 0x00000010,
  328. 0x00008000, /* WAIT_UNTIL */
  329. 0xc0016800,
  330. 0x00000542,
  331. 0x07000002, /* TA_CNTL_AUX */
  332. 0xc0016800,
  333. 0x000005c5,
  334. 0x00000000, /* VC_ENHANCE */
  335. 0xc0016800,
  336. 0x00000363,
  337. 0x00004000, /* SQ_DYN_GPR_CNTL_PS_FLUSH_REQ */
  338. 0xc0016800,
  339. 0x0000060c,
  340. 0x00000000, /* DB_DEBUG */
  341. 0xc0016800,
  342. 0x0000060e,
  343. 0x00420204, /* DB_WATERMARKS */
  344. 0xc0026f00,
  345. 0x00000000,
  346. 0x00000000, /* SQ_VTX_BASE_VTX_LOC */
  347. 0x00000000, /* SQ_VTX_START_INST_LOC */
  348. 0xc0096900,
  349. 0x0000022a,
  350. 0x00000000, /* SQ_ESGS_RING_ITEMSIZE */
  351. 0x00000000,
  352. 0x00000000,
  353. 0x00000000,
  354. 0x00000000,
  355. 0x00000000,
  356. 0x00000000,
  357. 0x00000000,
  358. 0x00000000,
  359. 0xc0016900,
  360. 0x00000004,
  361. 0x00000000, /* DB_DEPTH_INFO */
  362. 0xc0026900,
  363. 0x0000000a,
  364. 0x00000000, /* DB_STENCIL_CLEAR */
  365. 0x00000000, /* DB_DEPTH_CLEAR */
  366. 0xc0016900,
  367. 0x00000200,
  368. 0x00000000, /* DB_DEPTH_CONTROL */
  369. 0xc0026900,
  370. 0x00000343,
  371. 0x00000060, /* DB_RENDER_CONTROL */
  372. 0x00000000, /* DB_RENDER_OVERRIDE */
  373. 0xc0016900,
  374. 0x00000351,
  375. 0x0000aa00, /* DB_ALPHA_TO_MASK */
  376. 0xc0096900,
  377. 0x00000100,
  378. 0x00000800, /* VGT_MAX_VTX_INDX */
  379. 0x00000000, /* VGT_MIN_VTX_INDX */
  380. 0x00000000, /* VGT_INDX_OFFSET */
  381. 0x00000000, /* VGT_MULTI_PRIM_IB_RESET_INDX */
  382. 0x00000000, /* SX_ALPHA_TEST_CONTROL */
  383. 0x00000000, /* CB_BLEND_RED */
  384. 0x00000000,
  385. 0x00000000,
  386. 0x00000000,
  387. 0xc0036900,
  388. 0x0000010c,
  389. 0x00000000, /* DB_STENCILREFMASK */
  390. 0x00000000, /* DB_STENCILREFMASK_BF */
  391. 0x00000000, /* SX_ALPHA_REF */
  392. 0xc0046900,
  393. 0x0000030c, /* CB_CLRCMP_CNTL */
  394. 0x01000000,
  395. 0x00000000,
  396. 0x00000000,
  397. 0x00000000,
  398. 0xc0016900,
  399. 0x00000080,
  400. 0x00000000, /* PA_SC_WINDOW_OFFSET */
  401. 0xc00a6900,
  402. 0x00000083,
  403. 0x0000ffff, /* PA_SC_CLIP_RECT_RULE */
  404. 0x00000000, /* PA_SC_CLIPRECT_0_TL */
  405. 0x20002000,
  406. 0x00000000,
  407. 0x20002000,
  408. 0x00000000,
  409. 0x20002000,
  410. 0x00000000,
  411. 0x20002000,
  412. 0xaaaaaaaa, /* PA_SC_EDGERULE */
  413. 0xc0406900,
  414. 0x00000094,
  415. 0x80000000, /* PA_SC_VPORT_SCISSOR_0_TL */
  416. 0x20002000, /* PA_SC_VPORT_SCISSOR_0_BR */
  417. 0x80000000, /* PA_SC_VPORT_SCISSOR_1_TL */
  418. 0x20002000,
  419. 0x80000000,
  420. 0x20002000,
  421. 0x80000000,
  422. 0x20002000,
  423. 0x80000000,
  424. 0x20002000,
  425. 0x80000000,
  426. 0x20002000,
  427. 0x80000000,
  428. 0x20002000,
  429. 0x80000000,
  430. 0x20002000,
  431. 0x80000000,
  432. 0x20002000,
  433. 0x80000000,
  434. 0x20002000,
  435. 0x80000000,
  436. 0x20002000,
  437. 0x80000000,
  438. 0x20002000,
  439. 0x80000000,
  440. 0x20002000,
  441. 0x80000000,
  442. 0x20002000,
  443. 0x80000000,
  444. 0x20002000,
  445. 0x80000000,
  446. 0x20002000,
  447. 0x00000000, /* PA_SC_VPORT_ZMIN_0 */
  448. 0x3f800000,
  449. 0x00000000,
  450. 0x3f800000,
  451. 0x00000000,
  452. 0x3f800000,
  453. 0x00000000,
  454. 0x3f800000,
  455. 0x00000000,
  456. 0x3f800000,
  457. 0x00000000,
  458. 0x3f800000,
  459. 0x00000000,
  460. 0x3f800000,
  461. 0x00000000,
  462. 0x3f800000,
  463. 0x00000000,
  464. 0x3f800000,
  465. 0x00000000,
  466. 0x3f800000,
  467. 0x00000000,
  468. 0x3f800000,
  469. 0x00000000,
  470. 0x3f800000,
  471. 0x00000000,
  472. 0x3f800000,
  473. 0x00000000,
  474. 0x3f800000,
  475. 0x00000000,
  476. 0x3f800000,
  477. 0x00000000,
  478. 0x3f800000,
  479. 0xc0026900,
  480. 0x00000292,
  481. 0x00000000, /* PA_SC_MPASS_PS_CNTL */
  482. 0x00514000, /* PA_SC_MODE_CNTL */
  483. 0xc0096900,
  484. 0x00000300,
  485. 0x00000000, /* PA_SC_LINE_CNTL */
  486. 0x00000000, /* PA_SC_AA_CONFIG */
  487. 0x0000002d, /* PA_SU_VTX_CNTL */
  488. 0x3f800000, /* PA_CL_GB_VERT_CLIP_ADJ */
  489. 0x3f800000,
  490. 0x3f800000,
  491. 0x3f800000,
  492. 0x00000000, /* PA_SC_SAMPLE_LOCS_MCTX */
  493. 0x00000000,
  494. 0xc0016900,
  495. 0x00000312,
  496. 0xffffffff, /* PA_SC_AA_MASK */
  497. 0xc0066900,
  498. 0x0000037e,
  499. 0x00000000, /* PA_SU_POLY_OFFSET_DB_FMT_CNTL */
  500. 0x00000000, /* PA_SU_POLY_OFFSET_CLAMP */
  501. 0x00000000, /* PA_SU_POLY_OFFSET_FRONT_SCALE */
  502. 0x00000000, /* PA_SU_POLY_OFFSET_FRONT_OFFSET */
  503. 0x00000000, /* PA_SU_POLY_OFFSET_BACK_SCALE */
  504. 0x00000000, /* PA_SU_POLY_OFFSET_BACK_OFFSET */
  505. 0xc0046900,
  506. 0x000001b6,
  507. 0x00000000, /* SPI_INPUT_Z */
  508. 0x00000000, /* SPI_FOG_CNTL */
  509. 0x00000000, /* SPI_FOG_FUNC_SCALE */
  510. 0x00000000, /* SPI_FOG_FUNC_BIAS */
  511. 0xc0016900,
  512. 0x00000225,
  513. 0x00000000, /* SQ_PGM_START_FS */
  514. 0xc0016900,
  515. 0x00000229,
  516. 0x00000000, /* SQ_PGM_RESOURCES_FS */
  517. 0xc0016900,
  518. 0x00000237,
  519. 0x00000000, /* SQ_PGM_CF_OFFSET_FS */
  520. 0xc0026900,
  521. 0x000002a8,
  522. 0x00000000, /* VGT_INSTANCE_STEP_RATE_0 */
  523. 0x00000000, /* VGT_INSTANCE_STEP_RATE_1 */
  524. 0xc0116900,
  525. 0x00000280,
  526. 0x00000000, /* PA_SU_POINT_SIZE */
  527. 0x00000000, /* PA_SU_POINT_MINMAX */
  528. 0x00000008, /* PA_SU_LINE_CNTL */
  529. 0x00000000, /* PA_SC_LINE_STIPPLE */
  530. 0x00000000, /* VGT_OUTPUT_PATH_CNTL */
  531. 0x00000000, /* VGT_HOS_CNTL */
  532. 0x00000000, /* VGT_HOS_MAX_TESS_LEVEL */
  533. 0x00000000, /* VGT_HOS_MIN_TESS_LEVEL */
  534. 0x00000000, /* VGT_HOS_REUSE_DEPTH */
  535. 0x00000000, /* VGT_GROUP_PRIM_TYPE */
  536. 0x00000000, /* VGT_GROUP_FIRST_DECR */
  537. 0x00000000, /* VGT_GROUP_DECR */
  538. 0x00000000, /* VGT_GROUP_VECT_0_CNTL */
  539. 0x00000000, /* VGT_GROUP_VECT_1_CNTL */
  540. 0x00000000, /* VGT_GROUP_VECT_0_FMT_CNTL */
  541. 0x00000000, /* VGT_GROUP_VECT_1_FMT_CNTL */
  542. 0x00000000, /* VGT_GS_MODE */
  543. 0xc0016900,
  544. 0x000002a1,
  545. 0x00000000, /* VGT_PRIMITIVEID_EN */
  546. 0xc0016900,
  547. 0x000002a5,
  548. 0x00000000, /* VGT_MULTI_PRIM_ID_RESET_EN */
  549. 0xc0036900,
  550. 0x000002ac,
  551. 0x00000000, /* VGT_STRMOUT_EN */
  552. 0x00000000, /* VGT_REUSE_OFF */
  553. 0x00000000, /* VGT_VTX_CNT_EN */
  554. 0xc0016900,
  555. 0x000000d4,
  556. 0x00000000, /* SX_MISC */
  557. 0xc0016900,
  558. 0x000002c8,
  559. 0x00000000, /* VGT_STRMOUT_BUFFER_EN */
  560. 0xc0076900,
  561. 0x00000202,
  562. 0x00cc0000, /* CB_COLOR_CONTROL */
  563. 0x00000210, /* DB_SHADER_CNTL */
  564. 0x00010000, /* PA_CL_CLIP_CNTL */
  565. 0x00000244, /* PA_SU_SC_MODE_CNTL */
  566. 0x00000100, /* PA_CL_VTE_CNTL */
  567. 0x00000000, /* PA_CL_VS_OUT_CNTL */
  568. 0x00000000, /* PA_CL_NANINF_CNTL */
  569. 0xc0026900,
  570. 0x0000008e,
  571. 0x0000000f, /* CB_TARGET_MASK */
  572. 0x0000000f, /* CB_SHADER_MASK */
  573. 0xc0016900,
  574. 0x000001e8,
  575. 0x00000001, /* CB_SHADER_CONTROL */
  576. 0xc0016900,
  577. 0x00000185,
  578. 0x00000000, /* SPI_VS_OUT_ID_0 */
  579. 0xc0016900,
  580. 0x00000191,
  581. 0x00000b00, /* SPI_PS_INPUT_CNTL_0 */
  582. 0xc0056900,
  583. 0x000001b1,
  584. 0x00000000, /* SPI_VS_OUT_CONFIG */
  585. 0x00000001, /* SPI_THREAD_GROUPING */
  586. 0x00000001, /* SPI_PS_IN_CONTROL_0 */
  587. 0x00000000, /* SPI_PS_IN_CONTROL_1 */
  588. 0x00000000, /* SPI_INTERP_CONTROL_0 */
  589. 0xc0036e00, /* SET_SAMPLER */
  590. 0x00000000,
  591. 0x00000012,
  592. 0x00000000,
  593. 0x00000000,
  594. };
  595. /* same for r6xx/r7xx */
  596. const u32 r6xx_vs[] =
  597. {
  598. 0x00000004,
  599. 0x81000000,
  600. 0x0000203c,
  601. 0x94000b08,
  602. 0x00004000,
  603. 0x14200b1a,
  604. 0x00000000,
  605. 0x00000000,
  606. 0x3c000000,
  607. 0x68cd1000,
  608. #ifdef __BIG_ENDIAN
  609. 0x000a0000,
  610. #else
  611. 0x00080000,
  612. #endif
  613. 0x00000000,
  614. };
  615. const u32 r6xx_ps[] =
  616. {
  617. 0x00000002,
  618. 0x80800000,
  619. 0x00000000,
  620. 0x94200688,
  621. 0x00000010,
  622. 0x000d1000,
  623. 0xb0800000,
  624. 0x00000000,
  625. };
  626. const u32 r6xx_ps_size = ARRAY_SIZE(r6xx_ps);
  627. const u32 r6xx_vs_size = ARRAY_SIZE(r6xx_vs);
  628. const u32 r6xx_default_size = ARRAY_SIZE(r6xx_default_state);
  629. const u32 r7xx_default_size = ARRAY_SIZE(r7xx_default_state);