a2xx.xml.h 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598
  1. #ifndef A2XX_XML
  2. #define A2XX_XML
  3. /* Autogenerated file, DO NOT EDIT manually!
  4. This file was generated by the rules-ng-ng headergen tool in this git repository:
  5. http://github.com/freedreno/envytools/
  6. git clone https://github.com/freedreno/envytools.git
  7. The rules-ng-ng source files this header was generated from are:
  8. - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 398 bytes, from 2015-09-24 17:25:31)
  9. - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
  10. - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
  11. - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
  12. - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
  13. - /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
  14. - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
  15. - /home/robclark/src/freedreno/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2015-09-24 17:30:00)
  16. Copyright (C) 2013-2015 by the following authors:
  17. - Rob Clark <robdclark@gmail.com> (robclark)
  18. Permission is hereby granted, free of charge, to any person obtaining
  19. a copy of this software and associated documentation files (the
  20. "Software"), to deal in the Software without restriction, including
  21. without limitation the rights to use, copy, modify, merge, publish,
  22. distribute, sublicense, and/or sell copies of the Software, and to
  23. permit persons to whom the Software is furnished to do so, subject to
  24. the following conditions:
  25. The above copyright notice and this permission notice (including the
  26. next paragraph) shall be included in all copies or substantial
  27. portions of the Software.
  28. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  29. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  30. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  31. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
  32. LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  33. OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  34. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  35. */
  36. enum a2xx_rb_dither_type {
  37. DITHER_PIXEL = 0,
  38. DITHER_SUBPIXEL = 1,
  39. };
  40. enum a2xx_colorformatx {
  41. COLORX_4_4_4_4 = 0,
  42. COLORX_1_5_5_5 = 1,
  43. COLORX_5_6_5 = 2,
  44. COLORX_8 = 3,
  45. COLORX_8_8 = 4,
  46. COLORX_8_8_8_8 = 5,
  47. COLORX_S8_8_8_8 = 6,
  48. COLORX_16_FLOAT = 7,
  49. COLORX_16_16_FLOAT = 8,
  50. COLORX_16_16_16_16_FLOAT = 9,
  51. COLORX_32_FLOAT = 10,
  52. COLORX_32_32_FLOAT = 11,
  53. COLORX_32_32_32_32_FLOAT = 12,
  54. COLORX_2_3_3 = 13,
  55. COLORX_8_8_8 = 14,
  56. };
  57. enum a2xx_sq_surfaceformat {
  58. FMT_1_REVERSE = 0,
  59. FMT_1 = 1,
  60. FMT_8 = 2,
  61. FMT_1_5_5_5 = 3,
  62. FMT_5_6_5 = 4,
  63. FMT_6_5_5 = 5,
  64. FMT_8_8_8_8 = 6,
  65. FMT_2_10_10_10 = 7,
  66. FMT_8_A = 8,
  67. FMT_8_B = 9,
  68. FMT_8_8 = 10,
  69. FMT_Cr_Y1_Cb_Y0 = 11,
  70. FMT_Y1_Cr_Y0_Cb = 12,
  71. FMT_5_5_5_1 = 13,
  72. FMT_8_8_8_8_A = 14,
  73. FMT_4_4_4_4 = 15,
  74. FMT_10_11_11 = 16,
  75. FMT_11_11_10 = 17,
  76. FMT_DXT1 = 18,
  77. FMT_DXT2_3 = 19,
  78. FMT_DXT4_5 = 20,
  79. FMT_24_8 = 22,
  80. FMT_24_8_FLOAT = 23,
  81. FMT_16 = 24,
  82. FMT_16_16 = 25,
  83. FMT_16_16_16_16 = 26,
  84. FMT_16_EXPAND = 27,
  85. FMT_16_16_EXPAND = 28,
  86. FMT_16_16_16_16_EXPAND = 29,
  87. FMT_16_FLOAT = 30,
  88. FMT_16_16_FLOAT = 31,
  89. FMT_16_16_16_16_FLOAT = 32,
  90. FMT_32 = 33,
  91. FMT_32_32 = 34,
  92. FMT_32_32_32_32 = 35,
  93. FMT_32_FLOAT = 36,
  94. FMT_32_32_FLOAT = 37,
  95. FMT_32_32_32_32_FLOAT = 38,
  96. FMT_32_AS_8 = 39,
  97. FMT_32_AS_8_8 = 40,
  98. FMT_16_MPEG = 41,
  99. FMT_16_16_MPEG = 42,
  100. FMT_8_INTERLACED = 43,
  101. FMT_32_AS_8_INTERLACED = 44,
  102. FMT_32_AS_8_8_INTERLACED = 45,
  103. FMT_16_INTERLACED = 46,
  104. FMT_16_MPEG_INTERLACED = 47,
  105. FMT_16_16_MPEG_INTERLACED = 48,
  106. FMT_DXN = 49,
  107. FMT_8_8_8_8_AS_16_16_16_16 = 50,
  108. FMT_DXT1_AS_16_16_16_16 = 51,
  109. FMT_DXT2_3_AS_16_16_16_16 = 52,
  110. FMT_DXT4_5_AS_16_16_16_16 = 53,
  111. FMT_2_10_10_10_AS_16_16_16_16 = 54,
  112. FMT_10_11_11_AS_16_16_16_16 = 55,
  113. FMT_11_11_10_AS_16_16_16_16 = 56,
  114. FMT_32_32_32_FLOAT = 57,
  115. FMT_DXT3A = 58,
  116. FMT_DXT5A = 59,
  117. FMT_CTX1 = 60,
  118. FMT_DXT3A_AS_1_1_1_1 = 61,
  119. };
  120. enum a2xx_sq_ps_vtx_mode {
  121. POSITION_1_VECTOR = 0,
  122. POSITION_2_VECTORS_UNUSED = 1,
  123. POSITION_2_VECTORS_SPRITE = 2,
  124. POSITION_2_VECTORS_EDGE = 3,
  125. POSITION_2_VECTORS_KILL = 4,
  126. POSITION_2_VECTORS_SPRITE_KILL = 5,
  127. POSITION_2_VECTORS_EDGE_KILL = 6,
  128. MULTIPASS = 7,
  129. };
  130. enum a2xx_sq_sample_cntl {
  131. CENTROIDS_ONLY = 0,
  132. CENTERS_ONLY = 1,
  133. CENTROIDS_AND_CENTERS = 2,
  134. };
  135. enum a2xx_dx_clip_space {
  136. DXCLIP_OPENGL = 0,
  137. DXCLIP_DIRECTX = 1,
  138. };
  139. enum a2xx_pa_su_sc_polymode {
  140. POLY_DISABLED = 0,
  141. POLY_DUALMODE = 1,
  142. };
  143. enum a2xx_rb_edram_mode {
  144. EDRAM_NOP = 0,
  145. COLOR_DEPTH = 4,
  146. DEPTH_ONLY = 5,
  147. EDRAM_COPY = 6,
  148. };
  149. enum a2xx_pa_sc_pattern_bit_order {
  150. LITTLE = 0,
  151. BIG = 1,
  152. };
  153. enum a2xx_pa_sc_auto_reset_cntl {
  154. NEVER = 0,
  155. EACH_PRIMITIVE = 1,
  156. EACH_PACKET = 2,
  157. };
  158. enum a2xx_pa_pixcenter {
  159. PIXCENTER_D3D = 0,
  160. PIXCENTER_OGL = 1,
  161. };
  162. enum a2xx_pa_roundmode {
  163. TRUNCATE = 0,
  164. ROUND = 1,
  165. ROUNDTOEVEN = 2,
  166. ROUNDTOODD = 3,
  167. };
  168. enum a2xx_pa_quantmode {
  169. ONE_SIXTEENTH = 0,
  170. ONE_EIGTH = 1,
  171. ONE_QUARTER = 2,
  172. ONE_HALF = 3,
  173. ONE = 4,
  174. };
  175. enum a2xx_rb_copy_sample_select {
  176. SAMPLE_0 = 0,
  177. SAMPLE_1 = 1,
  178. SAMPLE_2 = 2,
  179. SAMPLE_3 = 3,
  180. SAMPLE_01 = 4,
  181. SAMPLE_23 = 5,
  182. SAMPLE_0123 = 6,
  183. };
  184. enum a2xx_rb_blend_opcode {
  185. BLEND_DST_PLUS_SRC = 0,
  186. BLEND_SRC_MINUS_DST = 1,
  187. BLEND_MIN_DST_SRC = 2,
  188. BLEND_MAX_DST_SRC = 3,
  189. BLEND_DST_MINUS_SRC = 4,
  190. BLEND_DST_PLUS_SRC_BIAS = 5,
  191. };
  192. enum adreno_mmu_clnt_beh {
  193. BEH_NEVR = 0,
  194. BEH_TRAN_RNG = 1,
  195. BEH_TRAN_FLT = 2,
  196. };
  197. enum sq_tex_clamp {
  198. SQ_TEX_WRAP = 0,
  199. SQ_TEX_MIRROR = 1,
  200. SQ_TEX_CLAMP_LAST_TEXEL = 2,
  201. SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 3,
  202. SQ_TEX_CLAMP_HALF_BORDER = 4,
  203. SQ_TEX_MIRROR_ONCE_HALF_BORDER = 5,
  204. SQ_TEX_CLAMP_BORDER = 6,
  205. SQ_TEX_MIRROR_ONCE_BORDER = 7,
  206. };
  207. enum sq_tex_swiz {
  208. SQ_TEX_X = 0,
  209. SQ_TEX_Y = 1,
  210. SQ_TEX_Z = 2,
  211. SQ_TEX_W = 3,
  212. SQ_TEX_ZERO = 4,
  213. SQ_TEX_ONE = 5,
  214. };
  215. enum sq_tex_filter {
  216. SQ_TEX_FILTER_POINT = 0,
  217. SQ_TEX_FILTER_BILINEAR = 1,
  218. SQ_TEX_FILTER_BICUBIC = 2,
  219. };
  220. #define REG_A2XX_RBBM_PATCH_RELEASE 0x00000001
  221. #define REG_A2XX_RBBM_CNTL 0x0000003b
  222. #define REG_A2XX_RBBM_SOFT_RESET 0x0000003c
  223. #define REG_A2XX_CP_PFP_UCODE_ADDR 0x000000c0
  224. #define REG_A2XX_CP_PFP_UCODE_DATA 0x000000c1
  225. #define REG_A2XX_MH_MMU_CONFIG 0x00000040
  226. #define A2XX_MH_MMU_CONFIG_MMU_ENABLE 0x00000001
  227. #define A2XX_MH_MMU_CONFIG_SPLIT_MODE_ENABLE 0x00000002
  228. #define A2XX_MH_MMU_CONFIG_RB_W_CLNT_BEHAVIOR__MASK 0x00000030
  229. #define A2XX_MH_MMU_CONFIG_RB_W_CLNT_BEHAVIOR__SHIFT 4
  230. static inline uint32_t A2XX_MH_MMU_CONFIG_RB_W_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  231. {
  232. return ((val) << A2XX_MH_MMU_CONFIG_RB_W_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_RB_W_CLNT_BEHAVIOR__MASK;
  233. }
  234. #define A2XX_MH_MMU_CONFIG_CP_W_CLNT_BEHAVIOR__MASK 0x000000c0
  235. #define A2XX_MH_MMU_CONFIG_CP_W_CLNT_BEHAVIOR__SHIFT 6
  236. static inline uint32_t A2XX_MH_MMU_CONFIG_CP_W_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  237. {
  238. return ((val) << A2XX_MH_MMU_CONFIG_CP_W_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_CP_W_CLNT_BEHAVIOR__MASK;
  239. }
  240. #define A2XX_MH_MMU_CONFIG_CP_R0_CLNT_BEHAVIOR__MASK 0x00000300
  241. #define A2XX_MH_MMU_CONFIG_CP_R0_CLNT_BEHAVIOR__SHIFT 8
  242. static inline uint32_t A2XX_MH_MMU_CONFIG_CP_R0_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  243. {
  244. return ((val) << A2XX_MH_MMU_CONFIG_CP_R0_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_CP_R0_CLNT_BEHAVIOR__MASK;
  245. }
  246. #define A2XX_MH_MMU_CONFIG_CP_R1_CLNT_BEHAVIOR__MASK 0x00000c00
  247. #define A2XX_MH_MMU_CONFIG_CP_R1_CLNT_BEHAVIOR__SHIFT 10
  248. static inline uint32_t A2XX_MH_MMU_CONFIG_CP_R1_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  249. {
  250. return ((val) << A2XX_MH_MMU_CONFIG_CP_R1_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_CP_R1_CLNT_BEHAVIOR__MASK;
  251. }
  252. #define A2XX_MH_MMU_CONFIG_CP_R2_CLNT_BEHAVIOR__MASK 0x00003000
  253. #define A2XX_MH_MMU_CONFIG_CP_R2_CLNT_BEHAVIOR__SHIFT 12
  254. static inline uint32_t A2XX_MH_MMU_CONFIG_CP_R2_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  255. {
  256. return ((val) << A2XX_MH_MMU_CONFIG_CP_R2_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_CP_R2_CLNT_BEHAVIOR__MASK;
  257. }
  258. #define A2XX_MH_MMU_CONFIG_CP_R3_CLNT_BEHAVIOR__MASK 0x0000c000
  259. #define A2XX_MH_MMU_CONFIG_CP_R3_CLNT_BEHAVIOR__SHIFT 14
  260. static inline uint32_t A2XX_MH_MMU_CONFIG_CP_R3_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  261. {
  262. return ((val) << A2XX_MH_MMU_CONFIG_CP_R3_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_CP_R3_CLNT_BEHAVIOR__MASK;
  263. }
  264. #define A2XX_MH_MMU_CONFIG_CP_R4_CLNT_BEHAVIOR__MASK 0x00030000
  265. #define A2XX_MH_MMU_CONFIG_CP_R4_CLNT_BEHAVIOR__SHIFT 16
  266. static inline uint32_t A2XX_MH_MMU_CONFIG_CP_R4_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  267. {
  268. return ((val) << A2XX_MH_MMU_CONFIG_CP_R4_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_CP_R4_CLNT_BEHAVIOR__MASK;
  269. }
  270. #define A2XX_MH_MMU_CONFIG_VGT_R0_CLNT_BEHAVIOR__MASK 0x000c0000
  271. #define A2XX_MH_MMU_CONFIG_VGT_R0_CLNT_BEHAVIOR__SHIFT 18
  272. static inline uint32_t A2XX_MH_MMU_CONFIG_VGT_R0_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  273. {
  274. return ((val) << A2XX_MH_MMU_CONFIG_VGT_R0_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_VGT_R0_CLNT_BEHAVIOR__MASK;
  275. }
  276. #define A2XX_MH_MMU_CONFIG_VGT_R1_CLNT_BEHAVIOR__MASK 0x00300000
  277. #define A2XX_MH_MMU_CONFIG_VGT_R1_CLNT_BEHAVIOR__SHIFT 20
  278. static inline uint32_t A2XX_MH_MMU_CONFIG_VGT_R1_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  279. {
  280. return ((val) << A2XX_MH_MMU_CONFIG_VGT_R1_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_VGT_R1_CLNT_BEHAVIOR__MASK;
  281. }
  282. #define A2XX_MH_MMU_CONFIG_TC_R_CLNT_BEHAVIOR__MASK 0x00c00000
  283. #define A2XX_MH_MMU_CONFIG_TC_R_CLNT_BEHAVIOR__SHIFT 22
  284. static inline uint32_t A2XX_MH_MMU_CONFIG_TC_R_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  285. {
  286. return ((val) << A2XX_MH_MMU_CONFIG_TC_R_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_TC_R_CLNT_BEHAVIOR__MASK;
  287. }
  288. #define A2XX_MH_MMU_CONFIG_PA_W_CLNT_BEHAVIOR__MASK 0x03000000
  289. #define A2XX_MH_MMU_CONFIG_PA_W_CLNT_BEHAVIOR__SHIFT 24
  290. static inline uint32_t A2XX_MH_MMU_CONFIG_PA_W_CLNT_BEHAVIOR(enum adreno_mmu_clnt_beh val)
  291. {
  292. return ((val) << A2XX_MH_MMU_CONFIG_PA_W_CLNT_BEHAVIOR__SHIFT) & A2XX_MH_MMU_CONFIG_PA_W_CLNT_BEHAVIOR__MASK;
  293. }
  294. #define REG_A2XX_MH_MMU_VA_RANGE 0x00000041
  295. #define REG_A2XX_MH_MMU_PT_BASE 0x00000042
  296. #define REG_A2XX_MH_MMU_PAGE_FAULT 0x00000043
  297. #define REG_A2XX_MH_MMU_TRAN_ERROR 0x00000044
  298. #define REG_A2XX_MH_MMU_INVALIDATE 0x00000045
  299. #define REG_A2XX_MH_MMU_MPU_BASE 0x00000046
  300. #define REG_A2XX_MH_MMU_MPU_END 0x00000047
  301. #define REG_A2XX_NQWAIT_UNTIL 0x00000394
  302. #define REG_A2XX_RBBM_PERFCOUNTER1_SELECT 0x00000395
  303. #define REG_A2XX_RBBM_PERFCOUNTER1_LO 0x00000397
  304. #define REG_A2XX_RBBM_PERFCOUNTER1_HI 0x00000398
  305. #define REG_A2XX_RBBM_DEBUG 0x0000039b
  306. #define REG_A2XX_RBBM_PM_OVERRIDE1 0x0000039c
  307. #define REG_A2XX_RBBM_PM_OVERRIDE2 0x0000039d
  308. #define REG_A2XX_RBBM_DEBUG_OUT 0x000003a0
  309. #define REG_A2XX_RBBM_DEBUG_CNTL 0x000003a1
  310. #define REG_A2XX_RBBM_READ_ERROR 0x000003b3
  311. #define REG_A2XX_RBBM_INT_CNTL 0x000003b4
  312. #define REG_A2XX_RBBM_INT_STATUS 0x000003b5
  313. #define REG_A2XX_RBBM_INT_ACK 0x000003b6
  314. #define REG_A2XX_MASTER_INT_SIGNAL 0x000003b7
  315. #define REG_A2XX_RBBM_PERIPHID1 0x000003f9
  316. #define REG_A2XX_RBBM_PERIPHID2 0x000003fa
  317. #define REG_A2XX_CP_PERFMON_CNTL 0x00000444
  318. #define REG_A2XX_CP_PERFCOUNTER_SELECT 0x00000445
  319. #define REG_A2XX_CP_PERFCOUNTER_LO 0x00000446
  320. #define REG_A2XX_CP_PERFCOUNTER_HI 0x00000447
  321. #define REG_A2XX_RBBM_STATUS 0x000005d0
  322. #define A2XX_RBBM_STATUS_CMDFIFO_AVAIL__MASK 0x0000001f
  323. #define A2XX_RBBM_STATUS_CMDFIFO_AVAIL__SHIFT 0
  324. static inline uint32_t A2XX_RBBM_STATUS_CMDFIFO_AVAIL(uint32_t val)
  325. {
  326. return ((val) << A2XX_RBBM_STATUS_CMDFIFO_AVAIL__SHIFT) & A2XX_RBBM_STATUS_CMDFIFO_AVAIL__MASK;
  327. }
  328. #define A2XX_RBBM_STATUS_TC_BUSY 0x00000020
  329. #define A2XX_RBBM_STATUS_HIRQ_PENDING 0x00000100
  330. #define A2XX_RBBM_STATUS_CPRQ_PENDING 0x00000200
  331. #define A2XX_RBBM_STATUS_CFRQ_PENDING 0x00000400
  332. #define A2XX_RBBM_STATUS_PFRQ_PENDING 0x00000800
  333. #define A2XX_RBBM_STATUS_VGT_BUSY_NO_DMA 0x00001000
  334. #define A2XX_RBBM_STATUS_RBBM_WU_BUSY 0x00004000
  335. #define A2XX_RBBM_STATUS_CP_NRT_BUSY 0x00010000
  336. #define A2XX_RBBM_STATUS_MH_BUSY 0x00040000
  337. #define A2XX_RBBM_STATUS_MH_COHERENCY_BUSY 0x00080000
  338. #define A2XX_RBBM_STATUS_SX_BUSY 0x00200000
  339. #define A2XX_RBBM_STATUS_TPC_BUSY 0x00400000
  340. #define A2XX_RBBM_STATUS_SC_CNTX_BUSY 0x01000000
  341. #define A2XX_RBBM_STATUS_PA_BUSY 0x02000000
  342. #define A2XX_RBBM_STATUS_VGT_BUSY 0x04000000
  343. #define A2XX_RBBM_STATUS_SQ_CNTX17_BUSY 0x08000000
  344. #define A2XX_RBBM_STATUS_SQ_CNTX0_BUSY 0x10000000
  345. #define A2XX_RBBM_STATUS_RB_CNTX_BUSY 0x40000000
  346. #define A2XX_RBBM_STATUS_GUI_ACTIVE 0x80000000
  347. #define REG_A2XX_MH_ARBITER_CONFIG 0x00000a40
  348. #define A2XX_MH_ARBITER_CONFIG_SAME_PAGE_LIMIT__MASK 0x0000003f
  349. #define A2XX_MH_ARBITER_CONFIG_SAME_PAGE_LIMIT__SHIFT 0
  350. static inline uint32_t A2XX_MH_ARBITER_CONFIG_SAME_PAGE_LIMIT(uint32_t val)
  351. {
  352. return ((val) << A2XX_MH_ARBITER_CONFIG_SAME_PAGE_LIMIT__SHIFT) & A2XX_MH_ARBITER_CONFIG_SAME_PAGE_LIMIT__MASK;
  353. }
  354. #define A2XX_MH_ARBITER_CONFIG_SAME_PAGE_GRANULARITY 0x00000040
  355. #define A2XX_MH_ARBITER_CONFIG_L1_ARB_ENABLE 0x00000080
  356. #define A2XX_MH_ARBITER_CONFIG_L1_ARB_HOLD_ENABLE 0x00000100
  357. #define A2XX_MH_ARBITER_CONFIG_L2_ARB_CONTROL 0x00000200
  358. #define A2XX_MH_ARBITER_CONFIG_PAGE_SIZE__MASK 0x00001c00
  359. #define A2XX_MH_ARBITER_CONFIG_PAGE_SIZE__SHIFT 10
  360. static inline uint32_t A2XX_MH_ARBITER_CONFIG_PAGE_SIZE(uint32_t val)
  361. {
  362. return ((val) << A2XX_MH_ARBITER_CONFIG_PAGE_SIZE__SHIFT) & A2XX_MH_ARBITER_CONFIG_PAGE_SIZE__MASK;
  363. }
  364. #define A2XX_MH_ARBITER_CONFIG_TC_REORDER_ENABLE 0x00002000
  365. #define A2XX_MH_ARBITER_CONFIG_TC_ARB_HOLD_ENABLE 0x00004000
  366. #define A2XX_MH_ARBITER_CONFIG_IN_FLIGHT_LIMIT_ENABLE 0x00008000
  367. #define A2XX_MH_ARBITER_CONFIG_IN_FLIGHT_LIMIT__MASK 0x003f0000
  368. #define A2XX_MH_ARBITER_CONFIG_IN_FLIGHT_LIMIT__SHIFT 16
  369. static inline uint32_t A2XX_MH_ARBITER_CONFIG_IN_FLIGHT_LIMIT(uint32_t val)
  370. {
  371. return ((val) << A2XX_MH_ARBITER_CONFIG_IN_FLIGHT_LIMIT__SHIFT) & A2XX_MH_ARBITER_CONFIG_IN_FLIGHT_LIMIT__MASK;
  372. }
  373. #define A2XX_MH_ARBITER_CONFIG_CP_CLNT_ENABLE 0x00400000
  374. #define A2XX_MH_ARBITER_CONFIG_VGT_CLNT_ENABLE 0x00800000
  375. #define A2XX_MH_ARBITER_CONFIG_TC_CLNT_ENABLE 0x01000000
  376. #define A2XX_MH_ARBITER_CONFIG_RB_CLNT_ENABLE 0x02000000
  377. #define A2XX_MH_ARBITER_CONFIG_PA_CLNT_ENABLE 0x04000000
  378. #define REG_A2XX_A220_VSC_BIN_SIZE 0x00000c01
  379. #define A2XX_A220_VSC_BIN_SIZE_WIDTH__MASK 0x0000001f
  380. #define A2XX_A220_VSC_BIN_SIZE_WIDTH__SHIFT 0
  381. static inline uint32_t A2XX_A220_VSC_BIN_SIZE_WIDTH(uint32_t val)
  382. {
  383. return ((val >> 5) << A2XX_A220_VSC_BIN_SIZE_WIDTH__SHIFT) & A2XX_A220_VSC_BIN_SIZE_WIDTH__MASK;
  384. }
  385. #define A2XX_A220_VSC_BIN_SIZE_HEIGHT__MASK 0x000003e0
  386. #define A2XX_A220_VSC_BIN_SIZE_HEIGHT__SHIFT 5
  387. static inline uint32_t A2XX_A220_VSC_BIN_SIZE_HEIGHT(uint32_t val)
  388. {
  389. return ((val >> 5) << A2XX_A220_VSC_BIN_SIZE_HEIGHT__SHIFT) & A2XX_A220_VSC_BIN_SIZE_HEIGHT__MASK;
  390. }
  391. static inline uint32_t REG_A2XX_VSC_PIPE(uint32_t i0) { return 0x00000c06 + 0x3*i0; }
  392. static inline uint32_t REG_A2XX_VSC_PIPE_CONFIG(uint32_t i0) { return 0x00000c06 + 0x3*i0; }
  393. static inline uint32_t REG_A2XX_VSC_PIPE_DATA_ADDRESS(uint32_t i0) { return 0x00000c07 + 0x3*i0; }
  394. static inline uint32_t REG_A2XX_VSC_PIPE_DATA_LENGTH(uint32_t i0) { return 0x00000c08 + 0x3*i0; }
  395. #define REG_A2XX_PC_DEBUG_CNTL 0x00000c38
  396. #define REG_A2XX_PC_DEBUG_DATA 0x00000c39
  397. #define REG_A2XX_PA_SC_VIZ_QUERY_STATUS 0x00000c44
  398. #define REG_A2XX_GRAS_DEBUG_CNTL 0x00000c80
  399. #define REG_A2XX_PA_SU_DEBUG_CNTL 0x00000c80
  400. #define REG_A2XX_GRAS_DEBUG_DATA 0x00000c81
  401. #define REG_A2XX_PA_SU_DEBUG_DATA 0x00000c81
  402. #define REG_A2XX_PA_SU_FACE_DATA 0x00000c86
  403. #define REG_A2XX_SQ_GPR_MANAGEMENT 0x00000d00
  404. #define REG_A2XX_SQ_FLOW_CONTROL 0x00000d01
  405. #define REG_A2XX_SQ_INST_STORE_MANAGMENT 0x00000d02
  406. #define REG_A2XX_SQ_DEBUG_MISC 0x00000d05
  407. #define REG_A2XX_SQ_INT_CNTL 0x00000d34
  408. #define REG_A2XX_SQ_INT_STATUS 0x00000d35
  409. #define REG_A2XX_SQ_INT_ACK 0x00000d36
  410. #define REG_A2XX_SQ_DEBUG_INPUT_FSM 0x00000dae
  411. #define REG_A2XX_SQ_DEBUG_CONST_MGR_FSM 0x00000daf
  412. #define REG_A2XX_SQ_DEBUG_TP_FSM 0x00000db0
  413. #define REG_A2XX_SQ_DEBUG_FSM_ALU_0 0x00000db1
  414. #define REG_A2XX_SQ_DEBUG_FSM_ALU_1 0x00000db2
  415. #define REG_A2XX_SQ_DEBUG_EXP_ALLOC 0x00000db3
  416. #define REG_A2XX_SQ_DEBUG_PTR_BUFF 0x00000db4
  417. #define REG_A2XX_SQ_DEBUG_GPR_VTX 0x00000db5
  418. #define REG_A2XX_SQ_DEBUG_GPR_PIX 0x00000db6
  419. #define REG_A2XX_SQ_DEBUG_TB_STATUS_SEL 0x00000db7
  420. #define REG_A2XX_SQ_DEBUG_VTX_TB_0 0x00000db8
  421. #define REG_A2XX_SQ_DEBUG_VTX_TB_1 0x00000db9
  422. #define REG_A2XX_SQ_DEBUG_VTX_TB_STATUS_REG 0x00000dba
  423. #define REG_A2XX_SQ_DEBUG_VTX_TB_STATE_MEM 0x00000dbb
  424. #define REG_A2XX_SQ_DEBUG_PIX_TB_0 0x00000dbc
  425. #define REG_A2XX_SQ_DEBUG_PIX_TB_STATUS_REG_0 0x00000dbd
  426. #define REG_A2XX_SQ_DEBUG_PIX_TB_STATUS_REG_1 0x00000dbe
  427. #define REG_A2XX_SQ_DEBUG_PIX_TB_STATUS_REG_2 0x00000dbf
  428. #define REG_A2XX_SQ_DEBUG_PIX_TB_STATUS_REG_3 0x00000dc0
  429. #define REG_A2XX_SQ_DEBUG_PIX_TB_STATE_MEM 0x00000dc1
  430. #define REG_A2XX_TC_CNTL_STATUS 0x00000e00
  431. #define A2XX_TC_CNTL_STATUS_L2_INVALIDATE 0x00000001
  432. #define REG_A2XX_TP0_CHICKEN 0x00000e1e
  433. #define REG_A2XX_RB_BC_CONTROL 0x00000f01
  434. #define A2XX_RB_BC_CONTROL_ACCUM_LINEAR_MODE_ENABLE 0x00000001
  435. #define A2XX_RB_BC_CONTROL_ACCUM_TIMEOUT_SELECT__MASK 0x00000006
  436. #define A2XX_RB_BC_CONTROL_ACCUM_TIMEOUT_SELECT__SHIFT 1
  437. static inline uint32_t A2XX_RB_BC_CONTROL_ACCUM_TIMEOUT_SELECT(uint32_t val)
  438. {
  439. return ((val) << A2XX_RB_BC_CONTROL_ACCUM_TIMEOUT_SELECT__SHIFT) & A2XX_RB_BC_CONTROL_ACCUM_TIMEOUT_SELECT__MASK;
  440. }
  441. #define A2XX_RB_BC_CONTROL_DISABLE_EDRAM_CAM 0x00000008
  442. #define A2XX_RB_BC_CONTROL_DISABLE_EZ_FAST_CONTEXT_SWITCH 0x00000010
  443. #define A2XX_RB_BC_CONTROL_DISABLE_EZ_NULL_ZCMD_DROP 0x00000020
  444. #define A2XX_RB_BC_CONTROL_DISABLE_LZ_NULL_ZCMD_DROP 0x00000040
  445. #define A2XX_RB_BC_CONTROL_ENABLE_AZ_THROTTLE 0x00000080
  446. #define A2XX_RB_BC_CONTROL_AZ_THROTTLE_COUNT__MASK 0x00001f00
  447. #define A2XX_RB_BC_CONTROL_AZ_THROTTLE_COUNT__SHIFT 8
  448. static inline uint32_t A2XX_RB_BC_CONTROL_AZ_THROTTLE_COUNT(uint32_t val)
  449. {
  450. return ((val) << A2XX_RB_BC_CONTROL_AZ_THROTTLE_COUNT__SHIFT) & A2XX_RB_BC_CONTROL_AZ_THROTTLE_COUNT__MASK;
  451. }
  452. #define A2XX_RB_BC_CONTROL_ENABLE_CRC_UPDATE 0x00004000
  453. #define A2XX_RB_BC_CONTROL_CRC_MODE 0x00008000
  454. #define A2XX_RB_BC_CONTROL_DISABLE_SAMPLE_COUNTERS 0x00010000
  455. #define A2XX_RB_BC_CONTROL_DISABLE_ACCUM 0x00020000
  456. #define A2XX_RB_BC_CONTROL_ACCUM_ALLOC_MASK__MASK 0x003c0000
  457. #define A2XX_RB_BC_CONTROL_ACCUM_ALLOC_MASK__SHIFT 18
  458. static inline uint32_t A2XX_RB_BC_CONTROL_ACCUM_ALLOC_MASK(uint32_t val)
  459. {
  460. return ((val) << A2XX_RB_BC_CONTROL_ACCUM_ALLOC_MASK__SHIFT) & A2XX_RB_BC_CONTROL_ACCUM_ALLOC_MASK__MASK;
  461. }
  462. #define A2XX_RB_BC_CONTROL_LINEAR_PERFORMANCE_ENABLE 0x00400000
  463. #define A2XX_RB_BC_CONTROL_ACCUM_DATA_FIFO_LIMIT__MASK 0x07800000
  464. #define A2XX_RB_BC_CONTROL_ACCUM_DATA_FIFO_LIMIT__SHIFT 23
  465. static inline uint32_t A2XX_RB_BC_CONTROL_ACCUM_DATA_FIFO_LIMIT(uint32_t val)
  466. {
  467. return ((val) << A2XX_RB_BC_CONTROL_ACCUM_DATA_FIFO_LIMIT__SHIFT) & A2XX_RB_BC_CONTROL_ACCUM_DATA_FIFO_LIMIT__MASK;
  468. }
  469. #define A2XX_RB_BC_CONTROL_MEM_EXPORT_TIMEOUT_SELECT__MASK 0x18000000
  470. #define A2XX_RB_BC_CONTROL_MEM_EXPORT_TIMEOUT_SELECT__SHIFT 27
  471. static inline uint32_t A2XX_RB_BC_CONTROL_MEM_EXPORT_TIMEOUT_SELECT(uint32_t val)
  472. {
  473. return ((val) << A2XX_RB_BC_CONTROL_MEM_EXPORT_TIMEOUT_SELECT__SHIFT) & A2XX_RB_BC_CONTROL_MEM_EXPORT_TIMEOUT_SELECT__MASK;
  474. }
  475. #define A2XX_RB_BC_CONTROL_MEM_EXPORT_LINEAR_MODE_ENABLE 0x20000000
  476. #define A2XX_RB_BC_CONTROL_CRC_SYSTEM 0x40000000
  477. #define A2XX_RB_BC_CONTROL_RESERVED6 0x80000000
  478. #define REG_A2XX_RB_EDRAM_INFO 0x00000f02
  479. #define REG_A2XX_RB_DEBUG_CNTL 0x00000f26
  480. #define REG_A2XX_RB_DEBUG_DATA 0x00000f27
  481. #define REG_A2XX_RB_SURFACE_INFO 0x00002000
  482. #define REG_A2XX_RB_COLOR_INFO 0x00002001
  483. #define A2XX_RB_COLOR_INFO_FORMAT__MASK 0x0000000f
  484. #define A2XX_RB_COLOR_INFO_FORMAT__SHIFT 0
  485. static inline uint32_t A2XX_RB_COLOR_INFO_FORMAT(enum a2xx_colorformatx val)
  486. {
  487. return ((val) << A2XX_RB_COLOR_INFO_FORMAT__SHIFT) & A2XX_RB_COLOR_INFO_FORMAT__MASK;
  488. }
  489. #define A2XX_RB_COLOR_INFO_ROUND_MODE__MASK 0x00000030
  490. #define A2XX_RB_COLOR_INFO_ROUND_MODE__SHIFT 4
  491. static inline uint32_t A2XX_RB_COLOR_INFO_ROUND_MODE(uint32_t val)
  492. {
  493. return ((val) << A2XX_RB_COLOR_INFO_ROUND_MODE__SHIFT) & A2XX_RB_COLOR_INFO_ROUND_MODE__MASK;
  494. }
  495. #define A2XX_RB_COLOR_INFO_LINEAR 0x00000040
  496. #define A2XX_RB_COLOR_INFO_ENDIAN__MASK 0x00000180
  497. #define A2XX_RB_COLOR_INFO_ENDIAN__SHIFT 7
  498. static inline uint32_t A2XX_RB_COLOR_INFO_ENDIAN(uint32_t val)
  499. {
  500. return ((val) << A2XX_RB_COLOR_INFO_ENDIAN__SHIFT) & A2XX_RB_COLOR_INFO_ENDIAN__MASK;
  501. }
  502. #define A2XX_RB_COLOR_INFO_SWAP__MASK 0x00000600
  503. #define A2XX_RB_COLOR_INFO_SWAP__SHIFT 9
  504. static inline uint32_t A2XX_RB_COLOR_INFO_SWAP(uint32_t val)
  505. {
  506. return ((val) << A2XX_RB_COLOR_INFO_SWAP__SHIFT) & A2XX_RB_COLOR_INFO_SWAP__MASK;
  507. }
  508. #define A2XX_RB_COLOR_INFO_BASE__MASK 0xfffff000
  509. #define A2XX_RB_COLOR_INFO_BASE__SHIFT 12
  510. static inline uint32_t A2XX_RB_COLOR_INFO_BASE(uint32_t val)
  511. {
  512. return ((val >> 10) << A2XX_RB_COLOR_INFO_BASE__SHIFT) & A2XX_RB_COLOR_INFO_BASE__MASK;
  513. }
  514. #define REG_A2XX_RB_DEPTH_INFO 0x00002002
  515. #define A2XX_RB_DEPTH_INFO_DEPTH_FORMAT__MASK 0x00000001
  516. #define A2XX_RB_DEPTH_INFO_DEPTH_FORMAT__SHIFT 0
  517. static inline uint32_t A2XX_RB_DEPTH_INFO_DEPTH_FORMAT(enum adreno_rb_depth_format val)
  518. {
  519. return ((val) << A2XX_RB_DEPTH_INFO_DEPTH_FORMAT__SHIFT) & A2XX_RB_DEPTH_INFO_DEPTH_FORMAT__MASK;
  520. }
  521. #define A2XX_RB_DEPTH_INFO_DEPTH_BASE__MASK 0xfffff000
  522. #define A2XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT 12
  523. static inline uint32_t A2XX_RB_DEPTH_INFO_DEPTH_BASE(uint32_t val)
  524. {
  525. return ((val >> 10) << A2XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT) & A2XX_RB_DEPTH_INFO_DEPTH_BASE__MASK;
  526. }
  527. #define REG_A2XX_A225_RB_COLOR_INFO3 0x00002005
  528. #define REG_A2XX_COHER_DEST_BASE_0 0x00002006
  529. #define REG_A2XX_PA_SC_SCREEN_SCISSOR_TL 0x0000200e
  530. #define A2XX_PA_SC_SCREEN_SCISSOR_TL_WINDOW_OFFSET_DISABLE 0x80000000
  531. #define A2XX_PA_SC_SCREEN_SCISSOR_TL_X__MASK 0x00007fff
  532. #define A2XX_PA_SC_SCREEN_SCISSOR_TL_X__SHIFT 0
  533. static inline uint32_t A2XX_PA_SC_SCREEN_SCISSOR_TL_X(uint32_t val)
  534. {
  535. return ((val) << A2XX_PA_SC_SCREEN_SCISSOR_TL_X__SHIFT) & A2XX_PA_SC_SCREEN_SCISSOR_TL_X__MASK;
  536. }
  537. #define A2XX_PA_SC_SCREEN_SCISSOR_TL_Y__MASK 0x7fff0000
  538. #define A2XX_PA_SC_SCREEN_SCISSOR_TL_Y__SHIFT 16
  539. static inline uint32_t A2XX_PA_SC_SCREEN_SCISSOR_TL_Y(uint32_t val)
  540. {
  541. return ((val) << A2XX_PA_SC_SCREEN_SCISSOR_TL_Y__SHIFT) & A2XX_PA_SC_SCREEN_SCISSOR_TL_Y__MASK;
  542. }
  543. #define REG_A2XX_PA_SC_SCREEN_SCISSOR_BR 0x0000200f
  544. #define A2XX_PA_SC_SCREEN_SCISSOR_BR_WINDOW_OFFSET_DISABLE 0x80000000
  545. #define A2XX_PA_SC_SCREEN_SCISSOR_BR_X__MASK 0x00007fff
  546. #define A2XX_PA_SC_SCREEN_SCISSOR_BR_X__SHIFT 0
  547. static inline uint32_t A2XX_PA_SC_SCREEN_SCISSOR_BR_X(uint32_t val)
  548. {
  549. return ((val) << A2XX_PA_SC_SCREEN_SCISSOR_BR_X__SHIFT) & A2XX_PA_SC_SCREEN_SCISSOR_BR_X__MASK;
  550. }
  551. #define A2XX_PA_SC_SCREEN_SCISSOR_BR_Y__MASK 0x7fff0000
  552. #define A2XX_PA_SC_SCREEN_SCISSOR_BR_Y__SHIFT 16
  553. static inline uint32_t A2XX_PA_SC_SCREEN_SCISSOR_BR_Y(uint32_t val)
  554. {
  555. return ((val) << A2XX_PA_SC_SCREEN_SCISSOR_BR_Y__SHIFT) & A2XX_PA_SC_SCREEN_SCISSOR_BR_Y__MASK;
  556. }
  557. #define REG_A2XX_PA_SC_WINDOW_OFFSET 0x00002080
  558. #define A2XX_PA_SC_WINDOW_OFFSET_X__MASK 0x00007fff
  559. #define A2XX_PA_SC_WINDOW_OFFSET_X__SHIFT 0
  560. static inline uint32_t A2XX_PA_SC_WINDOW_OFFSET_X(int32_t val)
  561. {
  562. return ((val) << A2XX_PA_SC_WINDOW_OFFSET_X__SHIFT) & A2XX_PA_SC_WINDOW_OFFSET_X__MASK;
  563. }
  564. #define A2XX_PA_SC_WINDOW_OFFSET_Y__MASK 0x7fff0000
  565. #define A2XX_PA_SC_WINDOW_OFFSET_Y__SHIFT 16
  566. static inline uint32_t A2XX_PA_SC_WINDOW_OFFSET_Y(int32_t val)
  567. {
  568. return ((val) << A2XX_PA_SC_WINDOW_OFFSET_Y__SHIFT) & A2XX_PA_SC_WINDOW_OFFSET_Y__MASK;
  569. }
  570. #define A2XX_PA_SC_WINDOW_OFFSET_DISABLE 0x80000000
  571. #define REG_A2XX_PA_SC_WINDOW_SCISSOR_TL 0x00002081
  572. #define A2XX_PA_SC_WINDOW_SCISSOR_TL_WINDOW_OFFSET_DISABLE 0x80000000
  573. #define A2XX_PA_SC_WINDOW_SCISSOR_TL_X__MASK 0x00007fff
  574. #define A2XX_PA_SC_WINDOW_SCISSOR_TL_X__SHIFT 0
  575. static inline uint32_t A2XX_PA_SC_WINDOW_SCISSOR_TL_X(uint32_t val)
  576. {
  577. return ((val) << A2XX_PA_SC_WINDOW_SCISSOR_TL_X__SHIFT) & A2XX_PA_SC_WINDOW_SCISSOR_TL_X__MASK;
  578. }
  579. #define A2XX_PA_SC_WINDOW_SCISSOR_TL_Y__MASK 0x7fff0000
  580. #define A2XX_PA_SC_WINDOW_SCISSOR_TL_Y__SHIFT 16
  581. static inline uint32_t A2XX_PA_SC_WINDOW_SCISSOR_TL_Y(uint32_t val)
  582. {
  583. return ((val) << A2XX_PA_SC_WINDOW_SCISSOR_TL_Y__SHIFT) & A2XX_PA_SC_WINDOW_SCISSOR_TL_Y__MASK;
  584. }
  585. #define REG_A2XX_PA_SC_WINDOW_SCISSOR_BR 0x00002082
  586. #define A2XX_PA_SC_WINDOW_SCISSOR_BR_WINDOW_OFFSET_DISABLE 0x80000000
  587. #define A2XX_PA_SC_WINDOW_SCISSOR_BR_X__MASK 0x00007fff
  588. #define A2XX_PA_SC_WINDOW_SCISSOR_BR_X__SHIFT 0
  589. static inline uint32_t A2XX_PA_SC_WINDOW_SCISSOR_BR_X(uint32_t val)
  590. {
  591. return ((val) << A2XX_PA_SC_WINDOW_SCISSOR_BR_X__SHIFT) & A2XX_PA_SC_WINDOW_SCISSOR_BR_X__MASK;
  592. }
  593. #define A2XX_PA_SC_WINDOW_SCISSOR_BR_Y__MASK 0x7fff0000
  594. #define A2XX_PA_SC_WINDOW_SCISSOR_BR_Y__SHIFT 16
  595. static inline uint32_t A2XX_PA_SC_WINDOW_SCISSOR_BR_Y(uint32_t val)
  596. {
  597. return ((val) << A2XX_PA_SC_WINDOW_SCISSOR_BR_Y__SHIFT) & A2XX_PA_SC_WINDOW_SCISSOR_BR_Y__MASK;
  598. }
  599. #define REG_A2XX_UNKNOWN_2010 0x00002010
  600. #define REG_A2XX_VGT_MAX_VTX_INDX 0x00002100
  601. #define REG_A2XX_VGT_MIN_VTX_INDX 0x00002101
  602. #define REG_A2XX_VGT_INDX_OFFSET 0x00002102
  603. #define REG_A2XX_A225_PC_MULTI_PRIM_IB_RESET_INDX 0x00002103
  604. #define REG_A2XX_RB_COLOR_MASK 0x00002104
  605. #define A2XX_RB_COLOR_MASK_WRITE_RED 0x00000001
  606. #define A2XX_RB_COLOR_MASK_WRITE_GREEN 0x00000002
  607. #define A2XX_RB_COLOR_MASK_WRITE_BLUE 0x00000004
  608. #define A2XX_RB_COLOR_MASK_WRITE_ALPHA 0x00000008
  609. #define REG_A2XX_RB_BLEND_RED 0x00002105
  610. #define REG_A2XX_RB_BLEND_GREEN 0x00002106
  611. #define REG_A2XX_RB_BLEND_BLUE 0x00002107
  612. #define REG_A2XX_RB_BLEND_ALPHA 0x00002108
  613. #define REG_A2XX_RB_FOG_COLOR 0x00002109
  614. #define REG_A2XX_RB_STENCILREFMASK_BF 0x0000210c
  615. #define A2XX_RB_STENCILREFMASK_BF_STENCILREF__MASK 0x000000ff
  616. #define A2XX_RB_STENCILREFMASK_BF_STENCILREF__SHIFT 0
  617. static inline uint32_t A2XX_RB_STENCILREFMASK_BF_STENCILREF(uint32_t val)
  618. {
  619. return ((val) << A2XX_RB_STENCILREFMASK_BF_STENCILREF__SHIFT) & A2XX_RB_STENCILREFMASK_BF_STENCILREF__MASK;
  620. }
  621. #define A2XX_RB_STENCILREFMASK_BF_STENCILMASK__MASK 0x0000ff00
  622. #define A2XX_RB_STENCILREFMASK_BF_STENCILMASK__SHIFT 8
  623. static inline uint32_t A2XX_RB_STENCILREFMASK_BF_STENCILMASK(uint32_t val)
  624. {
  625. return ((val) << A2XX_RB_STENCILREFMASK_BF_STENCILMASK__SHIFT) & A2XX_RB_STENCILREFMASK_BF_STENCILMASK__MASK;
  626. }
  627. #define A2XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__MASK 0x00ff0000
  628. #define A2XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__SHIFT 16
  629. static inline uint32_t A2XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK(uint32_t val)
  630. {
  631. return ((val) << A2XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__SHIFT) & A2XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__MASK;
  632. }
  633. #define REG_A2XX_RB_STENCILREFMASK 0x0000210d
  634. #define A2XX_RB_STENCILREFMASK_STENCILREF__MASK 0x000000ff
  635. #define A2XX_RB_STENCILREFMASK_STENCILREF__SHIFT 0
  636. static inline uint32_t A2XX_RB_STENCILREFMASK_STENCILREF(uint32_t val)
  637. {
  638. return ((val) << A2XX_RB_STENCILREFMASK_STENCILREF__SHIFT) & A2XX_RB_STENCILREFMASK_STENCILREF__MASK;
  639. }
  640. #define A2XX_RB_STENCILREFMASK_STENCILMASK__MASK 0x0000ff00
  641. #define A2XX_RB_STENCILREFMASK_STENCILMASK__SHIFT 8
  642. static inline uint32_t A2XX_RB_STENCILREFMASK_STENCILMASK(uint32_t val)
  643. {
  644. return ((val) << A2XX_RB_STENCILREFMASK_STENCILMASK__SHIFT) & A2XX_RB_STENCILREFMASK_STENCILMASK__MASK;
  645. }
  646. #define A2XX_RB_STENCILREFMASK_STENCILWRITEMASK__MASK 0x00ff0000
  647. #define A2XX_RB_STENCILREFMASK_STENCILWRITEMASK__SHIFT 16
  648. static inline uint32_t A2XX_RB_STENCILREFMASK_STENCILWRITEMASK(uint32_t val)
  649. {
  650. return ((val) << A2XX_RB_STENCILREFMASK_STENCILWRITEMASK__SHIFT) & A2XX_RB_STENCILREFMASK_STENCILWRITEMASK__MASK;
  651. }
  652. #define REG_A2XX_RB_ALPHA_REF 0x0000210e
  653. #define REG_A2XX_PA_CL_VPORT_XSCALE 0x0000210f
  654. #define A2XX_PA_CL_VPORT_XSCALE__MASK 0xffffffff
  655. #define A2XX_PA_CL_VPORT_XSCALE__SHIFT 0
  656. static inline uint32_t A2XX_PA_CL_VPORT_XSCALE(float val)
  657. {
  658. return ((fui(val)) << A2XX_PA_CL_VPORT_XSCALE__SHIFT) & A2XX_PA_CL_VPORT_XSCALE__MASK;
  659. }
  660. #define REG_A2XX_PA_CL_VPORT_XOFFSET 0x00002110
  661. #define A2XX_PA_CL_VPORT_XOFFSET__MASK 0xffffffff
  662. #define A2XX_PA_CL_VPORT_XOFFSET__SHIFT 0
  663. static inline uint32_t A2XX_PA_CL_VPORT_XOFFSET(float val)
  664. {
  665. return ((fui(val)) << A2XX_PA_CL_VPORT_XOFFSET__SHIFT) & A2XX_PA_CL_VPORT_XOFFSET__MASK;
  666. }
  667. #define REG_A2XX_PA_CL_VPORT_YSCALE 0x00002111
  668. #define A2XX_PA_CL_VPORT_YSCALE__MASK 0xffffffff
  669. #define A2XX_PA_CL_VPORT_YSCALE__SHIFT 0
  670. static inline uint32_t A2XX_PA_CL_VPORT_YSCALE(float val)
  671. {
  672. return ((fui(val)) << A2XX_PA_CL_VPORT_YSCALE__SHIFT) & A2XX_PA_CL_VPORT_YSCALE__MASK;
  673. }
  674. #define REG_A2XX_PA_CL_VPORT_YOFFSET 0x00002112
  675. #define A2XX_PA_CL_VPORT_YOFFSET__MASK 0xffffffff
  676. #define A2XX_PA_CL_VPORT_YOFFSET__SHIFT 0
  677. static inline uint32_t A2XX_PA_CL_VPORT_YOFFSET(float val)
  678. {
  679. return ((fui(val)) << A2XX_PA_CL_VPORT_YOFFSET__SHIFT) & A2XX_PA_CL_VPORT_YOFFSET__MASK;
  680. }
  681. #define REG_A2XX_PA_CL_VPORT_ZSCALE 0x00002113
  682. #define A2XX_PA_CL_VPORT_ZSCALE__MASK 0xffffffff
  683. #define A2XX_PA_CL_VPORT_ZSCALE__SHIFT 0
  684. static inline uint32_t A2XX_PA_CL_VPORT_ZSCALE(float val)
  685. {
  686. return ((fui(val)) << A2XX_PA_CL_VPORT_ZSCALE__SHIFT) & A2XX_PA_CL_VPORT_ZSCALE__MASK;
  687. }
  688. #define REG_A2XX_PA_CL_VPORT_ZOFFSET 0x00002114
  689. #define A2XX_PA_CL_VPORT_ZOFFSET__MASK 0xffffffff
  690. #define A2XX_PA_CL_VPORT_ZOFFSET__SHIFT 0
  691. static inline uint32_t A2XX_PA_CL_VPORT_ZOFFSET(float val)
  692. {
  693. return ((fui(val)) << A2XX_PA_CL_VPORT_ZOFFSET__SHIFT) & A2XX_PA_CL_VPORT_ZOFFSET__MASK;
  694. }
  695. #define REG_A2XX_SQ_PROGRAM_CNTL 0x00002180
  696. #define A2XX_SQ_PROGRAM_CNTL_VS_REGS__MASK 0x000000ff
  697. #define A2XX_SQ_PROGRAM_CNTL_VS_REGS__SHIFT 0
  698. static inline uint32_t A2XX_SQ_PROGRAM_CNTL_VS_REGS(uint32_t val)
  699. {
  700. return ((val) << A2XX_SQ_PROGRAM_CNTL_VS_REGS__SHIFT) & A2XX_SQ_PROGRAM_CNTL_VS_REGS__MASK;
  701. }
  702. #define A2XX_SQ_PROGRAM_CNTL_PS_REGS__MASK 0x0000ff00
  703. #define A2XX_SQ_PROGRAM_CNTL_PS_REGS__SHIFT 8
  704. static inline uint32_t A2XX_SQ_PROGRAM_CNTL_PS_REGS(uint32_t val)
  705. {
  706. return ((val) << A2XX_SQ_PROGRAM_CNTL_PS_REGS__SHIFT) & A2XX_SQ_PROGRAM_CNTL_PS_REGS__MASK;
  707. }
  708. #define A2XX_SQ_PROGRAM_CNTL_VS_RESOURCE 0x00010000
  709. #define A2XX_SQ_PROGRAM_CNTL_PS_RESOURCE 0x00020000
  710. #define A2XX_SQ_PROGRAM_CNTL_PARAM_GEN 0x00040000
  711. #define A2XX_SQ_PROGRAM_CNTL_GEN_INDEX_PIX 0x00080000
  712. #define A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_COUNT__MASK 0x00f00000
  713. #define A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_COUNT__SHIFT 20
  714. static inline uint32_t A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_COUNT(uint32_t val)
  715. {
  716. return ((val) << A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_COUNT__SHIFT) & A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_COUNT__MASK;
  717. }
  718. #define A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_MODE__MASK 0x07000000
  719. #define A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_MODE__SHIFT 24
  720. static inline uint32_t A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_MODE(enum a2xx_sq_ps_vtx_mode val)
  721. {
  722. return ((val) << A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_MODE__SHIFT) & A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_MODE__MASK;
  723. }
  724. #define A2XX_SQ_PROGRAM_CNTL_PS_EXPORT_MODE__MASK 0x78000000
  725. #define A2XX_SQ_PROGRAM_CNTL_PS_EXPORT_MODE__SHIFT 27
  726. static inline uint32_t A2XX_SQ_PROGRAM_CNTL_PS_EXPORT_MODE(uint32_t val)
  727. {
  728. return ((val) << A2XX_SQ_PROGRAM_CNTL_PS_EXPORT_MODE__SHIFT) & A2XX_SQ_PROGRAM_CNTL_PS_EXPORT_MODE__MASK;
  729. }
  730. #define A2XX_SQ_PROGRAM_CNTL_GEN_INDEX_VTX 0x80000000
  731. #define REG_A2XX_SQ_CONTEXT_MISC 0x00002181
  732. #define A2XX_SQ_CONTEXT_MISC_INST_PRED_OPTIMIZE 0x00000001
  733. #define A2XX_SQ_CONTEXT_MISC_SC_OUTPUT_SCREEN_XY 0x00000002
  734. #define A2XX_SQ_CONTEXT_MISC_SC_SAMPLE_CNTL__MASK 0x0000000c
  735. #define A2XX_SQ_CONTEXT_MISC_SC_SAMPLE_CNTL__SHIFT 2
  736. static inline uint32_t A2XX_SQ_CONTEXT_MISC_SC_SAMPLE_CNTL(enum a2xx_sq_sample_cntl val)
  737. {
  738. return ((val) << A2XX_SQ_CONTEXT_MISC_SC_SAMPLE_CNTL__SHIFT) & A2XX_SQ_CONTEXT_MISC_SC_SAMPLE_CNTL__MASK;
  739. }
  740. #define A2XX_SQ_CONTEXT_MISC_PARAM_GEN_POS__MASK 0x0000ff00
  741. #define A2XX_SQ_CONTEXT_MISC_PARAM_GEN_POS__SHIFT 8
  742. static inline uint32_t A2XX_SQ_CONTEXT_MISC_PARAM_GEN_POS(uint32_t val)
  743. {
  744. return ((val) << A2XX_SQ_CONTEXT_MISC_PARAM_GEN_POS__SHIFT) & A2XX_SQ_CONTEXT_MISC_PARAM_GEN_POS__MASK;
  745. }
  746. #define A2XX_SQ_CONTEXT_MISC_PERFCOUNTER_REF 0x00010000
  747. #define A2XX_SQ_CONTEXT_MISC_YEILD_OPTIMIZE 0x00020000
  748. #define A2XX_SQ_CONTEXT_MISC_TX_CACHE_SEL 0x00040000
  749. #define REG_A2XX_SQ_INTERPOLATOR_CNTL 0x00002182
  750. #define REG_A2XX_SQ_WRAPPING_0 0x00002183
  751. #define REG_A2XX_SQ_WRAPPING_1 0x00002184
  752. #define REG_A2XX_SQ_PS_PROGRAM 0x000021f6
  753. #define REG_A2XX_SQ_VS_PROGRAM 0x000021f7
  754. #define REG_A2XX_VGT_EVENT_INITIATOR 0x000021f9
  755. #define REG_A2XX_VGT_DRAW_INITIATOR 0x000021fc
  756. #define A2XX_VGT_DRAW_INITIATOR_PRIM_TYPE__MASK 0x0000003f
  757. #define A2XX_VGT_DRAW_INITIATOR_PRIM_TYPE__SHIFT 0
  758. static inline uint32_t A2XX_VGT_DRAW_INITIATOR_PRIM_TYPE(enum pc_di_primtype val)
  759. {
  760. return ((val) << A2XX_VGT_DRAW_INITIATOR_PRIM_TYPE__SHIFT) & A2XX_VGT_DRAW_INITIATOR_PRIM_TYPE__MASK;
  761. }
  762. #define A2XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__MASK 0x000000c0
  763. #define A2XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__SHIFT 6
  764. static inline uint32_t A2XX_VGT_DRAW_INITIATOR_SOURCE_SELECT(enum pc_di_src_sel val)
  765. {
  766. return ((val) << A2XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__SHIFT) & A2XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__MASK;
  767. }
  768. #define A2XX_VGT_DRAW_INITIATOR_VIS_CULL__MASK 0x00000600
  769. #define A2XX_VGT_DRAW_INITIATOR_VIS_CULL__SHIFT 9
  770. static inline uint32_t A2XX_VGT_DRAW_INITIATOR_VIS_CULL(enum pc_di_vis_cull_mode val)
  771. {
  772. return ((val) << A2XX_VGT_DRAW_INITIATOR_VIS_CULL__SHIFT) & A2XX_VGT_DRAW_INITIATOR_VIS_CULL__MASK;
  773. }
  774. #define A2XX_VGT_DRAW_INITIATOR_INDEX_SIZE__MASK 0x00000800
  775. #define A2XX_VGT_DRAW_INITIATOR_INDEX_SIZE__SHIFT 11
  776. static inline uint32_t A2XX_VGT_DRAW_INITIATOR_INDEX_SIZE(enum pc_di_index_size val)
  777. {
  778. return ((val) << A2XX_VGT_DRAW_INITIATOR_INDEX_SIZE__SHIFT) & A2XX_VGT_DRAW_INITIATOR_INDEX_SIZE__MASK;
  779. }
  780. #define A2XX_VGT_DRAW_INITIATOR_NOT_EOP 0x00001000
  781. #define A2XX_VGT_DRAW_INITIATOR_SMALL_INDEX 0x00002000
  782. #define A2XX_VGT_DRAW_INITIATOR_PRE_DRAW_INITIATOR_ENABLE 0x00004000
  783. #define A2XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__MASK 0xff000000
  784. #define A2XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__SHIFT 24
  785. static inline uint32_t A2XX_VGT_DRAW_INITIATOR_NUM_INSTANCES(uint32_t val)
  786. {
  787. return ((val) << A2XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__SHIFT) & A2XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__MASK;
  788. }
  789. #define REG_A2XX_VGT_IMMED_DATA 0x000021fd
  790. #define REG_A2XX_RB_DEPTHCONTROL 0x00002200
  791. #define A2XX_RB_DEPTHCONTROL_STENCIL_ENABLE 0x00000001
  792. #define A2XX_RB_DEPTHCONTROL_Z_ENABLE 0x00000002
  793. #define A2XX_RB_DEPTHCONTROL_Z_WRITE_ENABLE 0x00000004
  794. #define A2XX_RB_DEPTHCONTROL_EARLY_Z_ENABLE 0x00000008
  795. #define A2XX_RB_DEPTHCONTROL_ZFUNC__MASK 0x00000070
  796. #define A2XX_RB_DEPTHCONTROL_ZFUNC__SHIFT 4
  797. static inline uint32_t A2XX_RB_DEPTHCONTROL_ZFUNC(enum adreno_compare_func val)
  798. {
  799. return ((val) << A2XX_RB_DEPTHCONTROL_ZFUNC__SHIFT) & A2XX_RB_DEPTHCONTROL_ZFUNC__MASK;
  800. }
  801. #define A2XX_RB_DEPTHCONTROL_BACKFACE_ENABLE 0x00000080
  802. #define A2XX_RB_DEPTHCONTROL_STENCILFUNC__MASK 0x00000700
  803. #define A2XX_RB_DEPTHCONTROL_STENCILFUNC__SHIFT 8
  804. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILFUNC(enum adreno_compare_func val)
  805. {
  806. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILFUNC__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILFUNC__MASK;
  807. }
  808. #define A2XX_RB_DEPTHCONTROL_STENCILFAIL__MASK 0x00003800
  809. #define A2XX_RB_DEPTHCONTROL_STENCILFAIL__SHIFT 11
  810. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILFAIL(enum adreno_stencil_op val)
  811. {
  812. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILFAIL__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILFAIL__MASK;
  813. }
  814. #define A2XX_RB_DEPTHCONTROL_STENCILZPASS__MASK 0x0001c000
  815. #define A2XX_RB_DEPTHCONTROL_STENCILZPASS__SHIFT 14
  816. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILZPASS(enum adreno_stencil_op val)
  817. {
  818. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILZPASS__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILZPASS__MASK;
  819. }
  820. #define A2XX_RB_DEPTHCONTROL_STENCILZFAIL__MASK 0x000e0000
  821. #define A2XX_RB_DEPTHCONTROL_STENCILZFAIL__SHIFT 17
  822. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILZFAIL(enum adreno_stencil_op val)
  823. {
  824. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILZFAIL__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILZFAIL__MASK;
  825. }
  826. #define A2XX_RB_DEPTHCONTROL_STENCILFUNC_BF__MASK 0x00700000
  827. #define A2XX_RB_DEPTHCONTROL_STENCILFUNC_BF__SHIFT 20
  828. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILFUNC_BF(enum adreno_compare_func val)
  829. {
  830. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILFUNC_BF__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILFUNC_BF__MASK;
  831. }
  832. #define A2XX_RB_DEPTHCONTROL_STENCILFAIL_BF__MASK 0x03800000
  833. #define A2XX_RB_DEPTHCONTROL_STENCILFAIL_BF__SHIFT 23
  834. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILFAIL_BF(enum adreno_stencil_op val)
  835. {
  836. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILFAIL_BF__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILFAIL_BF__MASK;
  837. }
  838. #define A2XX_RB_DEPTHCONTROL_STENCILZPASS_BF__MASK 0x1c000000
  839. #define A2XX_RB_DEPTHCONTROL_STENCILZPASS_BF__SHIFT 26
  840. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILZPASS_BF(enum adreno_stencil_op val)
  841. {
  842. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILZPASS_BF__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILZPASS_BF__MASK;
  843. }
  844. #define A2XX_RB_DEPTHCONTROL_STENCILZFAIL_BF__MASK 0xe0000000
  845. #define A2XX_RB_DEPTHCONTROL_STENCILZFAIL_BF__SHIFT 29
  846. static inline uint32_t A2XX_RB_DEPTHCONTROL_STENCILZFAIL_BF(enum adreno_stencil_op val)
  847. {
  848. return ((val) << A2XX_RB_DEPTHCONTROL_STENCILZFAIL_BF__SHIFT) & A2XX_RB_DEPTHCONTROL_STENCILZFAIL_BF__MASK;
  849. }
  850. #define REG_A2XX_RB_BLEND_CONTROL 0x00002201
  851. #define A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND__MASK 0x0000001f
  852. #define A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND__SHIFT 0
  853. static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND(enum adreno_rb_blend_factor val)
  854. {
  855. return ((val) << A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND__SHIFT) & A2XX_RB_BLEND_CONTROL_COLOR_SRCBLEND__MASK;
  856. }
  857. #define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK 0x000000e0
  858. #define A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT 5
  859. static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN(enum a2xx_rb_blend_opcode val)
  860. {
  861. return ((val) << A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__SHIFT) & A2XX_RB_BLEND_CONTROL_COLOR_COMB_FCN__MASK;
  862. }
  863. #define A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND__MASK 0x00001f00
  864. #define A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND__SHIFT 8
  865. static inline uint32_t A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND(enum adreno_rb_blend_factor val)
  866. {
  867. return ((val) << A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND__SHIFT) & A2XX_RB_BLEND_CONTROL_COLOR_DESTBLEND__MASK;
  868. }
  869. #define A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND__MASK 0x001f0000
  870. #define A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND__SHIFT 16
  871. static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND(enum adreno_rb_blend_factor val)
  872. {
  873. return ((val) << A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND__SHIFT) & A2XX_RB_BLEND_CONTROL_ALPHA_SRCBLEND__MASK;
  874. }
  875. #define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK 0x00e00000
  876. #define A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT 21
  877. static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN(enum a2xx_rb_blend_opcode val)
  878. {
  879. return ((val) << A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__SHIFT) & A2XX_RB_BLEND_CONTROL_ALPHA_COMB_FCN__MASK;
  880. }
  881. #define A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND__MASK 0x1f000000
  882. #define A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND__SHIFT 24
  883. static inline uint32_t A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND(enum adreno_rb_blend_factor val)
  884. {
  885. return ((val) << A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND__SHIFT) & A2XX_RB_BLEND_CONTROL_ALPHA_DESTBLEND__MASK;
  886. }
  887. #define A2XX_RB_BLEND_CONTROL_BLEND_FORCE_ENABLE 0x20000000
  888. #define A2XX_RB_BLEND_CONTROL_BLEND_FORCE 0x40000000
  889. #define REG_A2XX_RB_COLORCONTROL 0x00002202
  890. #define A2XX_RB_COLORCONTROL_ALPHA_FUNC__MASK 0x00000007
  891. #define A2XX_RB_COLORCONTROL_ALPHA_FUNC__SHIFT 0
  892. static inline uint32_t A2XX_RB_COLORCONTROL_ALPHA_FUNC(enum adreno_compare_func val)
  893. {
  894. return ((val) << A2XX_RB_COLORCONTROL_ALPHA_FUNC__SHIFT) & A2XX_RB_COLORCONTROL_ALPHA_FUNC__MASK;
  895. }
  896. #define A2XX_RB_COLORCONTROL_ALPHA_TEST_ENABLE 0x00000008
  897. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_ENABLE 0x00000010
  898. #define A2XX_RB_COLORCONTROL_BLEND_DISABLE 0x00000020
  899. #define A2XX_RB_COLORCONTROL_VOB_ENABLE 0x00000040
  900. #define A2XX_RB_COLORCONTROL_VS_EXPORTS_FOG 0x00000080
  901. #define A2XX_RB_COLORCONTROL_ROP_CODE__MASK 0x00000f00
  902. #define A2XX_RB_COLORCONTROL_ROP_CODE__SHIFT 8
  903. static inline uint32_t A2XX_RB_COLORCONTROL_ROP_CODE(uint32_t val)
  904. {
  905. return ((val) << A2XX_RB_COLORCONTROL_ROP_CODE__SHIFT) & A2XX_RB_COLORCONTROL_ROP_CODE__MASK;
  906. }
  907. #define A2XX_RB_COLORCONTROL_DITHER_MODE__MASK 0x00003000
  908. #define A2XX_RB_COLORCONTROL_DITHER_MODE__SHIFT 12
  909. static inline uint32_t A2XX_RB_COLORCONTROL_DITHER_MODE(enum adreno_rb_dither_mode val)
  910. {
  911. return ((val) << A2XX_RB_COLORCONTROL_DITHER_MODE__SHIFT) & A2XX_RB_COLORCONTROL_DITHER_MODE__MASK;
  912. }
  913. #define A2XX_RB_COLORCONTROL_DITHER_TYPE__MASK 0x0000c000
  914. #define A2XX_RB_COLORCONTROL_DITHER_TYPE__SHIFT 14
  915. static inline uint32_t A2XX_RB_COLORCONTROL_DITHER_TYPE(enum a2xx_rb_dither_type val)
  916. {
  917. return ((val) << A2XX_RB_COLORCONTROL_DITHER_TYPE__SHIFT) & A2XX_RB_COLORCONTROL_DITHER_TYPE__MASK;
  918. }
  919. #define A2XX_RB_COLORCONTROL_PIXEL_FOG 0x00010000
  920. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET0__MASK 0x03000000
  921. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET0__SHIFT 24
  922. static inline uint32_t A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET0(uint32_t val)
  923. {
  924. return ((val) << A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET0__SHIFT) & A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET0__MASK;
  925. }
  926. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET1__MASK 0x0c000000
  927. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET1__SHIFT 26
  928. static inline uint32_t A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET1(uint32_t val)
  929. {
  930. return ((val) << A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET1__SHIFT) & A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET1__MASK;
  931. }
  932. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET2__MASK 0x30000000
  933. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET2__SHIFT 28
  934. static inline uint32_t A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET2(uint32_t val)
  935. {
  936. return ((val) << A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET2__SHIFT) & A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET2__MASK;
  937. }
  938. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET3__MASK 0xc0000000
  939. #define A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET3__SHIFT 30
  940. static inline uint32_t A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET3(uint32_t val)
  941. {
  942. return ((val) << A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET3__SHIFT) & A2XX_RB_COLORCONTROL_ALPHA_TO_MASK_OFFSET3__MASK;
  943. }
  944. #define REG_A2XX_VGT_CURRENT_BIN_ID_MAX 0x00002203
  945. #define A2XX_VGT_CURRENT_BIN_ID_MAX_COLUMN__MASK 0x00000007
  946. #define A2XX_VGT_CURRENT_BIN_ID_MAX_COLUMN__SHIFT 0
  947. static inline uint32_t A2XX_VGT_CURRENT_BIN_ID_MAX_COLUMN(uint32_t val)
  948. {
  949. return ((val) << A2XX_VGT_CURRENT_BIN_ID_MAX_COLUMN__SHIFT) & A2XX_VGT_CURRENT_BIN_ID_MAX_COLUMN__MASK;
  950. }
  951. #define A2XX_VGT_CURRENT_BIN_ID_MAX_ROW__MASK 0x00000038
  952. #define A2XX_VGT_CURRENT_BIN_ID_MAX_ROW__SHIFT 3
  953. static inline uint32_t A2XX_VGT_CURRENT_BIN_ID_MAX_ROW(uint32_t val)
  954. {
  955. return ((val) << A2XX_VGT_CURRENT_BIN_ID_MAX_ROW__SHIFT) & A2XX_VGT_CURRENT_BIN_ID_MAX_ROW__MASK;
  956. }
  957. #define A2XX_VGT_CURRENT_BIN_ID_MAX_GUARD_BAND_MASK__MASK 0x000001c0
  958. #define A2XX_VGT_CURRENT_BIN_ID_MAX_GUARD_BAND_MASK__SHIFT 6
  959. static inline uint32_t A2XX_VGT_CURRENT_BIN_ID_MAX_GUARD_BAND_MASK(uint32_t val)
  960. {
  961. return ((val) << A2XX_VGT_CURRENT_BIN_ID_MAX_GUARD_BAND_MASK__SHIFT) & A2XX_VGT_CURRENT_BIN_ID_MAX_GUARD_BAND_MASK__MASK;
  962. }
  963. #define REG_A2XX_PA_CL_CLIP_CNTL 0x00002204
  964. #define A2XX_PA_CL_CLIP_CNTL_CLIP_DISABLE 0x00010000
  965. #define A2XX_PA_CL_CLIP_CNTL_BOUNDARY_EDGE_FLAG_ENA 0x00040000
  966. #define A2XX_PA_CL_CLIP_CNTL_DX_CLIP_SPACE_DEF__MASK 0x00080000
  967. #define A2XX_PA_CL_CLIP_CNTL_DX_CLIP_SPACE_DEF__SHIFT 19
  968. static inline uint32_t A2XX_PA_CL_CLIP_CNTL_DX_CLIP_SPACE_DEF(enum a2xx_dx_clip_space val)
  969. {
  970. return ((val) << A2XX_PA_CL_CLIP_CNTL_DX_CLIP_SPACE_DEF__SHIFT) & A2XX_PA_CL_CLIP_CNTL_DX_CLIP_SPACE_DEF__MASK;
  971. }
  972. #define A2XX_PA_CL_CLIP_CNTL_DIS_CLIP_ERR_DETECT 0x00100000
  973. #define A2XX_PA_CL_CLIP_CNTL_VTX_KILL_OR 0x00200000
  974. #define A2XX_PA_CL_CLIP_CNTL_XY_NAN_RETAIN 0x00400000
  975. #define A2XX_PA_CL_CLIP_CNTL_Z_NAN_RETAIN 0x00800000
  976. #define A2XX_PA_CL_CLIP_CNTL_W_NAN_RETAIN 0x01000000
  977. #define REG_A2XX_PA_SU_SC_MODE_CNTL 0x00002205
  978. #define A2XX_PA_SU_SC_MODE_CNTL_CULL_FRONT 0x00000001
  979. #define A2XX_PA_SU_SC_MODE_CNTL_CULL_BACK 0x00000002
  980. #define A2XX_PA_SU_SC_MODE_CNTL_FACE 0x00000004
  981. #define A2XX_PA_SU_SC_MODE_CNTL_POLYMODE__MASK 0x00000018
  982. #define A2XX_PA_SU_SC_MODE_CNTL_POLYMODE__SHIFT 3
  983. static inline uint32_t A2XX_PA_SU_SC_MODE_CNTL_POLYMODE(enum a2xx_pa_su_sc_polymode val)
  984. {
  985. return ((val) << A2XX_PA_SU_SC_MODE_CNTL_POLYMODE__SHIFT) & A2XX_PA_SU_SC_MODE_CNTL_POLYMODE__MASK;
  986. }
  987. #define A2XX_PA_SU_SC_MODE_CNTL_FRONT_PTYPE__MASK 0x000000e0
  988. #define A2XX_PA_SU_SC_MODE_CNTL_FRONT_PTYPE__SHIFT 5
  989. static inline uint32_t A2XX_PA_SU_SC_MODE_CNTL_FRONT_PTYPE(enum adreno_pa_su_sc_draw val)
  990. {
  991. return ((val) << A2XX_PA_SU_SC_MODE_CNTL_FRONT_PTYPE__SHIFT) & A2XX_PA_SU_SC_MODE_CNTL_FRONT_PTYPE__MASK;
  992. }
  993. #define A2XX_PA_SU_SC_MODE_CNTL_BACK_PTYPE__MASK 0x00000700
  994. #define A2XX_PA_SU_SC_MODE_CNTL_BACK_PTYPE__SHIFT 8
  995. static inline uint32_t A2XX_PA_SU_SC_MODE_CNTL_BACK_PTYPE(enum adreno_pa_su_sc_draw val)
  996. {
  997. return ((val) << A2XX_PA_SU_SC_MODE_CNTL_BACK_PTYPE__SHIFT) & A2XX_PA_SU_SC_MODE_CNTL_BACK_PTYPE__MASK;
  998. }
  999. #define A2XX_PA_SU_SC_MODE_CNTL_POLY_OFFSET_FRONT_ENABLE 0x00000800
  1000. #define A2XX_PA_SU_SC_MODE_CNTL_POLY_OFFSET_BACK_ENABLE 0x00001000
  1001. #define A2XX_PA_SU_SC_MODE_CNTL_POLY_OFFSET_PARA_ENABLE 0x00002000
  1002. #define A2XX_PA_SU_SC_MODE_CNTL_MSAA_ENABLE 0x00008000
  1003. #define A2XX_PA_SU_SC_MODE_CNTL_VTX_WINDOW_OFFSET_ENABLE 0x00010000
  1004. #define A2XX_PA_SU_SC_MODE_CNTL_LINE_STIPPLE_ENABLE 0x00040000
  1005. #define A2XX_PA_SU_SC_MODE_CNTL_PROVOKING_VTX_LAST 0x00080000
  1006. #define A2XX_PA_SU_SC_MODE_CNTL_PERSP_CORR_DIS 0x00100000
  1007. #define A2XX_PA_SU_SC_MODE_CNTL_MULTI_PRIM_IB_ENA 0x00200000
  1008. #define A2XX_PA_SU_SC_MODE_CNTL_QUAD_ORDER_ENABLE 0x00800000
  1009. #define A2XX_PA_SU_SC_MODE_CNTL_WAIT_RB_IDLE_ALL_TRI 0x02000000
  1010. #define A2XX_PA_SU_SC_MODE_CNTL_WAIT_RB_IDLE_FIRST_TRI_NEW_STATE 0x04000000
  1011. #define A2XX_PA_SU_SC_MODE_CNTL_CLAMPED_FACENESS 0x10000000
  1012. #define A2XX_PA_SU_SC_MODE_CNTL_ZERO_AREA_FACENESS 0x20000000
  1013. #define A2XX_PA_SU_SC_MODE_CNTL_FACE_KILL_ENABLE 0x40000000
  1014. #define A2XX_PA_SU_SC_MODE_CNTL_FACE_WRITE_ENABLE 0x80000000
  1015. #define REG_A2XX_PA_CL_VTE_CNTL 0x00002206
  1016. #define A2XX_PA_CL_VTE_CNTL_VPORT_X_SCALE_ENA 0x00000001
  1017. #define A2XX_PA_CL_VTE_CNTL_VPORT_X_OFFSET_ENA 0x00000002
  1018. #define A2XX_PA_CL_VTE_CNTL_VPORT_Y_SCALE_ENA 0x00000004
  1019. #define A2XX_PA_CL_VTE_CNTL_VPORT_Y_OFFSET_ENA 0x00000008
  1020. #define A2XX_PA_CL_VTE_CNTL_VPORT_Z_SCALE_ENA 0x00000010
  1021. #define A2XX_PA_CL_VTE_CNTL_VPORT_Z_OFFSET_ENA 0x00000020
  1022. #define A2XX_PA_CL_VTE_CNTL_VTX_XY_FMT 0x00000100
  1023. #define A2XX_PA_CL_VTE_CNTL_VTX_Z_FMT 0x00000200
  1024. #define A2XX_PA_CL_VTE_CNTL_VTX_W0_FMT 0x00000400
  1025. #define A2XX_PA_CL_VTE_CNTL_PERFCOUNTER_REF 0x00000800
  1026. #define REG_A2XX_VGT_CURRENT_BIN_ID_MIN 0x00002207
  1027. #define A2XX_VGT_CURRENT_BIN_ID_MIN_COLUMN__MASK 0x00000007
  1028. #define A2XX_VGT_CURRENT_BIN_ID_MIN_COLUMN__SHIFT 0
  1029. static inline uint32_t A2XX_VGT_CURRENT_BIN_ID_MIN_COLUMN(uint32_t val)
  1030. {
  1031. return ((val) << A2XX_VGT_CURRENT_BIN_ID_MIN_COLUMN__SHIFT) & A2XX_VGT_CURRENT_BIN_ID_MIN_COLUMN__MASK;
  1032. }
  1033. #define A2XX_VGT_CURRENT_BIN_ID_MIN_ROW__MASK 0x00000038
  1034. #define A2XX_VGT_CURRENT_BIN_ID_MIN_ROW__SHIFT 3
  1035. static inline uint32_t A2XX_VGT_CURRENT_BIN_ID_MIN_ROW(uint32_t val)
  1036. {
  1037. return ((val) << A2XX_VGT_CURRENT_BIN_ID_MIN_ROW__SHIFT) & A2XX_VGT_CURRENT_BIN_ID_MIN_ROW__MASK;
  1038. }
  1039. #define A2XX_VGT_CURRENT_BIN_ID_MIN_GUARD_BAND_MASK__MASK 0x000001c0
  1040. #define A2XX_VGT_CURRENT_BIN_ID_MIN_GUARD_BAND_MASK__SHIFT 6
  1041. static inline uint32_t A2XX_VGT_CURRENT_BIN_ID_MIN_GUARD_BAND_MASK(uint32_t val)
  1042. {
  1043. return ((val) << A2XX_VGT_CURRENT_BIN_ID_MIN_GUARD_BAND_MASK__SHIFT) & A2XX_VGT_CURRENT_BIN_ID_MIN_GUARD_BAND_MASK__MASK;
  1044. }
  1045. #define REG_A2XX_RB_MODECONTROL 0x00002208
  1046. #define A2XX_RB_MODECONTROL_EDRAM_MODE__MASK 0x00000007
  1047. #define A2XX_RB_MODECONTROL_EDRAM_MODE__SHIFT 0
  1048. static inline uint32_t A2XX_RB_MODECONTROL_EDRAM_MODE(enum a2xx_rb_edram_mode val)
  1049. {
  1050. return ((val) << A2XX_RB_MODECONTROL_EDRAM_MODE__SHIFT) & A2XX_RB_MODECONTROL_EDRAM_MODE__MASK;
  1051. }
  1052. #define REG_A2XX_A220_RB_LRZ_VSC_CONTROL 0x00002209
  1053. #define REG_A2XX_RB_SAMPLE_POS 0x0000220a
  1054. #define REG_A2XX_CLEAR_COLOR 0x0000220b
  1055. #define A2XX_CLEAR_COLOR_RED__MASK 0x000000ff
  1056. #define A2XX_CLEAR_COLOR_RED__SHIFT 0
  1057. static inline uint32_t A2XX_CLEAR_COLOR_RED(uint32_t val)
  1058. {
  1059. return ((val) << A2XX_CLEAR_COLOR_RED__SHIFT) & A2XX_CLEAR_COLOR_RED__MASK;
  1060. }
  1061. #define A2XX_CLEAR_COLOR_GREEN__MASK 0x0000ff00
  1062. #define A2XX_CLEAR_COLOR_GREEN__SHIFT 8
  1063. static inline uint32_t A2XX_CLEAR_COLOR_GREEN(uint32_t val)
  1064. {
  1065. return ((val) << A2XX_CLEAR_COLOR_GREEN__SHIFT) & A2XX_CLEAR_COLOR_GREEN__MASK;
  1066. }
  1067. #define A2XX_CLEAR_COLOR_BLUE__MASK 0x00ff0000
  1068. #define A2XX_CLEAR_COLOR_BLUE__SHIFT 16
  1069. static inline uint32_t A2XX_CLEAR_COLOR_BLUE(uint32_t val)
  1070. {
  1071. return ((val) << A2XX_CLEAR_COLOR_BLUE__SHIFT) & A2XX_CLEAR_COLOR_BLUE__MASK;
  1072. }
  1073. #define A2XX_CLEAR_COLOR_ALPHA__MASK 0xff000000
  1074. #define A2XX_CLEAR_COLOR_ALPHA__SHIFT 24
  1075. static inline uint32_t A2XX_CLEAR_COLOR_ALPHA(uint32_t val)
  1076. {
  1077. return ((val) << A2XX_CLEAR_COLOR_ALPHA__SHIFT) & A2XX_CLEAR_COLOR_ALPHA__MASK;
  1078. }
  1079. #define REG_A2XX_A220_GRAS_CONTROL 0x00002210
  1080. #define REG_A2XX_PA_SU_POINT_SIZE 0x00002280
  1081. #define A2XX_PA_SU_POINT_SIZE_HEIGHT__MASK 0x0000ffff
  1082. #define A2XX_PA_SU_POINT_SIZE_HEIGHT__SHIFT 0
  1083. static inline uint32_t A2XX_PA_SU_POINT_SIZE_HEIGHT(float val)
  1084. {
  1085. return ((((uint32_t)(val * 16.0))) << A2XX_PA_SU_POINT_SIZE_HEIGHT__SHIFT) & A2XX_PA_SU_POINT_SIZE_HEIGHT__MASK;
  1086. }
  1087. #define A2XX_PA_SU_POINT_SIZE_WIDTH__MASK 0xffff0000
  1088. #define A2XX_PA_SU_POINT_SIZE_WIDTH__SHIFT 16
  1089. static inline uint32_t A2XX_PA_SU_POINT_SIZE_WIDTH(float val)
  1090. {
  1091. return ((((uint32_t)(val * 16.0))) << A2XX_PA_SU_POINT_SIZE_WIDTH__SHIFT) & A2XX_PA_SU_POINT_SIZE_WIDTH__MASK;
  1092. }
  1093. #define REG_A2XX_PA_SU_POINT_MINMAX 0x00002281
  1094. #define A2XX_PA_SU_POINT_MINMAX_MIN__MASK 0x0000ffff
  1095. #define A2XX_PA_SU_POINT_MINMAX_MIN__SHIFT 0
  1096. static inline uint32_t A2XX_PA_SU_POINT_MINMAX_MIN(float val)
  1097. {
  1098. return ((((uint32_t)(val * 16.0))) << A2XX_PA_SU_POINT_MINMAX_MIN__SHIFT) & A2XX_PA_SU_POINT_MINMAX_MIN__MASK;
  1099. }
  1100. #define A2XX_PA_SU_POINT_MINMAX_MAX__MASK 0xffff0000
  1101. #define A2XX_PA_SU_POINT_MINMAX_MAX__SHIFT 16
  1102. static inline uint32_t A2XX_PA_SU_POINT_MINMAX_MAX(float val)
  1103. {
  1104. return ((((uint32_t)(val * 16.0))) << A2XX_PA_SU_POINT_MINMAX_MAX__SHIFT) & A2XX_PA_SU_POINT_MINMAX_MAX__MASK;
  1105. }
  1106. #define REG_A2XX_PA_SU_LINE_CNTL 0x00002282
  1107. #define A2XX_PA_SU_LINE_CNTL_WIDTH__MASK 0x0000ffff
  1108. #define A2XX_PA_SU_LINE_CNTL_WIDTH__SHIFT 0
  1109. static inline uint32_t A2XX_PA_SU_LINE_CNTL_WIDTH(float val)
  1110. {
  1111. return ((((uint32_t)(val * 16.0))) << A2XX_PA_SU_LINE_CNTL_WIDTH__SHIFT) & A2XX_PA_SU_LINE_CNTL_WIDTH__MASK;
  1112. }
  1113. #define REG_A2XX_PA_SC_LINE_STIPPLE 0x00002283
  1114. #define A2XX_PA_SC_LINE_STIPPLE_LINE_PATTERN__MASK 0x0000ffff
  1115. #define A2XX_PA_SC_LINE_STIPPLE_LINE_PATTERN__SHIFT 0
  1116. static inline uint32_t A2XX_PA_SC_LINE_STIPPLE_LINE_PATTERN(uint32_t val)
  1117. {
  1118. return ((val) << A2XX_PA_SC_LINE_STIPPLE_LINE_PATTERN__SHIFT) & A2XX_PA_SC_LINE_STIPPLE_LINE_PATTERN__MASK;
  1119. }
  1120. #define A2XX_PA_SC_LINE_STIPPLE_REPEAT_COUNT__MASK 0x00ff0000
  1121. #define A2XX_PA_SC_LINE_STIPPLE_REPEAT_COUNT__SHIFT 16
  1122. static inline uint32_t A2XX_PA_SC_LINE_STIPPLE_REPEAT_COUNT(uint32_t val)
  1123. {
  1124. return ((val) << A2XX_PA_SC_LINE_STIPPLE_REPEAT_COUNT__SHIFT) & A2XX_PA_SC_LINE_STIPPLE_REPEAT_COUNT__MASK;
  1125. }
  1126. #define A2XX_PA_SC_LINE_STIPPLE_PATTERN_BIT_ORDER__MASK 0x10000000
  1127. #define A2XX_PA_SC_LINE_STIPPLE_PATTERN_BIT_ORDER__SHIFT 28
  1128. static inline uint32_t A2XX_PA_SC_LINE_STIPPLE_PATTERN_BIT_ORDER(enum a2xx_pa_sc_pattern_bit_order val)
  1129. {
  1130. return ((val) << A2XX_PA_SC_LINE_STIPPLE_PATTERN_BIT_ORDER__SHIFT) & A2XX_PA_SC_LINE_STIPPLE_PATTERN_BIT_ORDER__MASK;
  1131. }
  1132. #define A2XX_PA_SC_LINE_STIPPLE_AUTO_RESET_CNTL__MASK 0x60000000
  1133. #define A2XX_PA_SC_LINE_STIPPLE_AUTO_RESET_CNTL__SHIFT 29
  1134. static inline uint32_t A2XX_PA_SC_LINE_STIPPLE_AUTO_RESET_CNTL(enum a2xx_pa_sc_auto_reset_cntl val)
  1135. {
  1136. return ((val) << A2XX_PA_SC_LINE_STIPPLE_AUTO_RESET_CNTL__SHIFT) & A2XX_PA_SC_LINE_STIPPLE_AUTO_RESET_CNTL__MASK;
  1137. }
  1138. #define REG_A2XX_PA_SC_VIZ_QUERY 0x00002293
  1139. #define REG_A2XX_VGT_ENHANCE 0x00002294
  1140. #define REG_A2XX_PA_SC_LINE_CNTL 0x00002300
  1141. #define A2XX_PA_SC_LINE_CNTL_BRES_CNTL__MASK 0x0000ffff
  1142. #define A2XX_PA_SC_LINE_CNTL_BRES_CNTL__SHIFT 0
  1143. static inline uint32_t A2XX_PA_SC_LINE_CNTL_BRES_CNTL(uint32_t val)
  1144. {
  1145. return ((val) << A2XX_PA_SC_LINE_CNTL_BRES_CNTL__SHIFT) & A2XX_PA_SC_LINE_CNTL_BRES_CNTL__MASK;
  1146. }
  1147. #define A2XX_PA_SC_LINE_CNTL_USE_BRES_CNTL 0x00000100
  1148. #define A2XX_PA_SC_LINE_CNTL_EXPAND_LINE_WIDTH 0x00000200
  1149. #define A2XX_PA_SC_LINE_CNTL_LAST_PIXEL 0x00000400
  1150. #define REG_A2XX_PA_SC_AA_CONFIG 0x00002301
  1151. #define REG_A2XX_PA_SU_VTX_CNTL 0x00002302
  1152. #define A2XX_PA_SU_VTX_CNTL_PIX_CENTER__MASK 0x00000001
  1153. #define A2XX_PA_SU_VTX_CNTL_PIX_CENTER__SHIFT 0
  1154. static inline uint32_t A2XX_PA_SU_VTX_CNTL_PIX_CENTER(enum a2xx_pa_pixcenter val)
  1155. {
  1156. return ((val) << A2XX_PA_SU_VTX_CNTL_PIX_CENTER__SHIFT) & A2XX_PA_SU_VTX_CNTL_PIX_CENTER__MASK;
  1157. }
  1158. #define A2XX_PA_SU_VTX_CNTL_ROUND_MODE__MASK 0x00000006
  1159. #define A2XX_PA_SU_VTX_CNTL_ROUND_MODE__SHIFT 1
  1160. static inline uint32_t A2XX_PA_SU_VTX_CNTL_ROUND_MODE(enum a2xx_pa_roundmode val)
  1161. {
  1162. return ((val) << A2XX_PA_SU_VTX_CNTL_ROUND_MODE__SHIFT) & A2XX_PA_SU_VTX_CNTL_ROUND_MODE__MASK;
  1163. }
  1164. #define A2XX_PA_SU_VTX_CNTL_QUANT_MODE__MASK 0x00000380
  1165. #define A2XX_PA_SU_VTX_CNTL_QUANT_MODE__SHIFT 7
  1166. static inline uint32_t A2XX_PA_SU_VTX_CNTL_QUANT_MODE(enum a2xx_pa_quantmode val)
  1167. {
  1168. return ((val) << A2XX_PA_SU_VTX_CNTL_QUANT_MODE__SHIFT) & A2XX_PA_SU_VTX_CNTL_QUANT_MODE__MASK;
  1169. }
  1170. #define REG_A2XX_PA_CL_GB_VERT_CLIP_ADJ 0x00002303
  1171. #define A2XX_PA_CL_GB_VERT_CLIP_ADJ__MASK 0xffffffff
  1172. #define A2XX_PA_CL_GB_VERT_CLIP_ADJ__SHIFT 0
  1173. static inline uint32_t A2XX_PA_CL_GB_VERT_CLIP_ADJ(float val)
  1174. {
  1175. return ((fui(val)) << A2XX_PA_CL_GB_VERT_CLIP_ADJ__SHIFT) & A2XX_PA_CL_GB_VERT_CLIP_ADJ__MASK;
  1176. }
  1177. #define REG_A2XX_PA_CL_GB_VERT_DISC_ADJ 0x00002304
  1178. #define A2XX_PA_CL_GB_VERT_DISC_ADJ__MASK 0xffffffff
  1179. #define A2XX_PA_CL_GB_VERT_DISC_ADJ__SHIFT 0
  1180. static inline uint32_t A2XX_PA_CL_GB_VERT_DISC_ADJ(float val)
  1181. {
  1182. return ((fui(val)) << A2XX_PA_CL_GB_VERT_DISC_ADJ__SHIFT) & A2XX_PA_CL_GB_VERT_DISC_ADJ__MASK;
  1183. }
  1184. #define REG_A2XX_PA_CL_GB_HORZ_CLIP_ADJ 0x00002305
  1185. #define A2XX_PA_CL_GB_HORZ_CLIP_ADJ__MASK 0xffffffff
  1186. #define A2XX_PA_CL_GB_HORZ_CLIP_ADJ__SHIFT 0
  1187. static inline uint32_t A2XX_PA_CL_GB_HORZ_CLIP_ADJ(float val)
  1188. {
  1189. return ((fui(val)) << A2XX_PA_CL_GB_HORZ_CLIP_ADJ__SHIFT) & A2XX_PA_CL_GB_HORZ_CLIP_ADJ__MASK;
  1190. }
  1191. #define REG_A2XX_PA_CL_GB_HORZ_DISC_ADJ 0x00002306
  1192. #define A2XX_PA_CL_GB_HORZ_DISC_ADJ__MASK 0xffffffff
  1193. #define A2XX_PA_CL_GB_HORZ_DISC_ADJ__SHIFT 0
  1194. static inline uint32_t A2XX_PA_CL_GB_HORZ_DISC_ADJ(float val)
  1195. {
  1196. return ((fui(val)) << A2XX_PA_CL_GB_HORZ_DISC_ADJ__SHIFT) & A2XX_PA_CL_GB_HORZ_DISC_ADJ__MASK;
  1197. }
  1198. #define REG_A2XX_SQ_VS_CONST 0x00002307
  1199. #define A2XX_SQ_VS_CONST_BASE__MASK 0x000001ff
  1200. #define A2XX_SQ_VS_CONST_BASE__SHIFT 0
  1201. static inline uint32_t A2XX_SQ_VS_CONST_BASE(uint32_t val)
  1202. {
  1203. return ((val) << A2XX_SQ_VS_CONST_BASE__SHIFT) & A2XX_SQ_VS_CONST_BASE__MASK;
  1204. }
  1205. #define A2XX_SQ_VS_CONST_SIZE__MASK 0x001ff000
  1206. #define A2XX_SQ_VS_CONST_SIZE__SHIFT 12
  1207. static inline uint32_t A2XX_SQ_VS_CONST_SIZE(uint32_t val)
  1208. {
  1209. return ((val) << A2XX_SQ_VS_CONST_SIZE__SHIFT) & A2XX_SQ_VS_CONST_SIZE__MASK;
  1210. }
  1211. #define REG_A2XX_SQ_PS_CONST 0x00002308
  1212. #define A2XX_SQ_PS_CONST_BASE__MASK 0x000001ff
  1213. #define A2XX_SQ_PS_CONST_BASE__SHIFT 0
  1214. static inline uint32_t A2XX_SQ_PS_CONST_BASE(uint32_t val)
  1215. {
  1216. return ((val) << A2XX_SQ_PS_CONST_BASE__SHIFT) & A2XX_SQ_PS_CONST_BASE__MASK;
  1217. }
  1218. #define A2XX_SQ_PS_CONST_SIZE__MASK 0x001ff000
  1219. #define A2XX_SQ_PS_CONST_SIZE__SHIFT 12
  1220. static inline uint32_t A2XX_SQ_PS_CONST_SIZE(uint32_t val)
  1221. {
  1222. return ((val) << A2XX_SQ_PS_CONST_SIZE__SHIFT) & A2XX_SQ_PS_CONST_SIZE__MASK;
  1223. }
  1224. #define REG_A2XX_SQ_DEBUG_MISC_0 0x00002309
  1225. #define REG_A2XX_SQ_DEBUG_MISC_1 0x0000230a
  1226. #define REG_A2XX_PA_SC_AA_MASK 0x00002312
  1227. #define REG_A2XX_VGT_VERTEX_REUSE_BLOCK_CNTL 0x00002316
  1228. #define REG_A2XX_VGT_OUT_DEALLOC_CNTL 0x00002317
  1229. #define REG_A2XX_RB_COPY_CONTROL 0x00002318
  1230. #define A2XX_RB_COPY_CONTROL_COPY_SAMPLE_SELECT__MASK 0x00000007
  1231. #define A2XX_RB_COPY_CONTROL_COPY_SAMPLE_SELECT__SHIFT 0
  1232. static inline uint32_t A2XX_RB_COPY_CONTROL_COPY_SAMPLE_SELECT(enum a2xx_rb_copy_sample_select val)
  1233. {
  1234. return ((val) << A2XX_RB_COPY_CONTROL_COPY_SAMPLE_SELECT__SHIFT) & A2XX_RB_COPY_CONTROL_COPY_SAMPLE_SELECT__MASK;
  1235. }
  1236. #define A2XX_RB_COPY_CONTROL_DEPTH_CLEAR_ENABLE 0x00000008
  1237. #define A2XX_RB_COPY_CONTROL_CLEAR_MASK__MASK 0x000000f0
  1238. #define A2XX_RB_COPY_CONTROL_CLEAR_MASK__SHIFT 4
  1239. static inline uint32_t A2XX_RB_COPY_CONTROL_CLEAR_MASK(uint32_t val)
  1240. {
  1241. return ((val) << A2XX_RB_COPY_CONTROL_CLEAR_MASK__SHIFT) & A2XX_RB_COPY_CONTROL_CLEAR_MASK__MASK;
  1242. }
  1243. #define REG_A2XX_RB_COPY_DEST_BASE 0x00002319
  1244. #define REG_A2XX_RB_COPY_DEST_PITCH 0x0000231a
  1245. #define A2XX_RB_COPY_DEST_PITCH__MASK 0xffffffff
  1246. #define A2XX_RB_COPY_DEST_PITCH__SHIFT 0
  1247. static inline uint32_t A2XX_RB_COPY_DEST_PITCH(uint32_t val)
  1248. {
  1249. return ((val >> 5) << A2XX_RB_COPY_DEST_PITCH__SHIFT) & A2XX_RB_COPY_DEST_PITCH__MASK;
  1250. }
  1251. #define REG_A2XX_RB_COPY_DEST_INFO 0x0000231b
  1252. #define A2XX_RB_COPY_DEST_INFO_DEST_ENDIAN__MASK 0x00000007
  1253. #define A2XX_RB_COPY_DEST_INFO_DEST_ENDIAN__SHIFT 0
  1254. static inline uint32_t A2XX_RB_COPY_DEST_INFO_DEST_ENDIAN(enum adreno_rb_surface_endian val)
  1255. {
  1256. return ((val) << A2XX_RB_COPY_DEST_INFO_DEST_ENDIAN__SHIFT) & A2XX_RB_COPY_DEST_INFO_DEST_ENDIAN__MASK;
  1257. }
  1258. #define A2XX_RB_COPY_DEST_INFO_LINEAR 0x00000008
  1259. #define A2XX_RB_COPY_DEST_INFO_FORMAT__MASK 0x000000f0
  1260. #define A2XX_RB_COPY_DEST_INFO_FORMAT__SHIFT 4
  1261. static inline uint32_t A2XX_RB_COPY_DEST_INFO_FORMAT(enum a2xx_colorformatx val)
  1262. {
  1263. return ((val) << A2XX_RB_COPY_DEST_INFO_FORMAT__SHIFT) & A2XX_RB_COPY_DEST_INFO_FORMAT__MASK;
  1264. }
  1265. #define A2XX_RB_COPY_DEST_INFO_SWAP__MASK 0x00000300
  1266. #define A2XX_RB_COPY_DEST_INFO_SWAP__SHIFT 8
  1267. static inline uint32_t A2XX_RB_COPY_DEST_INFO_SWAP(uint32_t val)
  1268. {
  1269. return ((val) << A2XX_RB_COPY_DEST_INFO_SWAP__SHIFT) & A2XX_RB_COPY_DEST_INFO_SWAP__MASK;
  1270. }
  1271. #define A2XX_RB_COPY_DEST_INFO_DITHER_MODE__MASK 0x00000c00
  1272. #define A2XX_RB_COPY_DEST_INFO_DITHER_MODE__SHIFT 10
  1273. static inline uint32_t A2XX_RB_COPY_DEST_INFO_DITHER_MODE(enum adreno_rb_dither_mode val)
  1274. {
  1275. return ((val) << A2XX_RB_COPY_DEST_INFO_DITHER_MODE__SHIFT) & A2XX_RB_COPY_DEST_INFO_DITHER_MODE__MASK;
  1276. }
  1277. #define A2XX_RB_COPY_DEST_INFO_DITHER_TYPE__MASK 0x00003000
  1278. #define A2XX_RB_COPY_DEST_INFO_DITHER_TYPE__SHIFT 12
  1279. static inline uint32_t A2XX_RB_COPY_DEST_INFO_DITHER_TYPE(enum a2xx_rb_dither_type val)
  1280. {
  1281. return ((val) << A2XX_RB_COPY_DEST_INFO_DITHER_TYPE__SHIFT) & A2XX_RB_COPY_DEST_INFO_DITHER_TYPE__MASK;
  1282. }
  1283. #define A2XX_RB_COPY_DEST_INFO_WRITE_RED 0x00004000
  1284. #define A2XX_RB_COPY_DEST_INFO_WRITE_GREEN 0x00008000
  1285. #define A2XX_RB_COPY_DEST_INFO_WRITE_BLUE 0x00010000
  1286. #define A2XX_RB_COPY_DEST_INFO_WRITE_ALPHA 0x00020000
  1287. #define REG_A2XX_RB_COPY_DEST_OFFSET 0x0000231c
  1288. #define A2XX_RB_COPY_DEST_OFFSET_X__MASK 0x00001fff
  1289. #define A2XX_RB_COPY_DEST_OFFSET_X__SHIFT 0
  1290. static inline uint32_t A2XX_RB_COPY_DEST_OFFSET_X(uint32_t val)
  1291. {
  1292. return ((val) << A2XX_RB_COPY_DEST_OFFSET_X__SHIFT) & A2XX_RB_COPY_DEST_OFFSET_X__MASK;
  1293. }
  1294. #define A2XX_RB_COPY_DEST_OFFSET_Y__MASK 0x03ffe000
  1295. #define A2XX_RB_COPY_DEST_OFFSET_Y__SHIFT 13
  1296. static inline uint32_t A2XX_RB_COPY_DEST_OFFSET_Y(uint32_t val)
  1297. {
  1298. return ((val) << A2XX_RB_COPY_DEST_OFFSET_Y__SHIFT) & A2XX_RB_COPY_DEST_OFFSET_Y__MASK;
  1299. }
  1300. #define REG_A2XX_RB_DEPTH_CLEAR 0x0000231d
  1301. #define REG_A2XX_RB_SAMPLE_COUNT_CTL 0x00002324
  1302. #define REG_A2XX_RB_COLOR_DEST_MASK 0x00002326
  1303. #define REG_A2XX_A225_GRAS_UCP0X 0x00002340
  1304. #define REG_A2XX_A225_GRAS_UCP5W 0x00002357
  1305. #define REG_A2XX_A225_GRAS_UCP_ENABLED 0x00002360
  1306. #define REG_A2XX_PA_SU_POLY_OFFSET_FRONT_SCALE 0x00002380
  1307. #define REG_A2XX_PA_SU_POLY_OFFSET_BACK_OFFSET 0x00002383
  1308. #define REG_A2XX_SQ_CONSTANT_0 0x00004000
  1309. #define REG_A2XX_SQ_FETCH_0 0x00004800
  1310. #define REG_A2XX_SQ_CF_BOOLEANS 0x00004900
  1311. #define REG_A2XX_SQ_CF_LOOP 0x00004908
  1312. #define REG_A2XX_COHER_SIZE_PM4 0x00000a29
  1313. #define REG_A2XX_COHER_BASE_PM4 0x00000a2a
  1314. #define REG_A2XX_COHER_STATUS_PM4 0x00000a2b
  1315. #define REG_A2XX_SQ_TEX_0 0x00000000
  1316. #define A2XX_SQ_TEX_0_CLAMP_X__MASK 0x00001c00
  1317. #define A2XX_SQ_TEX_0_CLAMP_X__SHIFT 10
  1318. static inline uint32_t A2XX_SQ_TEX_0_CLAMP_X(enum sq_tex_clamp val)
  1319. {
  1320. return ((val) << A2XX_SQ_TEX_0_CLAMP_X__SHIFT) & A2XX_SQ_TEX_0_CLAMP_X__MASK;
  1321. }
  1322. #define A2XX_SQ_TEX_0_CLAMP_Y__MASK 0x0000e000
  1323. #define A2XX_SQ_TEX_0_CLAMP_Y__SHIFT 13
  1324. static inline uint32_t A2XX_SQ_TEX_0_CLAMP_Y(enum sq_tex_clamp val)
  1325. {
  1326. return ((val) << A2XX_SQ_TEX_0_CLAMP_Y__SHIFT) & A2XX_SQ_TEX_0_CLAMP_Y__MASK;
  1327. }
  1328. #define A2XX_SQ_TEX_0_CLAMP_Z__MASK 0x00070000
  1329. #define A2XX_SQ_TEX_0_CLAMP_Z__SHIFT 16
  1330. static inline uint32_t A2XX_SQ_TEX_0_CLAMP_Z(enum sq_tex_clamp val)
  1331. {
  1332. return ((val) << A2XX_SQ_TEX_0_CLAMP_Z__SHIFT) & A2XX_SQ_TEX_0_CLAMP_Z__MASK;
  1333. }
  1334. #define A2XX_SQ_TEX_0_PITCH__MASK 0xffc00000
  1335. #define A2XX_SQ_TEX_0_PITCH__SHIFT 22
  1336. static inline uint32_t A2XX_SQ_TEX_0_PITCH(uint32_t val)
  1337. {
  1338. return ((val >> 5) << A2XX_SQ_TEX_0_PITCH__SHIFT) & A2XX_SQ_TEX_0_PITCH__MASK;
  1339. }
  1340. #define REG_A2XX_SQ_TEX_1 0x00000001
  1341. #define REG_A2XX_SQ_TEX_2 0x00000002
  1342. #define A2XX_SQ_TEX_2_WIDTH__MASK 0x00001fff
  1343. #define A2XX_SQ_TEX_2_WIDTH__SHIFT 0
  1344. static inline uint32_t A2XX_SQ_TEX_2_WIDTH(uint32_t val)
  1345. {
  1346. return ((val) << A2XX_SQ_TEX_2_WIDTH__SHIFT) & A2XX_SQ_TEX_2_WIDTH__MASK;
  1347. }
  1348. #define A2XX_SQ_TEX_2_HEIGHT__MASK 0x03ffe000
  1349. #define A2XX_SQ_TEX_2_HEIGHT__SHIFT 13
  1350. static inline uint32_t A2XX_SQ_TEX_2_HEIGHT(uint32_t val)
  1351. {
  1352. return ((val) << A2XX_SQ_TEX_2_HEIGHT__SHIFT) & A2XX_SQ_TEX_2_HEIGHT__MASK;
  1353. }
  1354. #define REG_A2XX_SQ_TEX_3 0x00000003
  1355. #define A2XX_SQ_TEX_3_SWIZ_X__MASK 0x0000000e
  1356. #define A2XX_SQ_TEX_3_SWIZ_X__SHIFT 1
  1357. static inline uint32_t A2XX_SQ_TEX_3_SWIZ_X(enum sq_tex_swiz val)
  1358. {
  1359. return ((val) << A2XX_SQ_TEX_3_SWIZ_X__SHIFT) & A2XX_SQ_TEX_3_SWIZ_X__MASK;
  1360. }
  1361. #define A2XX_SQ_TEX_3_SWIZ_Y__MASK 0x00000070
  1362. #define A2XX_SQ_TEX_3_SWIZ_Y__SHIFT 4
  1363. static inline uint32_t A2XX_SQ_TEX_3_SWIZ_Y(enum sq_tex_swiz val)
  1364. {
  1365. return ((val) << A2XX_SQ_TEX_3_SWIZ_Y__SHIFT) & A2XX_SQ_TEX_3_SWIZ_Y__MASK;
  1366. }
  1367. #define A2XX_SQ_TEX_3_SWIZ_Z__MASK 0x00000380
  1368. #define A2XX_SQ_TEX_3_SWIZ_Z__SHIFT 7
  1369. static inline uint32_t A2XX_SQ_TEX_3_SWIZ_Z(enum sq_tex_swiz val)
  1370. {
  1371. return ((val) << A2XX_SQ_TEX_3_SWIZ_Z__SHIFT) & A2XX_SQ_TEX_3_SWIZ_Z__MASK;
  1372. }
  1373. #define A2XX_SQ_TEX_3_SWIZ_W__MASK 0x00001c00
  1374. #define A2XX_SQ_TEX_3_SWIZ_W__SHIFT 10
  1375. static inline uint32_t A2XX_SQ_TEX_3_SWIZ_W(enum sq_tex_swiz val)
  1376. {
  1377. return ((val) << A2XX_SQ_TEX_3_SWIZ_W__SHIFT) & A2XX_SQ_TEX_3_SWIZ_W__MASK;
  1378. }
  1379. #define A2XX_SQ_TEX_3_XY_MAG_FILTER__MASK 0x00180000
  1380. #define A2XX_SQ_TEX_3_XY_MAG_FILTER__SHIFT 19
  1381. static inline uint32_t A2XX_SQ_TEX_3_XY_MAG_FILTER(enum sq_tex_filter val)
  1382. {
  1383. return ((val) << A2XX_SQ_TEX_3_XY_MAG_FILTER__SHIFT) & A2XX_SQ_TEX_3_XY_MAG_FILTER__MASK;
  1384. }
  1385. #define A2XX_SQ_TEX_3_XY_MIN_FILTER__MASK 0x00600000
  1386. #define A2XX_SQ_TEX_3_XY_MIN_FILTER__SHIFT 21
  1387. static inline uint32_t A2XX_SQ_TEX_3_XY_MIN_FILTER(enum sq_tex_filter val)
  1388. {
  1389. return ((val) << A2XX_SQ_TEX_3_XY_MIN_FILTER__SHIFT) & A2XX_SQ_TEX_3_XY_MIN_FILTER__MASK;
  1390. }
  1391. #endif /* A2XX_XML */