a3xx.xml.h 112 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860
  1. #ifndef A3XX_XML
  2. #define A3XX_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 a3xx_tile_mode {
  37. LINEAR = 0,
  38. TILE_32X32 = 2,
  39. };
  40. enum a3xx_state_block_id {
  41. HLSQ_BLOCK_ID_TP_TEX = 2,
  42. HLSQ_BLOCK_ID_TP_MIPMAP = 3,
  43. HLSQ_BLOCK_ID_SP_VS = 4,
  44. HLSQ_BLOCK_ID_SP_FS = 6,
  45. };
  46. enum a3xx_cache_opcode {
  47. INVALIDATE = 1,
  48. };
  49. enum a3xx_vtx_fmt {
  50. VFMT_32_FLOAT = 0,
  51. VFMT_32_32_FLOAT = 1,
  52. VFMT_32_32_32_FLOAT = 2,
  53. VFMT_32_32_32_32_FLOAT = 3,
  54. VFMT_16_FLOAT = 4,
  55. VFMT_16_16_FLOAT = 5,
  56. VFMT_16_16_16_FLOAT = 6,
  57. VFMT_16_16_16_16_FLOAT = 7,
  58. VFMT_32_FIXED = 8,
  59. VFMT_32_32_FIXED = 9,
  60. VFMT_32_32_32_FIXED = 10,
  61. VFMT_32_32_32_32_FIXED = 11,
  62. VFMT_16_SINT = 16,
  63. VFMT_16_16_SINT = 17,
  64. VFMT_16_16_16_SINT = 18,
  65. VFMT_16_16_16_16_SINT = 19,
  66. VFMT_16_UINT = 20,
  67. VFMT_16_16_UINT = 21,
  68. VFMT_16_16_16_UINT = 22,
  69. VFMT_16_16_16_16_UINT = 23,
  70. VFMT_16_SNORM = 24,
  71. VFMT_16_16_SNORM = 25,
  72. VFMT_16_16_16_SNORM = 26,
  73. VFMT_16_16_16_16_SNORM = 27,
  74. VFMT_16_UNORM = 28,
  75. VFMT_16_16_UNORM = 29,
  76. VFMT_16_16_16_UNORM = 30,
  77. VFMT_16_16_16_16_UNORM = 31,
  78. VFMT_32_UINT = 32,
  79. VFMT_32_32_UINT = 33,
  80. VFMT_32_32_32_UINT = 34,
  81. VFMT_32_32_32_32_UINT = 35,
  82. VFMT_32_SINT = 36,
  83. VFMT_32_32_SINT = 37,
  84. VFMT_32_32_32_SINT = 38,
  85. VFMT_32_32_32_32_SINT = 39,
  86. VFMT_8_UINT = 40,
  87. VFMT_8_8_UINT = 41,
  88. VFMT_8_8_8_UINT = 42,
  89. VFMT_8_8_8_8_UINT = 43,
  90. VFMT_8_UNORM = 44,
  91. VFMT_8_8_UNORM = 45,
  92. VFMT_8_8_8_UNORM = 46,
  93. VFMT_8_8_8_8_UNORM = 47,
  94. VFMT_8_SINT = 48,
  95. VFMT_8_8_SINT = 49,
  96. VFMT_8_8_8_SINT = 50,
  97. VFMT_8_8_8_8_SINT = 51,
  98. VFMT_8_SNORM = 52,
  99. VFMT_8_8_SNORM = 53,
  100. VFMT_8_8_8_SNORM = 54,
  101. VFMT_8_8_8_8_SNORM = 55,
  102. VFMT_10_10_10_2_UINT = 60,
  103. VFMT_10_10_10_2_UNORM = 61,
  104. VFMT_10_10_10_2_SINT = 62,
  105. VFMT_10_10_10_2_SNORM = 63,
  106. };
  107. enum a3xx_tex_fmt {
  108. TFMT_5_6_5_UNORM = 4,
  109. TFMT_5_5_5_1_UNORM = 5,
  110. TFMT_4_4_4_4_UNORM = 7,
  111. TFMT_Z16_UNORM = 9,
  112. TFMT_X8Z24_UNORM = 10,
  113. TFMT_Z32_FLOAT = 11,
  114. TFMT_NV12_UV_TILED = 17,
  115. TFMT_NV12_Y_TILED = 19,
  116. TFMT_NV12_UV = 21,
  117. TFMT_NV12_Y = 23,
  118. TFMT_I420_Y = 24,
  119. TFMT_I420_U = 26,
  120. TFMT_I420_V = 27,
  121. TFMT_ATC_RGB = 32,
  122. TFMT_ATC_RGBA_EXPLICIT = 33,
  123. TFMT_ETC1 = 34,
  124. TFMT_ATC_RGBA_INTERPOLATED = 35,
  125. TFMT_DXT1 = 36,
  126. TFMT_DXT3 = 37,
  127. TFMT_DXT5 = 38,
  128. TFMT_10_10_10_2_UNORM = 41,
  129. TFMT_9_9_9_E5_FLOAT = 42,
  130. TFMT_11_11_10_FLOAT = 43,
  131. TFMT_A8_UNORM = 44,
  132. TFMT_L8_A8_UNORM = 47,
  133. TFMT_8_UNORM = 48,
  134. TFMT_8_8_UNORM = 49,
  135. TFMT_8_8_8_UNORM = 50,
  136. TFMT_8_8_8_8_UNORM = 51,
  137. TFMT_8_SNORM = 52,
  138. TFMT_8_8_SNORM = 53,
  139. TFMT_8_8_8_SNORM = 54,
  140. TFMT_8_8_8_8_SNORM = 55,
  141. TFMT_8_UINT = 56,
  142. TFMT_8_8_UINT = 57,
  143. TFMT_8_8_8_UINT = 58,
  144. TFMT_8_8_8_8_UINT = 59,
  145. TFMT_8_SINT = 60,
  146. TFMT_8_8_SINT = 61,
  147. TFMT_8_8_8_SINT = 62,
  148. TFMT_8_8_8_8_SINT = 63,
  149. TFMT_16_FLOAT = 64,
  150. TFMT_16_16_FLOAT = 65,
  151. TFMT_16_16_16_16_FLOAT = 67,
  152. TFMT_16_UINT = 68,
  153. TFMT_16_16_UINT = 69,
  154. TFMT_16_16_16_16_UINT = 71,
  155. TFMT_16_SINT = 72,
  156. TFMT_16_16_SINT = 73,
  157. TFMT_16_16_16_16_SINT = 75,
  158. TFMT_16_UNORM = 76,
  159. TFMT_16_16_UNORM = 77,
  160. TFMT_16_16_16_16_UNORM = 79,
  161. TFMT_16_SNORM = 80,
  162. TFMT_16_16_SNORM = 81,
  163. TFMT_16_16_16_16_SNORM = 83,
  164. TFMT_32_FLOAT = 84,
  165. TFMT_32_32_FLOAT = 85,
  166. TFMT_32_32_32_32_FLOAT = 87,
  167. TFMT_32_UINT = 88,
  168. TFMT_32_32_UINT = 89,
  169. TFMT_32_32_32_32_UINT = 91,
  170. TFMT_32_SINT = 92,
  171. TFMT_32_32_SINT = 93,
  172. TFMT_32_32_32_32_SINT = 95,
  173. TFMT_ETC2_RG11_SNORM = 112,
  174. TFMT_ETC2_RG11_UNORM = 113,
  175. TFMT_ETC2_R11_SNORM = 114,
  176. TFMT_ETC2_R11_UNORM = 115,
  177. TFMT_ETC2_RGBA8 = 116,
  178. TFMT_ETC2_RGB8A1 = 117,
  179. TFMT_ETC2_RGB8 = 118,
  180. };
  181. enum a3xx_tex_fetchsize {
  182. TFETCH_DISABLE = 0,
  183. TFETCH_1_BYTE = 1,
  184. TFETCH_2_BYTE = 2,
  185. TFETCH_4_BYTE = 3,
  186. TFETCH_8_BYTE = 4,
  187. TFETCH_16_BYTE = 5,
  188. };
  189. enum a3xx_color_fmt {
  190. RB_R5G6B5_UNORM = 0,
  191. RB_R5G5B5A1_UNORM = 1,
  192. RB_R4G4B4A4_UNORM = 3,
  193. RB_R8G8B8_UNORM = 4,
  194. RB_R8G8B8A8_UNORM = 8,
  195. RB_R8G8B8A8_SNORM = 9,
  196. RB_R8G8B8A8_UINT = 10,
  197. RB_R8G8B8A8_SINT = 11,
  198. RB_R8G8_UNORM = 12,
  199. RB_R8G8_SNORM = 13,
  200. RB_R8_UINT = 14,
  201. RB_R8_SINT = 15,
  202. RB_R10G10B10A2_UNORM = 16,
  203. RB_A8_UNORM = 20,
  204. RB_R8_UNORM = 21,
  205. RB_R16_FLOAT = 24,
  206. RB_R16G16_FLOAT = 25,
  207. RB_R16G16B16A16_FLOAT = 27,
  208. RB_R11G11B10_FLOAT = 28,
  209. RB_R16_SNORM = 32,
  210. RB_R16G16_SNORM = 33,
  211. RB_R16G16B16A16_SNORM = 35,
  212. RB_R16_UNORM = 36,
  213. RB_R16G16_UNORM = 37,
  214. RB_R16G16B16A16_UNORM = 39,
  215. RB_R16_SINT = 40,
  216. RB_R16G16_SINT = 41,
  217. RB_R16G16B16A16_SINT = 43,
  218. RB_R16_UINT = 44,
  219. RB_R16G16_UINT = 45,
  220. RB_R16G16B16A16_UINT = 47,
  221. RB_R32_FLOAT = 48,
  222. RB_R32G32_FLOAT = 49,
  223. RB_R32G32B32A32_FLOAT = 51,
  224. RB_R32_SINT = 52,
  225. RB_R32G32_SINT = 53,
  226. RB_R32G32B32A32_SINT = 55,
  227. RB_R32_UINT = 56,
  228. RB_R32G32_UINT = 57,
  229. RB_R32G32B32A32_UINT = 59,
  230. };
  231. enum a3xx_sp_perfcounter_select {
  232. SP_FS_CFLOW_INSTRUCTIONS = 12,
  233. SP_FS_FULL_ALU_INSTRUCTIONS = 14,
  234. SP0_ICL1_MISSES = 26,
  235. SP_ALU_ACTIVE_CYCLES = 29,
  236. };
  237. enum a3xx_rop_code {
  238. ROP_CLEAR = 0,
  239. ROP_NOR = 1,
  240. ROP_AND_INVERTED = 2,
  241. ROP_COPY_INVERTED = 3,
  242. ROP_AND_REVERSE = 4,
  243. ROP_INVERT = 5,
  244. ROP_XOR = 6,
  245. ROP_NAND = 7,
  246. ROP_AND = 8,
  247. ROP_EQUIV = 9,
  248. ROP_NOOP = 10,
  249. ROP_OR_INVERTED = 11,
  250. ROP_COPY = 12,
  251. ROP_OR_REVERSE = 13,
  252. ROP_OR = 14,
  253. ROP_SET = 15,
  254. };
  255. enum a3xx_rb_blend_opcode {
  256. BLEND_DST_PLUS_SRC = 0,
  257. BLEND_SRC_MINUS_DST = 1,
  258. BLEND_DST_MINUS_SRC = 2,
  259. BLEND_MIN_DST_SRC = 3,
  260. BLEND_MAX_DST_SRC = 4,
  261. };
  262. enum a3xx_intp_mode {
  263. SMOOTH = 0,
  264. FLAT = 1,
  265. ZERO = 2,
  266. ONE = 3,
  267. };
  268. enum a3xx_repl_mode {
  269. S = 1,
  270. T = 2,
  271. ONE_T = 3,
  272. };
  273. enum a3xx_tex_filter {
  274. A3XX_TEX_NEAREST = 0,
  275. A3XX_TEX_LINEAR = 1,
  276. A3XX_TEX_ANISO = 2,
  277. };
  278. enum a3xx_tex_clamp {
  279. A3XX_TEX_REPEAT = 0,
  280. A3XX_TEX_CLAMP_TO_EDGE = 1,
  281. A3XX_TEX_MIRROR_REPEAT = 2,
  282. A3XX_TEX_CLAMP_TO_BORDER = 3,
  283. A3XX_TEX_MIRROR_CLAMP = 4,
  284. };
  285. enum a3xx_tex_aniso {
  286. A3XX_TEX_ANISO_1 = 0,
  287. A3XX_TEX_ANISO_2 = 1,
  288. A3XX_TEX_ANISO_4 = 2,
  289. A3XX_TEX_ANISO_8 = 3,
  290. A3XX_TEX_ANISO_16 = 4,
  291. };
  292. enum a3xx_tex_swiz {
  293. A3XX_TEX_X = 0,
  294. A3XX_TEX_Y = 1,
  295. A3XX_TEX_Z = 2,
  296. A3XX_TEX_W = 3,
  297. A3XX_TEX_ZERO = 4,
  298. A3XX_TEX_ONE = 5,
  299. };
  300. enum a3xx_tex_type {
  301. A3XX_TEX_1D = 0,
  302. A3XX_TEX_2D = 1,
  303. A3XX_TEX_CUBE = 2,
  304. A3XX_TEX_3D = 3,
  305. };
  306. enum a3xx_tex_msaa {
  307. A3XX_TPL1_MSAA1X = 0,
  308. A3XX_TPL1_MSAA2X = 1,
  309. A3XX_TPL1_MSAA4X = 2,
  310. A3XX_TPL1_MSAA8X = 3,
  311. };
  312. #define A3XX_INT0_RBBM_GPU_IDLE 0x00000001
  313. #define A3XX_INT0_RBBM_AHB_ERROR 0x00000002
  314. #define A3XX_INT0_RBBM_REG_TIMEOUT 0x00000004
  315. #define A3XX_INT0_RBBM_ME_MS_TIMEOUT 0x00000008
  316. #define A3XX_INT0_RBBM_PFP_MS_TIMEOUT 0x00000010
  317. #define A3XX_INT0_RBBM_ATB_BUS_OVERFLOW 0x00000020
  318. #define A3XX_INT0_VFD_ERROR 0x00000040
  319. #define A3XX_INT0_CP_SW_INT 0x00000080
  320. #define A3XX_INT0_CP_T0_PACKET_IN_IB 0x00000100
  321. #define A3XX_INT0_CP_OPCODE_ERROR 0x00000200
  322. #define A3XX_INT0_CP_RESERVED_BIT_ERROR 0x00000400
  323. #define A3XX_INT0_CP_HW_FAULT 0x00000800
  324. #define A3XX_INT0_CP_DMA 0x00001000
  325. #define A3XX_INT0_CP_IB2_INT 0x00002000
  326. #define A3XX_INT0_CP_IB1_INT 0x00004000
  327. #define A3XX_INT0_CP_RB_INT 0x00008000
  328. #define A3XX_INT0_CP_REG_PROTECT_FAULT 0x00010000
  329. #define A3XX_INT0_CP_RB_DONE_TS 0x00020000
  330. #define A3XX_INT0_CP_VS_DONE_TS 0x00040000
  331. #define A3XX_INT0_CP_PS_DONE_TS 0x00080000
  332. #define A3XX_INT0_CACHE_FLUSH_TS 0x00100000
  333. #define A3XX_INT0_CP_AHB_ERROR_HALT 0x00200000
  334. #define A3XX_INT0_MISC_HANG_DETECT 0x01000000
  335. #define A3XX_INT0_UCHE_OOB_ACCESS 0x02000000
  336. #define REG_A3XX_RBBM_HW_VERSION 0x00000000
  337. #define REG_A3XX_RBBM_HW_RELEASE 0x00000001
  338. #define REG_A3XX_RBBM_HW_CONFIGURATION 0x00000002
  339. #define REG_A3XX_RBBM_CLOCK_CTL 0x00000010
  340. #define REG_A3XX_RBBM_SP_HYST_CNT 0x00000012
  341. #define REG_A3XX_RBBM_SW_RESET_CMD 0x00000018
  342. #define REG_A3XX_RBBM_AHB_CTL0 0x00000020
  343. #define REG_A3XX_RBBM_AHB_CTL1 0x00000021
  344. #define REG_A3XX_RBBM_AHB_CMD 0x00000022
  345. #define REG_A3XX_RBBM_AHB_ERROR_STATUS 0x00000027
  346. #define REG_A3XX_RBBM_GPR0_CTL 0x0000002e
  347. #define REG_A3XX_RBBM_STATUS 0x00000030
  348. #define A3XX_RBBM_STATUS_HI_BUSY 0x00000001
  349. #define A3XX_RBBM_STATUS_CP_ME_BUSY 0x00000002
  350. #define A3XX_RBBM_STATUS_CP_PFP_BUSY 0x00000004
  351. #define A3XX_RBBM_STATUS_CP_NRT_BUSY 0x00004000
  352. #define A3XX_RBBM_STATUS_VBIF_BUSY 0x00008000
  353. #define A3XX_RBBM_STATUS_TSE_BUSY 0x00010000
  354. #define A3XX_RBBM_STATUS_RAS_BUSY 0x00020000
  355. #define A3XX_RBBM_STATUS_RB_BUSY 0x00040000
  356. #define A3XX_RBBM_STATUS_PC_DCALL_BUSY 0x00080000
  357. #define A3XX_RBBM_STATUS_PC_VSD_BUSY 0x00100000
  358. #define A3XX_RBBM_STATUS_VFD_BUSY 0x00200000
  359. #define A3XX_RBBM_STATUS_VPC_BUSY 0x00400000
  360. #define A3XX_RBBM_STATUS_UCHE_BUSY 0x00800000
  361. #define A3XX_RBBM_STATUS_SP_BUSY 0x01000000
  362. #define A3XX_RBBM_STATUS_TPL1_BUSY 0x02000000
  363. #define A3XX_RBBM_STATUS_MARB_BUSY 0x04000000
  364. #define A3XX_RBBM_STATUS_VSC_BUSY 0x08000000
  365. #define A3XX_RBBM_STATUS_ARB_BUSY 0x10000000
  366. #define A3XX_RBBM_STATUS_HLSQ_BUSY 0x20000000
  367. #define A3XX_RBBM_STATUS_GPU_BUSY_NOHC 0x40000000
  368. #define A3XX_RBBM_STATUS_GPU_BUSY 0x80000000
  369. #define REG_A3XX_RBBM_NQWAIT_UNTIL 0x00000040
  370. #define REG_A3XX_RBBM_WAIT_IDLE_CLOCKS_CTL 0x00000033
  371. #define REG_A3XX_RBBM_INTERFACE_HANG_INT_CTL 0x00000050
  372. #define REG_A3XX_RBBM_INTERFACE_HANG_MASK_CTL0 0x00000051
  373. #define REG_A3XX_RBBM_INTERFACE_HANG_MASK_CTL1 0x00000054
  374. #define REG_A3XX_RBBM_INTERFACE_HANG_MASK_CTL2 0x00000057
  375. #define REG_A3XX_RBBM_INTERFACE_HANG_MASK_CTL3 0x0000005a
  376. #define REG_A3XX_RBBM_INT_SET_CMD 0x00000060
  377. #define REG_A3XX_RBBM_INT_CLEAR_CMD 0x00000061
  378. #define REG_A3XX_RBBM_INT_0_MASK 0x00000063
  379. #define REG_A3XX_RBBM_INT_0_STATUS 0x00000064
  380. #define REG_A3XX_RBBM_PERFCTR_CTL 0x00000080
  381. #define A3XX_RBBM_PERFCTR_CTL_ENABLE 0x00000001
  382. #define REG_A3XX_RBBM_PERFCTR_LOAD_CMD0 0x00000081
  383. #define REG_A3XX_RBBM_PERFCTR_LOAD_CMD1 0x00000082
  384. #define REG_A3XX_RBBM_PERFCTR_LOAD_VALUE_LO 0x00000084
  385. #define REG_A3XX_RBBM_PERFCTR_LOAD_VALUE_HI 0x00000085
  386. #define REG_A3XX_RBBM_PERFCOUNTER0_SELECT 0x00000086
  387. #define REG_A3XX_RBBM_PERFCOUNTER1_SELECT 0x00000087
  388. #define REG_A3XX_RBBM_GPU_BUSY_MASKED 0x00000088
  389. #define REG_A3XX_RBBM_PERFCTR_CP_0_LO 0x00000090
  390. #define REG_A3XX_RBBM_PERFCTR_CP_0_HI 0x00000091
  391. #define REG_A3XX_RBBM_PERFCTR_RBBM_0_LO 0x00000092
  392. #define REG_A3XX_RBBM_PERFCTR_RBBM_0_HI 0x00000093
  393. #define REG_A3XX_RBBM_PERFCTR_RBBM_1_LO 0x00000094
  394. #define REG_A3XX_RBBM_PERFCTR_RBBM_1_HI 0x00000095
  395. #define REG_A3XX_RBBM_PERFCTR_PC_0_LO 0x00000096
  396. #define REG_A3XX_RBBM_PERFCTR_PC_0_HI 0x00000097
  397. #define REG_A3XX_RBBM_PERFCTR_PC_1_LO 0x00000098
  398. #define REG_A3XX_RBBM_PERFCTR_PC_1_HI 0x00000099
  399. #define REG_A3XX_RBBM_PERFCTR_PC_2_LO 0x0000009a
  400. #define REG_A3XX_RBBM_PERFCTR_PC_2_HI 0x0000009b
  401. #define REG_A3XX_RBBM_PERFCTR_PC_3_LO 0x0000009c
  402. #define REG_A3XX_RBBM_PERFCTR_PC_3_HI 0x0000009d
  403. #define REG_A3XX_RBBM_PERFCTR_VFD_0_LO 0x0000009e
  404. #define REG_A3XX_RBBM_PERFCTR_VFD_0_HI 0x0000009f
  405. #define REG_A3XX_RBBM_PERFCTR_VFD_1_LO 0x000000a0
  406. #define REG_A3XX_RBBM_PERFCTR_VFD_1_HI 0x000000a1
  407. #define REG_A3XX_RBBM_PERFCTR_HLSQ_0_LO 0x000000a2
  408. #define REG_A3XX_RBBM_PERFCTR_HLSQ_0_HI 0x000000a3
  409. #define REG_A3XX_RBBM_PERFCTR_HLSQ_1_LO 0x000000a4
  410. #define REG_A3XX_RBBM_PERFCTR_HLSQ_1_HI 0x000000a5
  411. #define REG_A3XX_RBBM_PERFCTR_HLSQ_2_LO 0x000000a6
  412. #define REG_A3XX_RBBM_PERFCTR_HLSQ_2_HI 0x000000a7
  413. #define REG_A3XX_RBBM_PERFCTR_HLSQ_3_LO 0x000000a8
  414. #define REG_A3XX_RBBM_PERFCTR_HLSQ_3_HI 0x000000a9
  415. #define REG_A3XX_RBBM_PERFCTR_HLSQ_4_LO 0x000000aa
  416. #define REG_A3XX_RBBM_PERFCTR_HLSQ_4_HI 0x000000ab
  417. #define REG_A3XX_RBBM_PERFCTR_HLSQ_5_LO 0x000000ac
  418. #define REG_A3XX_RBBM_PERFCTR_HLSQ_5_HI 0x000000ad
  419. #define REG_A3XX_RBBM_PERFCTR_VPC_0_LO 0x000000ae
  420. #define REG_A3XX_RBBM_PERFCTR_VPC_0_HI 0x000000af
  421. #define REG_A3XX_RBBM_PERFCTR_VPC_1_LO 0x000000b0
  422. #define REG_A3XX_RBBM_PERFCTR_VPC_1_HI 0x000000b1
  423. #define REG_A3XX_RBBM_PERFCTR_TSE_0_LO 0x000000b2
  424. #define REG_A3XX_RBBM_PERFCTR_TSE_0_HI 0x000000b3
  425. #define REG_A3XX_RBBM_PERFCTR_TSE_1_LO 0x000000b4
  426. #define REG_A3XX_RBBM_PERFCTR_TSE_1_HI 0x000000b5
  427. #define REG_A3XX_RBBM_PERFCTR_RAS_0_LO 0x000000b6
  428. #define REG_A3XX_RBBM_PERFCTR_RAS_0_HI 0x000000b7
  429. #define REG_A3XX_RBBM_PERFCTR_RAS_1_LO 0x000000b8
  430. #define REG_A3XX_RBBM_PERFCTR_RAS_1_HI 0x000000b9
  431. #define REG_A3XX_RBBM_PERFCTR_UCHE_0_LO 0x000000ba
  432. #define REG_A3XX_RBBM_PERFCTR_UCHE_0_HI 0x000000bb
  433. #define REG_A3XX_RBBM_PERFCTR_UCHE_1_LO 0x000000bc
  434. #define REG_A3XX_RBBM_PERFCTR_UCHE_1_HI 0x000000bd
  435. #define REG_A3XX_RBBM_PERFCTR_UCHE_2_LO 0x000000be
  436. #define REG_A3XX_RBBM_PERFCTR_UCHE_2_HI 0x000000bf
  437. #define REG_A3XX_RBBM_PERFCTR_UCHE_3_LO 0x000000c0
  438. #define REG_A3XX_RBBM_PERFCTR_UCHE_3_HI 0x000000c1
  439. #define REG_A3XX_RBBM_PERFCTR_UCHE_4_LO 0x000000c2
  440. #define REG_A3XX_RBBM_PERFCTR_UCHE_4_HI 0x000000c3
  441. #define REG_A3XX_RBBM_PERFCTR_UCHE_5_LO 0x000000c4
  442. #define REG_A3XX_RBBM_PERFCTR_UCHE_5_HI 0x000000c5
  443. #define REG_A3XX_RBBM_PERFCTR_TP_0_LO 0x000000c6
  444. #define REG_A3XX_RBBM_PERFCTR_TP_0_HI 0x000000c7
  445. #define REG_A3XX_RBBM_PERFCTR_TP_1_LO 0x000000c8
  446. #define REG_A3XX_RBBM_PERFCTR_TP_1_HI 0x000000c9
  447. #define REG_A3XX_RBBM_PERFCTR_TP_2_LO 0x000000ca
  448. #define REG_A3XX_RBBM_PERFCTR_TP_2_HI 0x000000cb
  449. #define REG_A3XX_RBBM_PERFCTR_TP_3_LO 0x000000cc
  450. #define REG_A3XX_RBBM_PERFCTR_TP_3_HI 0x000000cd
  451. #define REG_A3XX_RBBM_PERFCTR_TP_4_LO 0x000000ce
  452. #define REG_A3XX_RBBM_PERFCTR_TP_4_HI 0x000000cf
  453. #define REG_A3XX_RBBM_PERFCTR_TP_5_LO 0x000000d0
  454. #define REG_A3XX_RBBM_PERFCTR_TP_5_HI 0x000000d1
  455. #define REG_A3XX_RBBM_PERFCTR_SP_0_LO 0x000000d2
  456. #define REG_A3XX_RBBM_PERFCTR_SP_0_HI 0x000000d3
  457. #define REG_A3XX_RBBM_PERFCTR_SP_1_LO 0x000000d4
  458. #define REG_A3XX_RBBM_PERFCTR_SP_1_HI 0x000000d5
  459. #define REG_A3XX_RBBM_PERFCTR_SP_2_LO 0x000000d6
  460. #define REG_A3XX_RBBM_PERFCTR_SP_2_HI 0x000000d7
  461. #define REG_A3XX_RBBM_PERFCTR_SP_3_LO 0x000000d8
  462. #define REG_A3XX_RBBM_PERFCTR_SP_3_HI 0x000000d9
  463. #define REG_A3XX_RBBM_PERFCTR_SP_4_LO 0x000000da
  464. #define REG_A3XX_RBBM_PERFCTR_SP_4_HI 0x000000db
  465. #define REG_A3XX_RBBM_PERFCTR_SP_5_LO 0x000000dc
  466. #define REG_A3XX_RBBM_PERFCTR_SP_5_HI 0x000000dd
  467. #define REG_A3XX_RBBM_PERFCTR_SP_6_LO 0x000000de
  468. #define REG_A3XX_RBBM_PERFCTR_SP_6_HI 0x000000df
  469. #define REG_A3XX_RBBM_PERFCTR_SP_7_LO 0x000000e0
  470. #define REG_A3XX_RBBM_PERFCTR_SP_7_HI 0x000000e1
  471. #define REG_A3XX_RBBM_PERFCTR_RB_0_LO 0x000000e2
  472. #define REG_A3XX_RBBM_PERFCTR_RB_0_HI 0x000000e3
  473. #define REG_A3XX_RBBM_PERFCTR_RB_1_LO 0x000000e4
  474. #define REG_A3XX_RBBM_PERFCTR_RB_1_HI 0x000000e5
  475. #define REG_A3XX_RBBM_PERFCTR_PWR_0_LO 0x000000ea
  476. #define REG_A3XX_RBBM_PERFCTR_PWR_0_HI 0x000000eb
  477. #define REG_A3XX_RBBM_PERFCTR_PWR_1_LO 0x000000ec
  478. #define REG_A3XX_RBBM_PERFCTR_PWR_1_HI 0x000000ed
  479. #define REG_A3XX_RBBM_RBBM_CTL 0x00000100
  480. #define REG_A3XX_RBBM_DEBUG_BUS_CTL 0x00000111
  481. #define REG_A3XX_RBBM_DEBUG_BUS_DATA_STATUS 0x00000112
  482. #define REG_A3XX_CP_PFP_UCODE_ADDR 0x000001c9
  483. #define REG_A3XX_CP_PFP_UCODE_DATA 0x000001ca
  484. #define REG_A3XX_CP_ROQ_ADDR 0x000001cc
  485. #define REG_A3XX_CP_ROQ_DATA 0x000001cd
  486. #define REG_A3XX_CP_MERCIU_ADDR 0x000001d1
  487. #define REG_A3XX_CP_MERCIU_DATA 0x000001d2
  488. #define REG_A3XX_CP_MERCIU_DATA2 0x000001d3
  489. #define REG_A3XX_CP_MEQ_ADDR 0x000001da
  490. #define REG_A3XX_CP_MEQ_DATA 0x000001db
  491. #define REG_A3XX_CP_WFI_PEND_CTR 0x000001f5
  492. #define REG_A3XX_RBBM_PM_OVERRIDE2 0x0000039d
  493. #define REG_A3XX_CP_PERFCOUNTER_SELECT 0x00000445
  494. #define REG_A3XX_CP_HW_FAULT 0x0000045c
  495. #define REG_A3XX_CP_PROTECT_CTRL 0x0000045e
  496. #define REG_A3XX_CP_PROTECT_STATUS 0x0000045f
  497. static inline uint32_t REG_A3XX_CP_PROTECT(uint32_t i0) { return 0x00000460 + 0x1*i0; }
  498. static inline uint32_t REG_A3XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000460 + 0x1*i0; }
  499. #define REG_A3XX_CP_AHB_FAULT 0x0000054d
  500. #define REG_A3XX_SQ_GPR_MANAGEMENT 0x00000d00
  501. #define REG_A3XX_SQ_INST_STORE_MANAGMENT 0x00000d02
  502. #define REG_A3XX_TP0_CHICKEN 0x00000e1e
  503. #define REG_A3XX_SP_GLOBAL_MEM_SIZE 0x00000e22
  504. #define REG_A3XX_SP_GLOBAL_MEM_ADDR 0x00000e23
  505. #define REG_A3XX_GRAS_CL_CLIP_CNTL 0x00002040
  506. #define A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER 0x00001000
  507. #define A3XX_GRAS_CL_CLIP_CNTL_CLIP_DISABLE 0x00010000
  508. #define A3XX_GRAS_CL_CLIP_CNTL_ZFAR_CLIP_DISABLE 0x00020000
  509. #define A3XX_GRAS_CL_CLIP_CNTL_VP_CLIP_CODE_IGNORE 0x00080000
  510. #define A3XX_GRAS_CL_CLIP_CNTL_VP_XFORM_DISABLE 0x00100000
  511. #define A3XX_GRAS_CL_CLIP_CNTL_PERSP_DIVISION_DISABLE 0x00200000
  512. #define A3XX_GRAS_CL_CLIP_CNTL_ZERO_GB_SCALE_Z 0x00400000
  513. #define A3XX_GRAS_CL_CLIP_CNTL_ZCOORD 0x00800000
  514. #define A3XX_GRAS_CL_CLIP_CNTL_WCOORD 0x01000000
  515. #define A3XX_GRAS_CL_CLIP_CNTL_ZCLIP_DISABLE 0x02000000
  516. #define A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__MASK 0x1c000000
  517. #define A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__SHIFT 26
  518. static inline uint32_t A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES(uint32_t val)
  519. {
  520. return ((val) << A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__SHIFT) & A3XX_GRAS_CL_CLIP_CNTL_NUM_USER_CLIP_PLANES__MASK;
  521. }
  522. #define REG_A3XX_GRAS_CL_GB_CLIP_ADJ 0x00002044
  523. #define A3XX_GRAS_CL_GB_CLIP_ADJ_HORZ__MASK 0x000003ff
  524. #define A3XX_GRAS_CL_GB_CLIP_ADJ_HORZ__SHIFT 0
  525. static inline uint32_t A3XX_GRAS_CL_GB_CLIP_ADJ_HORZ(uint32_t val)
  526. {
  527. return ((val) << A3XX_GRAS_CL_GB_CLIP_ADJ_HORZ__SHIFT) & A3XX_GRAS_CL_GB_CLIP_ADJ_HORZ__MASK;
  528. }
  529. #define A3XX_GRAS_CL_GB_CLIP_ADJ_VERT__MASK 0x000ffc00
  530. #define A3XX_GRAS_CL_GB_CLIP_ADJ_VERT__SHIFT 10
  531. static inline uint32_t A3XX_GRAS_CL_GB_CLIP_ADJ_VERT(uint32_t val)
  532. {
  533. return ((val) << A3XX_GRAS_CL_GB_CLIP_ADJ_VERT__SHIFT) & A3XX_GRAS_CL_GB_CLIP_ADJ_VERT__MASK;
  534. }
  535. #define REG_A3XX_GRAS_CL_VPORT_XOFFSET 0x00002048
  536. #define A3XX_GRAS_CL_VPORT_XOFFSET__MASK 0xffffffff
  537. #define A3XX_GRAS_CL_VPORT_XOFFSET__SHIFT 0
  538. static inline uint32_t A3XX_GRAS_CL_VPORT_XOFFSET(float val)
  539. {
  540. return ((fui(val)) << A3XX_GRAS_CL_VPORT_XOFFSET__SHIFT) & A3XX_GRAS_CL_VPORT_XOFFSET__MASK;
  541. }
  542. #define REG_A3XX_GRAS_CL_VPORT_XSCALE 0x00002049
  543. #define A3XX_GRAS_CL_VPORT_XSCALE__MASK 0xffffffff
  544. #define A3XX_GRAS_CL_VPORT_XSCALE__SHIFT 0
  545. static inline uint32_t A3XX_GRAS_CL_VPORT_XSCALE(float val)
  546. {
  547. return ((fui(val)) << A3XX_GRAS_CL_VPORT_XSCALE__SHIFT) & A3XX_GRAS_CL_VPORT_XSCALE__MASK;
  548. }
  549. #define REG_A3XX_GRAS_CL_VPORT_YOFFSET 0x0000204a
  550. #define A3XX_GRAS_CL_VPORT_YOFFSET__MASK 0xffffffff
  551. #define A3XX_GRAS_CL_VPORT_YOFFSET__SHIFT 0
  552. static inline uint32_t A3XX_GRAS_CL_VPORT_YOFFSET(float val)
  553. {
  554. return ((fui(val)) << A3XX_GRAS_CL_VPORT_YOFFSET__SHIFT) & A3XX_GRAS_CL_VPORT_YOFFSET__MASK;
  555. }
  556. #define REG_A3XX_GRAS_CL_VPORT_YSCALE 0x0000204b
  557. #define A3XX_GRAS_CL_VPORT_YSCALE__MASK 0xffffffff
  558. #define A3XX_GRAS_CL_VPORT_YSCALE__SHIFT 0
  559. static inline uint32_t A3XX_GRAS_CL_VPORT_YSCALE(float val)
  560. {
  561. return ((fui(val)) << A3XX_GRAS_CL_VPORT_YSCALE__SHIFT) & A3XX_GRAS_CL_VPORT_YSCALE__MASK;
  562. }
  563. #define REG_A3XX_GRAS_CL_VPORT_ZOFFSET 0x0000204c
  564. #define A3XX_GRAS_CL_VPORT_ZOFFSET__MASK 0xffffffff
  565. #define A3XX_GRAS_CL_VPORT_ZOFFSET__SHIFT 0
  566. static inline uint32_t A3XX_GRAS_CL_VPORT_ZOFFSET(float val)
  567. {
  568. return ((fui(val)) << A3XX_GRAS_CL_VPORT_ZOFFSET__SHIFT) & A3XX_GRAS_CL_VPORT_ZOFFSET__MASK;
  569. }
  570. #define REG_A3XX_GRAS_CL_VPORT_ZSCALE 0x0000204d
  571. #define A3XX_GRAS_CL_VPORT_ZSCALE__MASK 0xffffffff
  572. #define A3XX_GRAS_CL_VPORT_ZSCALE__SHIFT 0
  573. static inline uint32_t A3XX_GRAS_CL_VPORT_ZSCALE(float val)
  574. {
  575. return ((fui(val)) << A3XX_GRAS_CL_VPORT_ZSCALE__SHIFT) & A3XX_GRAS_CL_VPORT_ZSCALE__MASK;
  576. }
  577. #define REG_A3XX_GRAS_SU_POINT_MINMAX 0x00002068
  578. #define A3XX_GRAS_SU_POINT_MINMAX_MIN__MASK 0x0000ffff
  579. #define A3XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT 0
  580. static inline uint32_t A3XX_GRAS_SU_POINT_MINMAX_MIN(float val)
  581. {
  582. return ((((uint32_t)(val * 16.0))) << A3XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT) & A3XX_GRAS_SU_POINT_MINMAX_MIN__MASK;
  583. }
  584. #define A3XX_GRAS_SU_POINT_MINMAX_MAX__MASK 0xffff0000
  585. #define A3XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT 16
  586. static inline uint32_t A3XX_GRAS_SU_POINT_MINMAX_MAX(float val)
  587. {
  588. return ((((uint32_t)(val * 16.0))) << A3XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT) & A3XX_GRAS_SU_POINT_MINMAX_MAX__MASK;
  589. }
  590. #define REG_A3XX_GRAS_SU_POINT_SIZE 0x00002069
  591. #define A3XX_GRAS_SU_POINT_SIZE__MASK 0xffffffff
  592. #define A3XX_GRAS_SU_POINT_SIZE__SHIFT 0
  593. static inline uint32_t A3XX_GRAS_SU_POINT_SIZE(float val)
  594. {
  595. return ((((int32_t)(val * 16.0))) << A3XX_GRAS_SU_POINT_SIZE__SHIFT) & A3XX_GRAS_SU_POINT_SIZE__MASK;
  596. }
  597. #define REG_A3XX_GRAS_SU_POLY_OFFSET_SCALE 0x0000206c
  598. #define A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__MASK 0x00ffffff
  599. #define A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__SHIFT 0
  600. static inline uint32_t A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL(float val)
  601. {
  602. return ((((int32_t)(val * 1048576.0))) << A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__SHIFT) & A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL__MASK;
  603. }
  604. #define REG_A3XX_GRAS_SU_POLY_OFFSET_OFFSET 0x0000206d
  605. #define A3XX_GRAS_SU_POLY_OFFSET_OFFSET__MASK 0xffffffff
  606. #define A3XX_GRAS_SU_POLY_OFFSET_OFFSET__SHIFT 0
  607. static inline uint32_t A3XX_GRAS_SU_POLY_OFFSET_OFFSET(float val)
  608. {
  609. return ((((int32_t)(val * 64.0))) << A3XX_GRAS_SU_POLY_OFFSET_OFFSET__SHIFT) & A3XX_GRAS_SU_POLY_OFFSET_OFFSET__MASK;
  610. }
  611. #define REG_A3XX_GRAS_SU_MODE_CONTROL 0x00002070
  612. #define A3XX_GRAS_SU_MODE_CONTROL_CULL_FRONT 0x00000001
  613. #define A3XX_GRAS_SU_MODE_CONTROL_CULL_BACK 0x00000002
  614. #define A3XX_GRAS_SU_MODE_CONTROL_FRONT_CW 0x00000004
  615. #define A3XX_GRAS_SU_MODE_CONTROL_LINEHALFWIDTH__MASK 0x000007f8
  616. #define A3XX_GRAS_SU_MODE_CONTROL_LINEHALFWIDTH__SHIFT 3
  617. static inline uint32_t A3XX_GRAS_SU_MODE_CONTROL_LINEHALFWIDTH(float val)
  618. {
  619. return ((((int32_t)(val * 4.0))) << A3XX_GRAS_SU_MODE_CONTROL_LINEHALFWIDTH__SHIFT) & A3XX_GRAS_SU_MODE_CONTROL_LINEHALFWIDTH__MASK;
  620. }
  621. #define A3XX_GRAS_SU_MODE_CONTROL_POLY_OFFSET 0x00000800
  622. #define REG_A3XX_GRAS_SC_CONTROL 0x00002072
  623. #define A3XX_GRAS_SC_CONTROL_RENDER_MODE__MASK 0x000000f0
  624. #define A3XX_GRAS_SC_CONTROL_RENDER_MODE__SHIFT 4
  625. static inline uint32_t A3XX_GRAS_SC_CONTROL_RENDER_MODE(enum a3xx_render_mode val)
  626. {
  627. return ((val) << A3XX_GRAS_SC_CONTROL_RENDER_MODE__SHIFT) & A3XX_GRAS_SC_CONTROL_RENDER_MODE__MASK;
  628. }
  629. #define A3XX_GRAS_SC_CONTROL_MSAA_SAMPLES__MASK 0x00000f00
  630. #define A3XX_GRAS_SC_CONTROL_MSAA_SAMPLES__SHIFT 8
  631. static inline uint32_t A3XX_GRAS_SC_CONTROL_MSAA_SAMPLES(enum a3xx_msaa_samples val)
  632. {
  633. return ((val) << A3XX_GRAS_SC_CONTROL_MSAA_SAMPLES__SHIFT) & A3XX_GRAS_SC_CONTROL_MSAA_SAMPLES__MASK;
  634. }
  635. #define A3XX_GRAS_SC_CONTROL_RASTER_MODE__MASK 0x0000f000
  636. #define A3XX_GRAS_SC_CONTROL_RASTER_MODE__SHIFT 12
  637. static inline uint32_t A3XX_GRAS_SC_CONTROL_RASTER_MODE(uint32_t val)
  638. {
  639. return ((val) << A3XX_GRAS_SC_CONTROL_RASTER_MODE__SHIFT) & A3XX_GRAS_SC_CONTROL_RASTER_MODE__MASK;
  640. }
  641. #define REG_A3XX_GRAS_SC_SCREEN_SCISSOR_TL 0x00002074
  642. #define A3XX_GRAS_SC_SCREEN_SCISSOR_TL_WINDOW_OFFSET_DISABLE 0x80000000
  643. #define A3XX_GRAS_SC_SCREEN_SCISSOR_TL_X__MASK 0x00007fff
  644. #define A3XX_GRAS_SC_SCREEN_SCISSOR_TL_X__SHIFT 0
  645. static inline uint32_t A3XX_GRAS_SC_SCREEN_SCISSOR_TL_X(uint32_t val)
  646. {
  647. return ((val) << A3XX_GRAS_SC_SCREEN_SCISSOR_TL_X__SHIFT) & A3XX_GRAS_SC_SCREEN_SCISSOR_TL_X__MASK;
  648. }
  649. #define A3XX_GRAS_SC_SCREEN_SCISSOR_TL_Y__MASK 0x7fff0000
  650. #define A3XX_GRAS_SC_SCREEN_SCISSOR_TL_Y__SHIFT 16
  651. static inline uint32_t A3XX_GRAS_SC_SCREEN_SCISSOR_TL_Y(uint32_t val)
  652. {
  653. return ((val) << A3XX_GRAS_SC_SCREEN_SCISSOR_TL_Y__SHIFT) & A3XX_GRAS_SC_SCREEN_SCISSOR_TL_Y__MASK;
  654. }
  655. #define REG_A3XX_GRAS_SC_SCREEN_SCISSOR_BR 0x00002075
  656. #define A3XX_GRAS_SC_SCREEN_SCISSOR_BR_WINDOW_OFFSET_DISABLE 0x80000000
  657. #define A3XX_GRAS_SC_SCREEN_SCISSOR_BR_X__MASK 0x00007fff
  658. #define A3XX_GRAS_SC_SCREEN_SCISSOR_BR_X__SHIFT 0
  659. static inline uint32_t A3XX_GRAS_SC_SCREEN_SCISSOR_BR_X(uint32_t val)
  660. {
  661. return ((val) << A3XX_GRAS_SC_SCREEN_SCISSOR_BR_X__SHIFT) & A3XX_GRAS_SC_SCREEN_SCISSOR_BR_X__MASK;
  662. }
  663. #define A3XX_GRAS_SC_SCREEN_SCISSOR_BR_Y__MASK 0x7fff0000
  664. #define A3XX_GRAS_SC_SCREEN_SCISSOR_BR_Y__SHIFT 16
  665. static inline uint32_t A3XX_GRAS_SC_SCREEN_SCISSOR_BR_Y(uint32_t val)
  666. {
  667. return ((val) << A3XX_GRAS_SC_SCREEN_SCISSOR_BR_Y__SHIFT) & A3XX_GRAS_SC_SCREEN_SCISSOR_BR_Y__MASK;
  668. }
  669. #define REG_A3XX_GRAS_SC_WINDOW_SCISSOR_TL 0x00002079
  670. #define A3XX_GRAS_SC_WINDOW_SCISSOR_TL_WINDOW_OFFSET_DISABLE 0x80000000
  671. #define A3XX_GRAS_SC_WINDOW_SCISSOR_TL_X__MASK 0x00007fff
  672. #define A3XX_GRAS_SC_WINDOW_SCISSOR_TL_X__SHIFT 0
  673. static inline uint32_t A3XX_GRAS_SC_WINDOW_SCISSOR_TL_X(uint32_t val)
  674. {
  675. return ((val) << A3XX_GRAS_SC_WINDOW_SCISSOR_TL_X__SHIFT) & A3XX_GRAS_SC_WINDOW_SCISSOR_TL_X__MASK;
  676. }
  677. #define A3XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__MASK 0x7fff0000
  678. #define A3XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__SHIFT 16
  679. static inline uint32_t A3XX_GRAS_SC_WINDOW_SCISSOR_TL_Y(uint32_t val)
  680. {
  681. return ((val) << A3XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__SHIFT) & A3XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__MASK;
  682. }
  683. #define REG_A3XX_GRAS_SC_WINDOW_SCISSOR_BR 0x0000207a
  684. #define A3XX_GRAS_SC_WINDOW_SCISSOR_BR_WINDOW_OFFSET_DISABLE 0x80000000
  685. #define A3XX_GRAS_SC_WINDOW_SCISSOR_BR_X__MASK 0x00007fff
  686. #define A3XX_GRAS_SC_WINDOW_SCISSOR_BR_X__SHIFT 0
  687. static inline uint32_t A3XX_GRAS_SC_WINDOW_SCISSOR_BR_X(uint32_t val)
  688. {
  689. return ((val) << A3XX_GRAS_SC_WINDOW_SCISSOR_BR_X__SHIFT) & A3XX_GRAS_SC_WINDOW_SCISSOR_BR_X__MASK;
  690. }
  691. #define A3XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__MASK 0x7fff0000
  692. #define A3XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__SHIFT 16
  693. static inline uint32_t A3XX_GRAS_SC_WINDOW_SCISSOR_BR_Y(uint32_t val)
  694. {
  695. return ((val) << A3XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__SHIFT) & A3XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__MASK;
  696. }
  697. #define REG_A3XX_RB_MODE_CONTROL 0x000020c0
  698. #define A3XX_RB_MODE_CONTROL_GMEM_BYPASS 0x00000080
  699. #define A3XX_RB_MODE_CONTROL_RENDER_MODE__MASK 0x00000700
  700. #define A3XX_RB_MODE_CONTROL_RENDER_MODE__SHIFT 8
  701. static inline uint32_t A3XX_RB_MODE_CONTROL_RENDER_MODE(enum a3xx_render_mode val)
  702. {
  703. return ((val) << A3XX_RB_MODE_CONTROL_RENDER_MODE__SHIFT) & A3XX_RB_MODE_CONTROL_RENDER_MODE__MASK;
  704. }
  705. #define A3XX_RB_MODE_CONTROL_MRT__MASK 0x00003000
  706. #define A3XX_RB_MODE_CONTROL_MRT__SHIFT 12
  707. static inline uint32_t A3XX_RB_MODE_CONTROL_MRT(uint32_t val)
  708. {
  709. return ((val) << A3XX_RB_MODE_CONTROL_MRT__SHIFT) & A3XX_RB_MODE_CONTROL_MRT__MASK;
  710. }
  711. #define A3XX_RB_MODE_CONTROL_MARB_CACHE_SPLIT_MODE 0x00008000
  712. #define A3XX_RB_MODE_CONTROL_PACKER_TIMER_ENABLE 0x00010000
  713. #define REG_A3XX_RB_RENDER_CONTROL 0x000020c1
  714. #define A3XX_RB_RENDER_CONTROL_DUAL_COLOR_IN_ENABLE 0x00000001
  715. #define A3XX_RB_RENDER_CONTROL_YUV_IN_ENABLE 0x00000002
  716. #define A3XX_RB_RENDER_CONTROL_COV_VALUE_INPUT_ENABLE 0x00000004
  717. #define A3XX_RB_RENDER_CONTROL_FACENESS 0x00000008
  718. #define A3XX_RB_RENDER_CONTROL_BIN_WIDTH__MASK 0x00000ff0
  719. #define A3XX_RB_RENDER_CONTROL_BIN_WIDTH__SHIFT 4
  720. static inline uint32_t A3XX_RB_RENDER_CONTROL_BIN_WIDTH(uint32_t val)
  721. {
  722. return ((val >> 5) << A3XX_RB_RENDER_CONTROL_BIN_WIDTH__SHIFT) & A3XX_RB_RENDER_CONTROL_BIN_WIDTH__MASK;
  723. }
  724. #define A3XX_RB_RENDER_CONTROL_DISABLE_COLOR_PIPE 0x00001000
  725. #define A3XX_RB_RENDER_CONTROL_ENABLE_GMEM 0x00002000
  726. #define A3XX_RB_RENDER_CONTROL_XCOORD 0x00004000
  727. #define A3XX_RB_RENDER_CONTROL_YCOORD 0x00008000
  728. #define A3XX_RB_RENDER_CONTROL_ZCOORD 0x00010000
  729. #define A3XX_RB_RENDER_CONTROL_WCOORD 0x00020000
  730. #define A3XX_RB_RENDER_CONTROL_I_CLAMP_ENABLE 0x00080000
  731. #define A3XX_RB_RENDER_CONTROL_COV_VALUE_OUTPUT_ENABLE 0x00100000
  732. #define A3XX_RB_RENDER_CONTROL_ALPHA_TEST 0x00400000
  733. #define A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__MASK 0x07000000
  734. #define A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__SHIFT 24
  735. static inline uint32_t A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC(enum adreno_compare_func val)
  736. {
  737. return ((val) << A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__SHIFT) & A3XX_RB_RENDER_CONTROL_ALPHA_TEST_FUNC__MASK;
  738. }
  739. #define A3XX_RB_RENDER_CONTROL_ALPHA_TO_COVERAGE 0x40000000
  740. #define A3XX_RB_RENDER_CONTROL_ALPHA_TO_ONE 0x80000000
  741. #define REG_A3XX_RB_MSAA_CONTROL 0x000020c2
  742. #define A3XX_RB_MSAA_CONTROL_DISABLE 0x00000400
  743. #define A3XX_RB_MSAA_CONTROL_SAMPLES__MASK 0x0000f000
  744. #define A3XX_RB_MSAA_CONTROL_SAMPLES__SHIFT 12
  745. static inline uint32_t A3XX_RB_MSAA_CONTROL_SAMPLES(enum a3xx_msaa_samples val)
  746. {
  747. return ((val) << A3XX_RB_MSAA_CONTROL_SAMPLES__SHIFT) & A3XX_RB_MSAA_CONTROL_SAMPLES__MASK;
  748. }
  749. #define A3XX_RB_MSAA_CONTROL_SAMPLE_MASK__MASK 0xffff0000
  750. #define A3XX_RB_MSAA_CONTROL_SAMPLE_MASK__SHIFT 16
  751. static inline uint32_t A3XX_RB_MSAA_CONTROL_SAMPLE_MASK(uint32_t val)
  752. {
  753. return ((val) << A3XX_RB_MSAA_CONTROL_SAMPLE_MASK__SHIFT) & A3XX_RB_MSAA_CONTROL_SAMPLE_MASK__MASK;
  754. }
  755. #define REG_A3XX_RB_ALPHA_REF 0x000020c3
  756. #define A3XX_RB_ALPHA_REF_UINT__MASK 0x0000ff00
  757. #define A3XX_RB_ALPHA_REF_UINT__SHIFT 8
  758. static inline uint32_t A3XX_RB_ALPHA_REF_UINT(uint32_t val)
  759. {
  760. return ((val) << A3XX_RB_ALPHA_REF_UINT__SHIFT) & A3XX_RB_ALPHA_REF_UINT__MASK;
  761. }
  762. #define A3XX_RB_ALPHA_REF_FLOAT__MASK 0xffff0000
  763. #define A3XX_RB_ALPHA_REF_FLOAT__SHIFT 16
  764. static inline uint32_t A3XX_RB_ALPHA_REF_FLOAT(float val)
  765. {
  766. return ((util_float_to_half(val)) << A3XX_RB_ALPHA_REF_FLOAT__SHIFT) & A3XX_RB_ALPHA_REF_FLOAT__MASK;
  767. }
  768. static inline uint32_t REG_A3XX_RB_MRT(uint32_t i0) { return 0x000020c4 + 0x4*i0; }
  769. static inline uint32_t REG_A3XX_RB_MRT_CONTROL(uint32_t i0) { return 0x000020c4 + 0x4*i0; }
  770. #define A3XX_RB_MRT_CONTROL_READ_DEST_ENABLE 0x00000008
  771. #define A3XX_RB_MRT_CONTROL_BLEND 0x00000010
  772. #define A3XX_RB_MRT_CONTROL_BLEND2 0x00000020
  773. #define A3XX_RB_MRT_CONTROL_ROP_CODE__MASK 0x00000f00
  774. #define A3XX_RB_MRT_CONTROL_ROP_CODE__SHIFT 8
  775. static inline uint32_t A3XX_RB_MRT_CONTROL_ROP_CODE(enum a3xx_rop_code val)
  776. {
  777. return ((val) << A3XX_RB_MRT_CONTROL_ROP_CODE__SHIFT) & A3XX_RB_MRT_CONTROL_ROP_CODE__MASK;
  778. }
  779. #define A3XX_RB_MRT_CONTROL_DITHER_MODE__MASK 0x00003000
  780. #define A3XX_RB_MRT_CONTROL_DITHER_MODE__SHIFT 12
  781. static inline uint32_t A3XX_RB_MRT_CONTROL_DITHER_MODE(enum adreno_rb_dither_mode val)
  782. {
  783. return ((val) << A3XX_RB_MRT_CONTROL_DITHER_MODE__SHIFT) & A3XX_RB_MRT_CONTROL_DITHER_MODE__MASK;
  784. }
  785. #define A3XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK 0x0f000000
  786. #define A3XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT 24
  787. static inline uint32_t A3XX_RB_MRT_CONTROL_COMPONENT_ENABLE(uint32_t val)
  788. {
  789. return ((val) << A3XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT) & A3XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK;
  790. }
  791. static inline uint32_t REG_A3XX_RB_MRT_BUF_INFO(uint32_t i0) { return 0x000020c5 + 0x4*i0; }
  792. #define A3XX_RB_MRT_BUF_INFO_COLOR_FORMAT__MASK 0x0000003f
  793. #define A3XX_RB_MRT_BUF_INFO_COLOR_FORMAT__SHIFT 0
  794. static inline uint32_t A3XX_RB_MRT_BUF_INFO_COLOR_FORMAT(enum a3xx_color_fmt val)
  795. {
  796. return ((val) << A3XX_RB_MRT_BUF_INFO_COLOR_FORMAT__SHIFT) & A3XX_RB_MRT_BUF_INFO_COLOR_FORMAT__MASK;
  797. }
  798. #define A3XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__MASK 0x000000c0
  799. #define A3XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__SHIFT 6
  800. static inline uint32_t A3XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE(enum a3xx_tile_mode val)
  801. {
  802. return ((val) << A3XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__SHIFT) & A3XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__MASK;
  803. }
  804. #define A3XX_RB_MRT_BUF_INFO_COLOR_SWAP__MASK 0x00000c00
  805. #define A3XX_RB_MRT_BUF_INFO_COLOR_SWAP__SHIFT 10
  806. static inline uint32_t A3XX_RB_MRT_BUF_INFO_COLOR_SWAP(enum a3xx_color_swap val)
  807. {
  808. return ((val) << A3XX_RB_MRT_BUF_INFO_COLOR_SWAP__SHIFT) & A3XX_RB_MRT_BUF_INFO_COLOR_SWAP__MASK;
  809. }
  810. #define A3XX_RB_MRT_BUF_INFO_COLOR_SRGB 0x00004000
  811. #define A3XX_RB_MRT_BUF_INFO_COLOR_BUF_PITCH__MASK 0xfffe0000
  812. #define A3XX_RB_MRT_BUF_INFO_COLOR_BUF_PITCH__SHIFT 17
  813. static inline uint32_t A3XX_RB_MRT_BUF_INFO_COLOR_BUF_PITCH(uint32_t val)
  814. {
  815. return ((val >> 5) << A3XX_RB_MRT_BUF_INFO_COLOR_BUF_PITCH__SHIFT) & A3XX_RB_MRT_BUF_INFO_COLOR_BUF_PITCH__MASK;
  816. }
  817. static inline uint32_t REG_A3XX_RB_MRT_BUF_BASE(uint32_t i0) { return 0x000020c6 + 0x4*i0; }
  818. #define A3XX_RB_MRT_BUF_BASE_COLOR_BUF_BASE__MASK 0xfffffff0
  819. #define A3XX_RB_MRT_BUF_BASE_COLOR_BUF_BASE__SHIFT 4
  820. static inline uint32_t A3XX_RB_MRT_BUF_BASE_COLOR_BUF_BASE(uint32_t val)
  821. {
  822. return ((val >> 5) << A3XX_RB_MRT_BUF_BASE_COLOR_BUF_BASE__SHIFT) & A3XX_RB_MRT_BUF_BASE_COLOR_BUF_BASE__MASK;
  823. }
  824. static inline uint32_t REG_A3XX_RB_MRT_BLEND_CONTROL(uint32_t i0) { return 0x000020c7 + 0x4*i0; }
  825. #define A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__MASK 0x0000001f
  826. #define A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__SHIFT 0
  827. static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(enum adreno_rb_blend_factor val)
  828. {
  829. return ((val) << A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__MASK;
  830. }
  831. #define A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK 0x000000e0
  832. #define A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT 5
  833. static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
  834. {
  835. return ((val) << A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK;
  836. }
  837. #define A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__MASK 0x00001f00
  838. #define A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__SHIFT 8
  839. static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(enum adreno_rb_blend_factor val)
  840. {
  841. return ((val) << A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__MASK;
  842. }
  843. #define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__MASK 0x001f0000
  844. #define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__SHIFT 16
  845. static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(enum adreno_rb_blend_factor val)
  846. {
  847. return ((val) << A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__MASK;
  848. }
  849. #define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK 0x00e00000
  850. #define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT 21
  851. static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
  852. {
  853. return ((val) << A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK;
  854. }
  855. #define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__MASK 0x1f000000
  856. #define A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__SHIFT 24
  857. static inline uint32_t A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(enum adreno_rb_blend_factor val)
  858. {
  859. return ((val) << A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__SHIFT) & A3XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__MASK;
  860. }
  861. #define A3XX_RB_MRT_BLEND_CONTROL_CLAMP_ENABLE 0x20000000
  862. #define REG_A3XX_RB_BLEND_RED 0x000020e4
  863. #define A3XX_RB_BLEND_RED_UINT__MASK 0x000000ff
  864. #define A3XX_RB_BLEND_RED_UINT__SHIFT 0
  865. static inline uint32_t A3XX_RB_BLEND_RED_UINT(uint32_t val)
  866. {
  867. return ((val) << A3XX_RB_BLEND_RED_UINT__SHIFT) & A3XX_RB_BLEND_RED_UINT__MASK;
  868. }
  869. #define A3XX_RB_BLEND_RED_FLOAT__MASK 0xffff0000
  870. #define A3XX_RB_BLEND_RED_FLOAT__SHIFT 16
  871. static inline uint32_t A3XX_RB_BLEND_RED_FLOAT(float val)
  872. {
  873. return ((util_float_to_half(val)) << A3XX_RB_BLEND_RED_FLOAT__SHIFT) & A3XX_RB_BLEND_RED_FLOAT__MASK;
  874. }
  875. #define REG_A3XX_RB_BLEND_GREEN 0x000020e5
  876. #define A3XX_RB_BLEND_GREEN_UINT__MASK 0x000000ff
  877. #define A3XX_RB_BLEND_GREEN_UINT__SHIFT 0
  878. static inline uint32_t A3XX_RB_BLEND_GREEN_UINT(uint32_t val)
  879. {
  880. return ((val) << A3XX_RB_BLEND_GREEN_UINT__SHIFT) & A3XX_RB_BLEND_GREEN_UINT__MASK;
  881. }
  882. #define A3XX_RB_BLEND_GREEN_FLOAT__MASK 0xffff0000
  883. #define A3XX_RB_BLEND_GREEN_FLOAT__SHIFT 16
  884. static inline uint32_t A3XX_RB_BLEND_GREEN_FLOAT(float val)
  885. {
  886. return ((util_float_to_half(val)) << A3XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A3XX_RB_BLEND_GREEN_FLOAT__MASK;
  887. }
  888. #define REG_A3XX_RB_BLEND_BLUE 0x000020e6
  889. #define A3XX_RB_BLEND_BLUE_UINT__MASK 0x000000ff
  890. #define A3XX_RB_BLEND_BLUE_UINT__SHIFT 0
  891. static inline uint32_t A3XX_RB_BLEND_BLUE_UINT(uint32_t val)
  892. {
  893. return ((val) << A3XX_RB_BLEND_BLUE_UINT__SHIFT) & A3XX_RB_BLEND_BLUE_UINT__MASK;
  894. }
  895. #define A3XX_RB_BLEND_BLUE_FLOAT__MASK 0xffff0000
  896. #define A3XX_RB_BLEND_BLUE_FLOAT__SHIFT 16
  897. static inline uint32_t A3XX_RB_BLEND_BLUE_FLOAT(float val)
  898. {
  899. return ((util_float_to_half(val)) << A3XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A3XX_RB_BLEND_BLUE_FLOAT__MASK;
  900. }
  901. #define REG_A3XX_RB_BLEND_ALPHA 0x000020e7
  902. #define A3XX_RB_BLEND_ALPHA_UINT__MASK 0x000000ff
  903. #define A3XX_RB_BLEND_ALPHA_UINT__SHIFT 0
  904. static inline uint32_t A3XX_RB_BLEND_ALPHA_UINT(uint32_t val)
  905. {
  906. return ((val) << A3XX_RB_BLEND_ALPHA_UINT__SHIFT) & A3XX_RB_BLEND_ALPHA_UINT__MASK;
  907. }
  908. #define A3XX_RB_BLEND_ALPHA_FLOAT__MASK 0xffff0000
  909. #define A3XX_RB_BLEND_ALPHA_FLOAT__SHIFT 16
  910. static inline uint32_t A3XX_RB_BLEND_ALPHA_FLOAT(float val)
  911. {
  912. return ((util_float_to_half(val)) << A3XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A3XX_RB_BLEND_ALPHA_FLOAT__MASK;
  913. }
  914. #define REG_A3XX_RB_CLEAR_COLOR_DW0 0x000020e8
  915. #define REG_A3XX_RB_CLEAR_COLOR_DW1 0x000020e9
  916. #define REG_A3XX_RB_CLEAR_COLOR_DW2 0x000020ea
  917. #define REG_A3XX_RB_CLEAR_COLOR_DW3 0x000020eb
  918. #define REG_A3XX_RB_COPY_CONTROL 0x000020ec
  919. #define A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__MASK 0x00000003
  920. #define A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__SHIFT 0
  921. static inline uint32_t A3XX_RB_COPY_CONTROL_MSAA_RESOLVE(enum a3xx_msaa_samples val)
  922. {
  923. return ((val) << A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__SHIFT) & A3XX_RB_COPY_CONTROL_MSAA_RESOLVE__MASK;
  924. }
  925. #define A3XX_RB_COPY_CONTROL_DEPTHCLEAR 0x00000008
  926. #define A3XX_RB_COPY_CONTROL_MODE__MASK 0x00000070
  927. #define A3XX_RB_COPY_CONTROL_MODE__SHIFT 4
  928. static inline uint32_t A3XX_RB_COPY_CONTROL_MODE(enum adreno_rb_copy_control_mode val)
  929. {
  930. return ((val) << A3XX_RB_COPY_CONTROL_MODE__SHIFT) & A3XX_RB_COPY_CONTROL_MODE__MASK;
  931. }
  932. #define A3XX_RB_COPY_CONTROL_FASTCLEAR__MASK 0x00000f00
  933. #define A3XX_RB_COPY_CONTROL_FASTCLEAR__SHIFT 8
  934. static inline uint32_t A3XX_RB_COPY_CONTROL_FASTCLEAR(uint32_t val)
  935. {
  936. return ((val) << A3XX_RB_COPY_CONTROL_FASTCLEAR__SHIFT) & A3XX_RB_COPY_CONTROL_FASTCLEAR__MASK;
  937. }
  938. #define A3XX_RB_COPY_CONTROL_UNK12 0x00001000
  939. #define A3XX_RB_COPY_CONTROL_GMEM_BASE__MASK 0xffffc000
  940. #define A3XX_RB_COPY_CONTROL_GMEM_BASE__SHIFT 14
  941. static inline uint32_t A3XX_RB_COPY_CONTROL_GMEM_BASE(uint32_t val)
  942. {
  943. return ((val >> 14) << A3XX_RB_COPY_CONTROL_GMEM_BASE__SHIFT) & A3XX_RB_COPY_CONTROL_GMEM_BASE__MASK;
  944. }
  945. #define REG_A3XX_RB_COPY_DEST_BASE 0x000020ed
  946. #define A3XX_RB_COPY_DEST_BASE_BASE__MASK 0xfffffff0
  947. #define A3XX_RB_COPY_DEST_BASE_BASE__SHIFT 4
  948. static inline uint32_t A3XX_RB_COPY_DEST_BASE_BASE(uint32_t val)
  949. {
  950. return ((val >> 5) << A3XX_RB_COPY_DEST_BASE_BASE__SHIFT) & A3XX_RB_COPY_DEST_BASE_BASE__MASK;
  951. }
  952. #define REG_A3XX_RB_COPY_DEST_PITCH 0x000020ee
  953. #define A3XX_RB_COPY_DEST_PITCH_PITCH__MASK 0xffffffff
  954. #define A3XX_RB_COPY_DEST_PITCH_PITCH__SHIFT 0
  955. static inline uint32_t A3XX_RB_COPY_DEST_PITCH_PITCH(uint32_t val)
  956. {
  957. return ((val >> 5) << A3XX_RB_COPY_DEST_PITCH_PITCH__SHIFT) & A3XX_RB_COPY_DEST_PITCH_PITCH__MASK;
  958. }
  959. #define REG_A3XX_RB_COPY_DEST_INFO 0x000020ef
  960. #define A3XX_RB_COPY_DEST_INFO_TILE__MASK 0x00000003
  961. #define A3XX_RB_COPY_DEST_INFO_TILE__SHIFT 0
  962. static inline uint32_t A3XX_RB_COPY_DEST_INFO_TILE(enum a3xx_tile_mode val)
  963. {
  964. return ((val) << A3XX_RB_COPY_DEST_INFO_TILE__SHIFT) & A3XX_RB_COPY_DEST_INFO_TILE__MASK;
  965. }
  966. #define A3XX_RB_COPY_DEST_INFO_FORMAT__MASK 0x000000fc
  967. #define A3XX_RB_COPY_DEST_INFO_FORMAT__SHIFT 2
  968. static inline uint32_t A3XX_RB_COPY_DEST_INFO_FORMAT(enum a3xx_color_fmt val)
  969. {
  970. return ((val) << A3XX_RB_COPY_DEST_INFO_FORMAT__SHIFT) & A3XX_RB_COPY_DEST_INFO_FORMAT__MASK;
  971. }
  972. #define A3XX_RB_COPY_DEST_INFO_SWAP__MASK 0x00000300
  973. #define A3XX_RB_COPY_DEST_INFO_SWAP__SHIFT 8
  974. static inline uint32_t A3XX_RB_COPY_DEST_INFO_SWAP(enum a3xx_color_swap val)
  975. {
  976. return ((val) << A3XX_RB_COPY_DEST_INFO_SWAP__SHIFT) & A3XX_RB_COPY_DEST_INFO_SWAP__MASK;
  977. }
  978. #define A3XX_RB_COPY_DEST_INFO_DITHER_MODE__MASK 0x00000c00
  979. #define A3XX_RB_COPY_DEST_INFO_DITHER_MODE__SHIFT 10
  980. static inline uint32_t A3XX_RB_COPY_DEST_INFO_DITHER_MODE(enum adreno_rb_dither_mode val)
  981. {
  982. return ((val) << A3XX_RB_COPY_DEST_INFO_DITHER_MODE__SHIFT) & A3XX_RB_COPY_DEST_INFO_DITHER_MODE__MASK;
  983. }
  984. #define A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__MASK 0x0003c000
  985. #define A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__SHIFT 14
  986. static inline uint32_t A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE(uint32_t val)
  987. {
  988. return ((val) << A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__SHIFT) & A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE__MASK;
  989. }
  990. #define A3XX_RB_COPY_DEST_INFO_ENDIAN__MASK 0x001c0000
  991. #define A3XX_RB_COPY_DEST_INFO_ENDIAN__SHIFT 18
  992. static inline uint32_t A3XX_RB_COPY_DEST_INFO_ENDIAN(enum adreno_rb_surface_endian val)
  993. {
  994. return ((val) << A3XX_RB_COPY_DEST_INFO_ENDIAN__SHIFT) & A3XX_RB_COPY_DEST_INFO_ENDIAN__MASK;
  995. }
  996. #define REG_A3XX_RB_DEPTH_CONTROL 0x00002100
  997. #define A3XX_RB_DEPTH_CONTROL_FRAG_WRITES_Z 0x00000001
  998. #define A3XX_RB_DEPTH_CONTROL_Z_ENABLE 0x00000002
  999. #define A3XX_RB_DEPTH_CONTROL_Z_WRITE_ENABLE 0x00000004
  1000. #define A3XX_RB_DEPTH_CONTROL_EARLY_Z_DISABLE 0x00000008
  1001. #define A3XX_RB_DEPTH_CONTROL_ZFUNC__MASK 0x00000070
  1002. #define A3XX_RB_DEPTH_CONTROL_ZFUNC__SHIFT 4
  1003. static inline uint32_t A3XX_RB_DEPTH_CONTROL_ZFUNC(enum adreno_compare_func val)
  1004. {
  1005. return ((val) << A3XX_RB_DEPTH_CONTROL_ZFUNC__SHIFT) & A3XX_RB_DEPTH_CONTROL_ZFUNC__MASK;
  1006. }
  1007. #define A3XX_RB_DEPTH_CONTROL_BF_ENABLE 0x00000080
  1008. #define A3XX_RB_DEPTH_CONTROL_Z_TEST_ENABLE 0x80000000
  1009. #define REG_A3XX_RB_DEPTH_CLEAR 0x00002101
  1010. #define REG_A3XX_RB_DEPTH_INFO 0x00002102
  1011. #define A3XX_RB_DEPTH_INFO_DEPTH_FORMAT__MASK 0x00000003
  1012. #define A3XX_RB_DEPTH_INFO_DEPTH_FORMAT__SHIFT 0
  1013. static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_FORMAT(enum adreno_rb_depth_format val)
  1014. {
  1015. return ((val) << A3XX_RB_DEPTH_INFO_DEPTH_FORMAT__SHIFT) & A3XX_RB_DEPTH_INFO_DEPTH_FORMAT__MASK;
  1016. }
  1017. #define A3XX_RB_DEPTH_INFO_DEPTH_BASE__MASK 0xfffff800
  1018. #define A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT 11
  1019. static inline uint32_t A3XX_RB_DEPTH_INFO_DEPTH_BASE(uint32_t val)
  1020. {
  1021. return ((val >> 12) << A3XX_RB_DEPTH_INFO_DEPTH_BASE__SHIFT) & A3XX_RB_DEPTH_INFO_DEPTH_BASE__MASK;
  1022. }
  1023. #define REG_A3XX_RB_DEPTH_PITCH 0x00002103
  1024. #define A3XX_RB_DEPTH_PITCH__MASK 0xffffffff
  1025. #define A3XX_RB_DEPTH_PITCH__SHIFT 0
  1026. static inline uint32_t A3XX_RB_DEPTH_PITCH(uint32_t val)
  1027. {
  1028. return ((val >> 3) << A3XX_RB_DEPTH_PITCH__SHIFT) & A3XX_RB_DEPTH_PITCH__MASK;
  1029. }
  1030. #define REG_A3XX_RB_STENCIL_CONTROL 0x00002104
  1031. #define A3XX_RB_STENCIL_CONTROL_STENCIL_ENABLE 0x00000001
  1032. #define A3XX_RB_STENCIL_CONTROL_STENCIL_ENABLE_BF 0x00000002
  1033. #define A3XX_RB_STENCIL_CONTROL_STENCIL_READ 0x00000004
  1034. #define A3XX_RB_STENCIL_CONTROL_FUNC__MASK 0x00000700
  1035. #define A3XX_RB_STENCIL_CONTROL_FUNC__SHIFT 8
  1036. static inline uint32_t A3XX_RB_STENCIL_CONTROL_FUNC(enum adreno_compare_func val)
  1037. {
  1038. return ((val) << A3XX_RB_STENCIL_CONTROL_FUNC__SHIFT) & A3XX_RB_STENCIL_CONTROL_FUNC__MASK;
  1039. }
  1040. #define A3XX_RB_STENCIL_CONTROL_FAIL__MASK 0x00003800
  1041. #define A3XX_RB_STENCIL_CONTROL_FAIL__SHIFT 11
  1042. static inline uint32_t A3XX_RB_STENCIL_CONTROL_FAIL(enum adreno_stencil_op val)
  1043. {
  1044. return ((val) << A3XX_RB_STENCIL_CONTROL_FAIL__SHIFT) & A3XX_RB_STENCIL_CONTROL_FAIL__MASK;
  1045. }
  1046. #define A3XX_RB_STENCIL_CONTROL_ZPASS__MASK 0x0001c000
  1047. #define A3XX_RB_STENCIL_CONTROL_ZPASS__SHIFT 14
  1048. static inline uint32_t A3XX_RB_STENCIL_CONTROL_ZPASS(enum adreno_stencil_op val)
  1049. {
  1050. return ((val) << A3XX_RB_STENCIL_CONTROL_ZPASS__SHIFT) & A3XX_RB_STENCIL_CONTROL_ZPASS__MASK;
  1051. }
  1052. #define A3XX_RB_STENCIL_CONTROL_ZFAIL__MASK 0x000e0000
  1053. #define A3XX_RB_STENCIL_CONTROL_ZFAIL__SHIFT 17
  1054. static inline uint32_t A3XX_RB_STENCIL_CONTROL_ZFAIL(enum adreno_stencil_op val)
  1055. {
  1056. return ((val) << A3XX_RB_STENCIL_CONTROL_ZFAIL__SHIFT) & A3XX_RB_STENCIL_CONTROL_ZFAIL__MASK;
  1057. }
  1058. #define A3XX_RB_STENCIL_CONTROL_FUNC_BF__MASK 0x00700000
  1059. #define A3XX_RB_STENCIL_CONTROL_FUNC_BF__SHIFT 20
  1060. static inline uint32_t A3XX_RB_STENCIL_CONTROL_FUNC_BF(enum adreno_compare_func val)
  1061. {
  1062. return ((val) << A3XX_RB_STENCIL_CONTROL_FUNC_BF__SHIFT) & A3XX_RB_STENCIL_CONTROL_FUNC_BF__MASK;
  1063. }
  1064. #define A3XX_RB_STENCIL_CONTROL_FAIL_BF__MASK 0x03800000
  1065. #define A3XX_RB_STENCIL_CONTROL_FAIL_BF__SHIFT 23
  1066. static inline uint32_t A3XX_RB_STENCIL_CONTROL_FAIL_BF(enum adreno_stencil_op val)
  1067. {
  1068. return ((val) << A3XX_RB_STENCIL_CONTROL_FAIL_BF__SHIFT) & A3XX_RB_STENCIL_CONTROL_FAIL_BF__MASK;
  1069. }
  1070. #define A3XX_RB_STENCIL_CONTROL_ZPASS_BF__MASK 0x1c000000
  1071. #define A3XX_RB_STENCIL_CONTROL_ZPASS_BF__SHIFT 26
  1072. static inline uint32_t A3XX_RB_STENCIL_CONTROL_ZPASS_BF(enum adreno_stencil_op val)
  1073. {
  1074. return ((val) << A3XX_RB_STENCIL_CONTROL_ZPASS_BF__SHIFT) & A3XX_RB_STENCIL_CONTROL_ZPASS_BF__MASK;
  1075. }
  1076. #define A3XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK 0xe0000000
  1077. #define A3XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT 29
  1078. static inline uint32_t A3XX_RB_STENCIL_CONTROL_ZFAIL_BF(enum adreno_stencil_op val)
  1079. {
  1080. return ((val) << A3XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT) & A3XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK;
  1081. }
  1082. #define REG_A3XX_RB_STENCIL_CLEAR 0x00002105
  1083. #define REG_A3XX_RB_STENCIL_INFO 0x00002106
  1084. #define A3XX_RB_STENCIL_INFO_STENCIL_BASE__MASK 0xfffff800
  1085. #define A3XX_RB_STENCIL_INFO_STENCIL_BASE__SHIFT 11
  1086. static inline uint32_t A3XX_RB_STENCIL_INFO_STENCIL_BASE(uint32_t val)
  1087. {
  1088. return ((val >> 12) << A3XX_RB_STENCIL_INFO_STENCIL_BASE__SHIFT) & A3XX_RB_STENCIL_INFO_STENCIL_BASE__MASK;
  1089. }
  1090. #define REG_A3XX_RB_STENCIL_PITCH 0x00002107
  1091. #define A3XX_RB_STENCIL_PITCH__MASK 0xffffffff
  1092. #define A3XX_RB_STENCIL_PITCH__SHIFT 0
  1093. static inline uint32_t A3XX_RB_STENCIL_PITCH(uint32_t val)
  1094. {
  1095. return ((val >> 3) << A3XX_RB_STENCIL_PITCH__SHIFT) & A3XX_RB_STENCIL_PITCH__MASK;
  1096. }
  1097. #define REG_A3XX_RB_STENCILREFMASK 0x00002108
  1098. #define A3XX_RB_STENCILREFMASK_STENCILREF__MASK 0x000000ff
  1099. #define A3XX_RB_STENCILREFMASK_STENCILREF__SHIFT 0
  1100. static inline uint32_t A3XX_RB_STENCILREFMASK_STENCILREF(uint32_t val)
  1101. {
  1102. return ((val) << A3XX_RB_STENCILREFMASK_STENCILREF__SHIFT) & A3XX_RB_STENCILREFMASK_STENCILREF__MASK;
  1103. }
  1104. #define A3XX_RB_STENCILREFMASK_STENCILMASK__MASK 0x0000ff00
  1105. #define A3XX_RB_STENCILREFMASK_STENCILMASK__SHIFT 8
  1106. static inline uint32_t A3XX_RB_STENCILREFMASK_STENCILMASK(uint32_t val)
  1107. {
  1108. return ((val) << A3XX_RB_STENCILREFMASK_STENCILMASK__SHIFT) & A3XX_RB_STENCILREFMASK_STENCILMASK__MASK;
  1109. }
  1110. #define A3XX_RB_STENCILREFMASK_STENCILWRITEMASK__MASK 0x00ff0000
  1111. #define A3XX_RB_STENCILREFMASK_STENCILWRITEMASK__SHIFT 16
  1112. static inline uint32_t A3XX_RB_STENCILREFMASK_STENCILWRITEMASK(uint32_t val)
  1113. {
  1114. return ((val) << A3XX_RB_STENCILREFMASK_STENCILWRITEMASK__SHIFT) & A3XX_RB_STENCILREFMASK_STENCILWRITEMASK__MASK;
  1115. }
  1116. #define REG_A3XX_RB_STENCILREFMASK_BF 0x00002109
  1117. #define A3XX_RB_STENCILREFMASK_BF_STENCILREF__MASK 0x000000ff
  1118. #define A3XX_RB_STENCILREFMASK_BF_STENCILREF__SHIFT 0
  1119. static inline uint32_t A3XX_RB_STENCILREFMASK_BF_STENCILREF(uint32_t val)
  1120. {
  1121. return ((val) << A3XX_RB_STENCILREFMASK_BF_STENCILREF__SHIFT) & A3XX_RB_STENCILREFMASK_BF_STENCILREF__MASK;
  1122. }
  1123. #define A3XX_RB_STENCILREFMASK_BF_STENCILMASK__MASK 0x0000ff00
  1124. #define A3XX_RB_STENCILREFMASK_BF_STENCILMASK__SHIFT 8
  1125. static inline uint32_t A3XX_RB_STENCILREFMASK_BF_STENCILMASK(uint32_t val)
  1126. {
  1127. return ((val) << A3XX_RB_STENCILREFMASK_BF_STENCILMASK__SHIFT) & A3XX_RB_STENCILREFMASK_BF_STENCILMASK__MASK;
  1128. }
  1129. #define A3XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__MASK 0x00ff0000
  1130. #define A3XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__SHIFT 16
  1131. static inline uint32_t A3XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK(uint32_t val)
  1132. {
  1133. return ((val) << A3XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__SHIFT) & A3XX_RB_STENCILREFMASK_BF_STENCILWRITEMASK__MASK;
  1134. }
  1135. #define REG_A3XX_RB_LRZ_VSC_CONTROL 0x0000210c
  1136. #define A3XX_RB_LRZ_VSC_CONTROL_BINNING_ENABLE 0x00000002
  1137. #define REG_A3XX_RB_WINDOW_OFFSET 0x0000210e
  1138. #define A3XX_RB_WINDOW_OFFSET_X__MASK 0x0000ffff
  1139. #define A3XX_RB_WINDOW_OFFSET_X__SHIFT 0
  1140. static inline uint32_t A3XX_RB_WINDOW_OFFSET_X(uint32_t val)
  1141. {
  1142. return ((val) << A3XX_RB_WINDOW_OFFSET_X__SHIFT) & A3XX_RB_WINDOW_OFFSET_X__MASK;
  1143. }
  1144. #define A3XX_RB_WINDOW_OFFSET_Y__MASK 0xffff0000
  1145. #define A3XX_RB_WINDOW_OFFSET_Y__SHIFT 16
  1146. static inline uint32_t A3XX_RB_WINDOW_OFFSET_Y(uint32_t val)
  1147. {
  1148. return ((val) << A3XX_RB_WINDOW_OFFSET_Y__SHIFT) & A3XX_RB_WINDOW_OFFSET_Y__MASK;
  1149. }
  1150. #define REG_A3XX_RB_SAMPLE_COUNT_CONTROL 0x00002110
  1151. #define A3XX_RB_SAMPLE_COUNT_CONTROL_RESET 0x00000001
  1152. #define A3XX_RB_SAMPLE_COUNT_CONTROL_COPY 0x00000002
  1153. #define REG_A3XX_RB_SAMPLE_COUNT_ADDR 0x00002111
  1154. #define REG_A3XX_RB_Z_CLAMP_MIN 0x00002114
  1155. #define REG_A3XX_RB_Z_CLAMP_MAX 0x00002115
  1156. #define REG_A3XX_VGT_BIN_BASE 0x000021e1
  1157. #define REG_A3XX_VGT_BIN_SIZE 0x000021e2
  1158. #define REG_A3XX_PC_VSTREAM_CONTROL 0x000021e4
  1159. #define A3XX_PC_VSTREAM_CONTROL_SIZE__MASK 0x003f0000
  1160. #define A3XX_PC_VSTREAM_CONTROL_SIZE__SHIFT 16
  1161. static inline uint32_t A3XX_PC_VSTREAM_CONTROL_SIZE(uint32_t val)
  1162. {
  1163. return ((val) << A3XX_PC_VSTREAM_CONTROL_SIZE__SHIFT) & A3XX_PC_VSTREAM_CONTROL_SIZE__MASK;
  1164. }
  1165. #define A3XX_PC_VSTREAM_CONTROL_N__MASK 0x07c00000
  1166. #define A3XX_PC_VSTREAM_CONTROL_N__SHIFT 22
  1167. static inline uint32_t A3XX_PC_VSTREAM_CONTROL_N(uint32_t val)
  1168. {
  1169. return ((val) << A3XX_PC_VSTREAM_CONTROL_N__SHIFT) & A3XX_PC_VSTREAM_CONTROL_N__MASK;
  1170. }
  1171. #define REG_A3XX_PC_VERTEX_REUSE_BLOCK_CNTL 0x000021ea
  1172. #define REG_A3XX_PC_PRIM_VTX_CNTL 0x000021ec
  1173. #define A3XX_PC_PRIM_VTX_CNTL_STRIDE_IN_VPC__MASK 0x0000001f
  1174. #define A3XX_PC_PRIM_VTX_CNTL_STRIDE_IN_VPC__SHIFT 0
  1175. static inline uint32_t A3XX_PC_PRIM_VTX_CNTL_STRIDE_IN_VPC(uint32_t val)
  1176. {
  1177. return ((val) << A3XX_PC_PRIM_VTX_CNTL_STRIDE_IN_VPC__SHIFT) & A3XX_PC_PRIM_VTX_CNTL_STRIDE_IN_VPC__MASK;
  1178. }
  1179. #define A3XX_PC_PRIM_VTX_CNTL_POLYMODE_FRONT_PTYPE__MASK 0x000000e0
  1180. #define A3XX_PC_PRIM_VTX_CNTL_POLYMODE_FRONT_PTYPE__SHIFT 5
  1181. static inline uint32_t A3XX_PC_PRIM_VTX_CNTL_POLYMODE_FRONT_PTYPE(enum adreno_pa_su_sc_draw val)
  1182. {
  1183. return ((val) << A3XX_PC_PRIM_VTX_CNTL_POLYMODE_FRONT_PTYPE__SHIFT) & A3XX_PC_PRIM_VTX_CNTL_POLYMODE_FRONT_PTYPE__MASK;
  1184. }
  1185. #define A3XX_PC_PRIM_VTX_CNTL_POLYMODE_BACK_PTYPE__MASK 0x00000700
  1186. #define A3XX_PC_PRIM_VTX_CNTL_POLYMODE_BACK_PTYPE__SHIFT 8
  1187. static inline uint32_t A3XX_PC_PRIM_VTX_CNTL_POLYMODE_BACK_PTYPE(enum adreno_pa_su_sc_draw val)
  1188. {
  1189. return ((val) << A3XX_PC_PRIM_VTX_CNTL_POLYMODE_BACK_PTYPE__SHIFT) & A3XX_PC_PRIM_VTX_CNTL_POLYMODE_BACK_PTYPE__MASK;
  1190. }
  1191. #define A3XX_PC_PRIM_VTX_CNTL_POLYMODE_ENABLE 0x00001000
  1192. #define A3XX_PC_PRIM_VTX_CNTL_PRIMITIVE_RESTART 0x00100000
  1193. #define A3XX_PC_PRIM_VTX_CNTL_PROVOKING_VTX_LAST 0x02000000
  1194. #define A3XX_PC_PRIM_VTX_CNTL_PSIZE 0x04000000
  1195. #define REG_A3XX_PC_RESTART_INDEX 0x000021ed
  1196. #define REG_A3XX_HLSQ_CONTROL_0_REG 0x00002200
  1197. #define A3XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__MASK 0x00000010
  1198. #define A3XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__SHIFT 4
  1199. static inline uint32_t A3XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE(enum a3xx_threadsize val)
  1200. {
  1201. return ((val) << A3XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__SHIFT) & A3XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__MASK;
  1202. }
  1203. #define A3XX_HLSQ_CONTROL_0_REG_FSSUPERTHREADENABLE 0x00000040
  1204. #define A3XX_HLSQ_CONTROL_0_REG_SPSHADERRESTART 0x00000200
  1205. #define A3XX_HLSQ_CONTROL_0_REG_RESERVED2 0x00000400
  1206. #define A3XX_HLSQ_CONTROL_0_REG_CHUNKDISABLE 0x04000000
  1207. #define A3XX_HLSQ_CONTROL_0_REG_CONSTMODE__MASK 0x08000000
  1208. #define A3XX_HLSQ_CONTROL_0_REG_CONSTMODE__SHIFT 27
  1209. static inline uint32_t A3XX_HLSQ_CONTROL_0_REG_CONSTMODE(uint32_t val)
  1210. {
  1211. return ((val) << A3XX_HLSQ_CONTROL_0_REG_CONSTMODE__SHIFT) & A3XX_HLSQ_CONTROL_0_REG_CONSTMODE__MASK;
  1212. }
  1213. #define A3XX_HLSQ_CONTROL_0_REG_LAZYUPDATEDISABLE 0x10000000
  1214. #define A3XX_HLSQ_CONTROL_0_REG_SPCONSTFULLUPDATE 0x20000000
  1215. #define A3XX_HLSQ_CONTROL_0_REG_TPFULLUPDATE 0x40000000
  1216. #define A3XX_HLSQ_CONTROL_0_REG_SINGLECONTEXT 0x80000000
  1217. #define REG_A3XX_HLSQ_CONTROL_1_REG 0x00002201
  1218. #define A3XX_HLSQ_CONTROL_1_REG_VSTHREADSIZE__MASK 0x00000040
  1219. #define A3XX_HLSQ_CONTROL_1_REG_VSTHREADSIZE__SHIFT 6
  1220. static inline uint32_t A3XX_HLSQ_CONTROL_1_REG_VSTHREADSIZE(enum a3xx_threadsize val)
  1221. {
  1222. return ((val) << A3XX_HLSQ_CONTROL_1_REG_VSTHREADSIZE__SHIFT) & A3XX_HLSQ_CONTROL_1_REG_VSTHREADSIZE__MASK;
  1223. }
  1224. #define A3XX_HLSQ_CONTROL_1_REG_VSSUPERTHREADENABLE 0x00000100
  1225. #define A3XX_HLSQ_CONTROL_1_REG_RESERVED1 0x00000200
  1226. #define A3XX_HLSQ_CONTROL_1_REG_ZWCOORD 0x02000000
  1227. #define REG_A3XX_HLSQ_CONTROL_2_REG 0x00002202
  1228. #define A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD__MASK 0xfc000000
  1229. #define A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD__SHIFT 26
  1230. static inline uint32_t A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD(uint32_t val)
  1231. {
  1232. return ((val) << A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD__SHIFT) & A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD__MASK;
  1233. }
  1234. #define REG_A3XX_HLSQ_CONTROL_3_REG 0x00002203
  1235. #define A3XX_HLSQ_CONTROL_3_REG_REGID__MASK 0x000000ff
  1236. #define A3XX_HLSQ_CONTROL_3_REG_REGID__SHIFT 0
  1237. static inline uint32_t A3XX_HLSQ_CONTROL_3_REG_REGID(uint32_t val)
  1238. {
  1239. return ((val) << A3XX_HLSQ_CONTROL_3_REG_REGID__SHIFT) & A3XX_HLSQ_CONTROL_3_REG_REGID__MASK;
  1240. }
  1241. #define REG_A3XX_HLSQ_VS_CONTROL_REG 0x00002204
  1242. #define A3XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH__MASK 0x00000fff
  1243. #define A3XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH__SHIFT 0
  1244. static inline uint32_t A3XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH(uint32_t val)
  1245. {
  1246. return ((val) << A3XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH__SHIFT) & A3XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH__MASK;
  1247. }
  1248. #define A3XX_HLSQ_VS_CONTROL_REG_CONSTSTARTOFFSET__MASK 0x00fff000
  1249. #define A3XX_HLSQ_VS_CONTROL_REG_CONSTSTARTOFFSET__SHIFT 12
  1250. static inline uint32_t A3XX_HLSQ_VS_CONTROL_REG_CONSTSTARTOFFSET(uint32_t val)
  1251. {
  1252. return ((val) << A3XX_HLSQ_VS_CONTROL_REG_CONSTSTARTOFFSET__SHIFT) & A3XX_HLSQ_VS_CONTROL_REG_CONSTSTARTOFFSET__MASK;
  1253. }
  1254. #define A3XX_HLSQ_VS_CONTROL_REG_INSTRLENGTH__MASK 0xff000000
  1255. #define A3XX_HLSQ_VS_CONTROL_REG_INSTRLENGTH__SHIFT 24
  1256. static inline uint32_t A3XX_HLSQ_VS_CONTROL_REG_INSTRLENGTH(uint32_t val)
  1257. {
  1258. return ((val) << A3XX_HLSQ_VS_CONTROL_REG_INSTRLENGTH__SHIFT) & A3XX_HLSQ_VS_CONTROL_REG_INSTRLENGTH__MASK;
  1259. }
  1260. #define REG_A3XX_HLSQ_FS_CONTROL_REG 0x00002205
  1261. #define A3XX_HLSQ_FS_CONTROL_REG_CONSTLENGTH__MASK 0x00000fff
  1262. #define A3XX_HLSQ_FS_CONTROL_REG_CONSTLENGTH__SHIFT 0
  1263. static inline uint32_t A3XX_HLSQ_FS_CONTROL_REG_CONSTLENGTH(uint32_t val)
  1264. {
  1265. return ((val) << A3XX_HLSQ_FS_CONTROL_REG_CONSTLENGTH__SHIFT) & A3XX_HLSQ_FS_CONTROL_REG_CONSTLENGTH__MASK;
  1266. }
  1267. #define A3XX_HLSQ_FS_CONTROL_REG_CONSTSTARTOFFSET__MASK 0x00fff000
  1268. #define A3XX_HLSQ_FS_CONTROL_REG_CONSTSTARTOFFSET__SHIFT 12
  1269. static inline uint32_t A3XX_HLSQ_FS_CONTROL_REG_CONSTSTARTOFFSET(uint32_t val)
  1270. {
  1271. return ((val) << A3XX_HLSQ_FS_CONTROL_REG_CONSTSTARTOFFSET__SHIFT) & A3XX_HLSQ_FS_CONTROL_REG_CONSTSTARTOFFSET__MASK;
  1272. }
  1273. #define A3XX_HLSQ_FS_CONTROL_REG_INSTRLENGTH__MASK 0xff000000
  1274. #define A3XX_HLSQ_FS_CONTROL_REG_INSTRLENGTH__SHIFT 24
  1275. static inline uint32_t A3XX_HLSQ_FS_CONTROL_REG_INSTRLENGTH(uint32_t val)
  1276. {
  1277. return ((val) << A3XX_HLSQ_FS_CONTROL_REG_INSTRLENGTH__SHIFT) & A3XX_HLSQ_FS_CONTROL_REG_INSTRLENGTH__MASK;
  1278. }
  1279. #define REG_A3XX_HLSQ_CONST_VSPRESV_RANGE_REG 0x00002206
  1280. #define A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_STARTENTRY__MASK 0x0000ffff
  1281. #define A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_STARTENTRY__SHIFT 0
  1282. static inline uint32_t A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_STARTENTRY(uint32_t val)
  1283. {
  1284. return ((val) << A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_STARTENTRY__SHIFT) & A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_STARTENTRY__MASK;
  1285. }
  1286. #define A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_ENDENTRY__MASK 0xffff0000
  1287. #define A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_ENDENTRY__SHIFT 16
  1288. static inline uint32_t A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_ENDENTRY(uint32_t val)
  1289. {
  1290. return ((val) << A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_ENDENTRY__SHIFT) & A3XX_HLSQ_CONST_VSPRESV_RANGE_REG_ENDENTRY__MASK;
  1291. }
  1292. #define REG_A3XX_HLSQ_CONST_FSPRESV_RANGE_REG 0x00002207
  1293. #define A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_STARTENTRY__MASK 0x0000ffff
  1294. #define A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_STARTENTRY__SHIFT 0
  1295. static inline uint32_t A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_STARTENTRY(uint32_t val)
  1296. {
  1297. return ((val) << A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_STARTENTRY__SHIFT) & A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_STARTENTRY__MASK;
  1298. }
  1299. #define A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY__MASK 0xffff0000
  1300. #define A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY__SHIFT 16
  1301. static inline uint32_t A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY(uint32_t val)
  1302. {
  1303. return ((val) << A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY__SHIFT) & A3XX_HLSQ_CONST_FSPRESV_RANGE_REG_ENDENTRY__MASK;
  1304. }
  1305. #define REG_A3XX_HLSQ_CL_NDRANGE_0_REG 0x0000220a
  1306. #define A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__MASK 0x00000003
  1307. #define A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__SHIFT 0
  1308. static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM(uint32_t val)
  1309. {
  1310. return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_WORKDIM__MASK;
  1311. }
  1312. #define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__MASK 0x00000ffc
  1313. #define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__SHIFT 2
  1314. static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0(uint32_t val)
  1315. {
  1316. return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE0__MASK;
  1317. }
  1318. #define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__MASK 0x003ff000
  1319. #define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__SHIFT 12
  1320. static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1(uint32_t val)
  1321. {
  1322. return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE1__MASK;
  1323. }
  1324. #define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__MASK 0xffc00000
  1325. #define A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__SHIFT 22
  1326. static inline uint32_t A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2(uint32_t val)
  1327. {
  1328. return ((val) << A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__SHIFT) & A3XX_HLSQ_CL_NDRANGE_0_REG_LOCALSIZE2__MASK;
  1329. }
  1330. static inline uint32_t REG_A3XX_HLSQ_CL_GLOBAL_WORK(uint32_t i0) { return 0x0000220b + 0x2*i0; }
  1331. static inline uint32_t REG_A3XX_HLSQ_CL_GLOBAL_WORK_SIZE(uint32_t i0) { return 0x0000220b + 0x2*i0; }
  1332. static inline uint32_t REG_A3XX_HLSQ_CL_GLOBAL_WORK_OFFSET(uint32_t i0) { return 0x0000220c + 0x2*i0; }
  1333. #define REG_A3XX_HLSQ_CL_CONTROL_0_REG 0x00002211
  1334. #define REG_A3XX_HLSQ_CL_CONTROL_1_REG 0x00002212
  1335. #define REG_A3XX_HLSQ_CL_KERNEL_CONST_REG 0x00002214
  1336. static inline uint32_t REG_A3XX_HLSQ_CL_KERNEL_GROUP(uint32_t i0) { return 0x00002215 + 0x1*i0; }
  1337. static inline uint32_t REG_A3XX_HLSQ_CL_KERNEL_GROUP_RATIO(uint32_t i0) { return 0x00002215 + 0x1*i0; }
  1338. #define REG_A3XX_HLSQ_CL_KERNEL_GROUP_Y_REG 0x00002216
  1339. #define REG_A3XX_HLSQ_CL_KERNEL_GROUP_Z_REG 0x00002217
  1340. #define REG_A3XX_HLSQ_CL_WG_OFFSET_REG 0x0000221a
  1341. #define REG_A3XX_VFD_CONTROL_0 0x00002240
  1342. #define A3XX_VFD_CONTROL_0_TOTALATTRTOVS__MASK 0x0003ffff
  1343. #define A3XX_VFD_CONTROL_0_TOTALATTRTOVS__SHIFT 0
  1344. static inline uint32_t A3XX_VFD_CONTROL_0_TOTALATTRTOVS(uint32_t val)
  1345. {
  1346. return ((val) << A3XX_VFD_CONTROL_0_TOTALATTRTOVS__SHIFT) & A3XX_VFD_CONTROL_0_TOTALATTRTOVS__MASK;
  1347. }
  1348. #define A3XX_VFD_CONTROL_0_PACKETSIZE__MASK 0x003c0000
  1349. #define A3XX_VFD_CONTROL_0_PACKETSIZE__SHIFT 18
  1350. static inline uint32_t A3XX_VFD_CONTROL_0_PACKETSIZE(uint32_t val)
  1351. {
  1352. return ((val) << A3XX_VFD_CONTROL_0_PACKETSIZE__SHIFT) & A3XX_VFD_CONTROL_0_PACKETSIZE__MASK;
  1353. }
  1354. #define A3XX_VFD_CONTROL_0_STRMDECINSTRCNT__MASK 0x07c00000
  1355. #define A3XX_VFD_CONTROL_0_STRMDECINSTRCNT__SHIFT 22
  1356. static inline uint32_t A3XX_VFD_CONTROL_0_STRMDECINSTRCNT(uint32_t val)
  1357. {
  1358. return ((val) << A3XX_VFD_CONTROL_0_STRMDECINSTRCNT__SHIFT) & A3XX_VFD_CONTROL_0_STRMDECINSTRCNT__MASK;
  1359. }
  1360. #define A3XX_VFD_CONTROL_0_STRMFETCHINSTRCNT__MASK 0xf8000000
  1361. #define A3XX_VFD_CONTROL_0_STRMFETCHINSTRCNT__SHIFT 27
  1362. static inline uint32_t A3XX_VFD_CONTROL_0_STRMFETCHINSTRCNT(uint32_t val)
  1363. {
  1364. return ((val) << A3XX_VFD_CONTROL_0_STRMFETCHINSTRCNT__SHIFT) & A3XX_VFD_CONTROL_0_STRMFETCHINSTRCNT__MASK;
  1365. }
  1366. #define REG_A3XX_VFD_CONTROL_1 0x00002241
  1367. #define A3XX_VFD_CONTROL_1_MAXSTORAGE__MASK 0x0000ffff
  1368. #define A3XX_VFD_CONTROL_1_MAXSTORAGE__SHIFT 0
  1369. static inline uint32_t A3XX_VFD_CONTROL_1_MAXSTORAGE(uint32_t val)
  1370. {
  1371. return ((val) << A3XX_VFD_CONTROL_1_MAXSTORAGE__SHIFT) & A3XX_VFD_CONTROL_1_MAXSTORAGE__MASK;
  1372. }
  1373. #define A3XX_VFD_CONTROL_1_REGID4VTX__MASK 0x00ff0000
  1374. #define A3XX_VFD_CONTROL_1_REGID4VTX__SHIFT 16
  1375. static inline uint32_t A3XX_VFD_CONTROL_1_REGID4VTX(uint32_t val)
  1376. {
  1377. return ((val) << A3XX_VFD_CONTROL_1_REGID4VTX__SHIFT) & A3XX_VFD_CONTROL_1_REGID4VTX__MASK;
  1378. }
  1379. #define A3XX_VFD_CONTROL_1_REGID4INST__MASK 0xff000000
  1380. #define A3XX_VFD_CONTROL_1_REGID4INST__SHIFT 24
  1381. static inline uint32_t A3XX_VFD_CONTROL_1_REGID4INST(uint32_t val)
  1382. {
  1383. return ((val) << A3XX_VFD_CONTROL_1_REGID4INST__SHIFT) & A3XX_VFD_CONTROL_1_REGID4INST__MASK;
  1384. }
  1385. #define REG_A3XX_VFD_INDEX_MIN 0x00002242
  1386. #define REG_A3XX_VFD_INDEX_MAX 0x00002243
  1387. #define REG_A3XX_VFD_INSTANCEID_OFFSET 0x00002244
  1388. #define REG_A3XX_VFD_INDEX_OFFSET 0x00002245
  1389. #define REG_A3XX_VFD_INDEX_OFFSET 0x00002245
  1390. static inline uint32_t REG_A3XX_VFD_FETCH(uint32_t i0) { return 0x00002246 + 0x2*i0; }
  1391. static inline uint32_t REG_A3XX_VFD_FETCH_INSTR_0(uint32_t i0) { return 0x00002246 + 0x2*i0; }
  1392. #define A3XX_VFD_FETCH_INSTR_0_FETCHSIZE__MASK 0x0000007f
  1393. #define A3XX_VFD_FETCH_INSTR_0_FETCHSIZE__SHIFT 0
  1394. static inline uint32_t A3XX_VFD_FETCH_INSTR_0_FETCHSIZE(uint32_t val)
  1395. {
  1396. return ((val) << A3XX_VFD_FETCH_INSTR_0_FETCHSIZE__SHIFT) & A3XX_VFD_FETCH_INSTR_0_FETCHSIZE__MASK;
  1397. }
  1398. #define A3XX_VFD_FETCH_INSTR_0_BUFSTRIDE__MASK 0x0000ff80
  1399. #define A3XX_VFD_FETCH_INSTR_0_BUFSTRIDE__SHIFT 7
  1400. static inline uint32_t A3XX_VFD_FETCH_INSTR_0_BUFSTRIDE(uint32_t val)
  1401. {
  1402. return ((val) << A3XX_VFD_FETCH_INSTR_0_BUFSTRIDE__SHIFT) & A3XX_VFD_FETCH_INSTR_0_BUFSTRIDE__MASK;
  1403. }
  1404. #define A3XX_VFD_FETCH_INSTR_0_INSTANCED 0x00010000
  1405. #define A3XX_VFD_FETCH_INSTR_0_SWITCHNEXT 0x00020000
  1406. #define A3XX_VFD_FETCH_INSTR_0_INDEXCODE__MASK 0x00fc0000
  1407. #define A3XX_VFD_FETCH_INSTR_0_INDEXCODE__SHIFT 18
  1408. static inline uint32_t A3XX_VFD_FETCH_INSTR_0_INDEXCODE(uint32_t val)
  1409. {
  1410. return ((val) << A3XX_VFD_FETCH_INSTR_0_INDEXCODE__SHIFT) & A3XX_VFD_FETCH_INSTR_0_INDEXCODE__MASK;
  1411. }
  1412. #define A3XX_VFD_FETCH_INSTR_0_STEPRATE__MASK 0xff000000
  1413. #define A3XX_VFD_FETCH_INSTR_0_STEPRATE__SHIFT 24
  1414. static inline uint32_t A3XX_VFD_FETCH_INSTR_0_STEPRATE(uint32_t val)
  1415. {
  1416. return ((val) << A3XX_VFD_FETCH_INSTR_0_STEPRATE__SHIFT) & A3XX_VFD_FETCH_INSTR_0_STEPRATE__MASK;
  1417. }
  1418. static inline uint32_t REG_A3XX_VFD_FETCH_INSTR_1(uint32_t i0) { return 0x00002247 + 0x2*i0; }
  1419. static inline uint32_t REG_A3XX_VFD_DECODE(uint32_t i0) { return 0x00002266 + 0x1*i0; }
  1420. static inline uint32_t REG_A3XX_VFD_DECODE_INSTR(uint32_t i0) { return 0x00002266 + 0x1*i0; }
  1421. #define A3XX_VFD_DECODE_INSTR_WRITEMASK__MASK 0x0000000f
  1422. #define A3XX_VFD_DECODE_INSTR_WRITEMASK__SHIFT 0
  1423. static inline uint32_t A3XX_VFD_DECODE_INSTR_WRITEMASK(uint32_t val)
  1424. {
  1425. return ((val) << A3XX_VFD_DECODE_INSTR_WRITEMASK__SHIFT) & A3XX_VFD_DECODE_INSTR_WRITEMASK__MASK;
  1426. }
  1427. #define A3XX_VFD_DECODE_INSTR_CONSTFILL 0x00000010
  1428. #define A3XX_VFD_DECODE_INSTR_FORMAT__MASK 0x00000fc0
  1429. #define A3XX_VFD_DECODE_INSTR_FORMAT__SHIFT 6
  1430. static inline uint32_t A3XX_VFD_DECODE_INSTR_FORMAT(enum a3xx_vtx_fmt val)
  1431. {
  1432. return ((val) << A3XX_VFD_DECODE_INSTR_FORMAT__SHIFT) & A3XX_VFD_DECODE_INSTR_FORMAT__MASK;
  1433. }
  1434. #define A3XX_VFD_DECODE_INSTR_REGID__MASK 0x000ff000
  1435. #define A3XX_VFD_DECODE_INSTR_REGID__SHIFT 12
  1436. static inline uint32_t A3XX_VFD_DECODE_INSTR_REGID(uint32_t val)
  1437. {
  1438. return ((val) << A3XX_VFD_DECODE_INSTR_REGID__SHIFT) & A3XX_VFD_DECODE_INSTR_REGID__MASK;
  1439. }
  1440. #define A3XX_VFD_DECODE_INSTR_INT 0x00100000
  1441. #define A3XX_VFD_DECODE_INSTR_SWAP__MASK 0x00c00000
  1442. #define A3XX_VFD_DECODE_INSTR_SWAP__SHIFT 22
  1443. static inline uint32_t A3XX_VFD_DECODE_INSTR_SWAP(enum a3xx_color_swap val)
  1444. {
  1445. return ((val) << A3XX_VFD_DECODE_INSTR_SWAP__SHIFT) & A3XX_VFD_DECODE_INSTR_SWAP__MASK;
  1446. }
  1447. #define A3XX_VFD_DECODE_INSTR_SHIFTCNT__MASK 0x1f000000
  1448. #define A3XX_VFD_DECODE_INSTR_SHIFTCNT__SHIFT 24
  1449. static inline uint32_t A3XX_VFD_DECODE_INSTR_SHIFTCNT(uint32_t val)
  1450. {
  1451. return ((val) << A3XX_VFD_DECODE_INSTR_SHIFTCNT__SHIFT) & A3XX_VFD_DECODE_INSTR_SHIFTCNT__MASK;
  1452. }
  1453. #define A3XX_VFD_DECODE_INSTR_LASTCOMPVALID 0x20000000
  1454. #define A3XX_VFD_DECODE_INSTR_SWITCHNEXT 0x40000000
  1455. #define REG_A3XX_VFD_VS_THREADING_THRESHOLD 0x0000227e
  1456. #define A3XX_VFD_VS_THREADING_THRESHOLD_REGID_THRESHOLD__MASK 0x0000000f
  1457. #define A3XX_VFD_VS_THREADING_THRESHOLD_REGID_THRESHOLD__SHIFT 0
  1458. static inline uint32_t A3XX_VFD_VS_THREADING_THRESHOLD_REGID_THRESHOLD(uint32_t val)
  1459. {
  1460. return ((val) << A3XX_VFD_VS_THREADING_THRESHOLD_REGID_THRESHOLD__SHIFT) & A3XX_VFD_VS_THREADING_THRESHOLD_REGID_THRESHOLD__MASK;
  1461. }
  1462. #define A3XX_VFD_VS_THREADING_THRESHOLD_REGID_VTXCNT__MASK 0x0000ff00
  1463. #define A3XX_VFD_VS_THREADING_THRESHOLD_REGID_VTXCNT__SHIFT 8
  1464. static inline uint32_t A3XX_VFD_VS_THREADING_THRESHOLD_REGID_VTXCNT(uint32_t val)
  1465. {
  1466. return ((val) << A3XX_VFD_VS_THREADING_THRESHOLD_REGID_VTXCNT__SHIFT) & A3XX_VFD_VS_THREADING_THRESHOLD_REGID_VTXCNT__MASK;
  1467. }
  1468. #define REG_A3XX_VPC_ATTR 0x00002280
  1469. #define A3XX_VPC_ATTR_TOTALATTR__MASK 0x000001ff
  1470. #define A3XX_VPC_ATTR_TOTALATTR__SHIFT 0
  1471. static inline uint32_t A3XX_VPC_ATTR_TOTALATTR(uint32_t val)
  1472. {
  1473. return ((val) << A3XX_VPC_ATTR_TOTALATTR__SHIFT) & A3XX_VPC_ATTR_TOTALATTR__MASK;
  1474. }
  1475. #define A3XX_VPC_ATTR_PSIZE 0x00000200
  1476. #define A3XX_VPC_ATTR_THRDASSIGN__MASK 0x0ffff000
  1477. #define A3XX_VPC_ATTR_THRDASSIGN__SHIFT 12
  1478. static inline uint32_t A3XX_VPC_ATTR_THRDASSIGN(uint32_t val)
  1479. {
  1480. return ((val) << A3XX_VPC_ATTR_THRDASSIGN__SHIFT) & A3XX_VPC_ATTR_THRDASSIGN__MASK;
  1481. }
  1482. #define A3XX_VPC_ATTR_LMSIZE__MASK 0xf0000000
  1483. #define A3XX_VPC_ATTR_LMSIZE__SHIFT 28
  1484. static inline uint32_t A3XX_VPC_ATTR_LMSIZE(uint32_t val)
  1485. {
  1486. return ((val) << A3XX_VPC_ATTR_LMSIZE__SHIFT) & A3XX_VPC_ATTR_LMSIZE__MASK;
  1487. }
  1488. #define REG_A3XX_VPC_PACK 0x00002281
  1489. #define A3XX_VPC_PACK_NUMFPNONPOSVAR__MASK 0x0000ff00
  1490. #define A3XX_VPC_PACK_NUMFPNONPOSVAR__SHIFT 8
  1491. static inline uint32_t A3XX_VPC_PACK_NUMFPNONPOSVAR(uint32_t val)
  1492. {
  1493. return ((val) << A3XX_VPC_PACK_NUMFPNONPOSVAR__SHIFT) & A3XX_VPC_PACK_NUMFPNONPOSVAR__MASK;
  1494. }
  1495. #define A3XX_VPC_PACK_NUMNONPOSVSVAR__MASK 0x00ff0000
  1496. #define A3XX_VPC_PACK_NUMNONPOSVSVAR__SHIFT 16
  1497. static inline uint32_t A3XX_VPC_PACK_NUMNONPOSVSVAR(uint32_t val)
  1498. {
  1499. return ((val) << A3XX_VPC_PACK_NUMNONPOSVSVAR__SHIFT) & A3XX_VPC_PACK_NUMNONPOSVSVAR__MASK;
  1500. }
  1501. static inline uint32_t REG_A3XX_VPC_VARYING_INTERP(uint32_t i0) { return 0x00002282 + 0x1*i0; }
  1502. static inline uint32_t REG_A3XX_VPC_VARYING_INTERP_MODE(uint32_t i0) { return 0x00002282 + 0x1*i0; }
  1503. #define A3XX_VPC_VARYING_INTERP_MODE_C0__MASK 0x00000003
  1504. #define A3XX_VPC_VARYING_INTERP_MODE_C0__SHIFT 0
  1505. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C0(enum a3xx_intp_mode val)
  1506. {
  1507. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C0__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C0__MASK;
  1508. }
  1509. #define A3XX_VPC_VARYING_INTERP_MODE_C1__MASK 0x0000000c
  1510. #define A3XX_VPC_VARYING_INTERP_MODE_C1__SHIFT 2
  1511. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C1(enum a3xx_intp_mode val)
  1512. {
  1513. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C1__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C1__MASK;
  1514. }
  1515. #define A3XX_VPC_VARYING_INTERP_MODE_C2__MASK 0x00000030
  1516. #define A3XX_VPC_VARYING_INTERP_MODE_C2__SHIFT 4
  1517. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C2(enum a3xx_intp_mode val)
  1518. {
  1519. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C2__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C2__MASK;
  1520. }
  1521. #define A3XX_VPC_VARYING_INTERP_MODE_C3__MASK 0x000000c0
  1522. #define A3XX_VPC_VARYING_INTERP_MODE_C3__SHIFT 6
  1523. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C3(enum a3xx_intp_mode val)
  1524. {
  1525. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C3__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C3__MASK;
  1526. }
  1527. #define A3XX_VPC_VARYING_INTERP_MODE_C4__MASK 0x00000300
  1528. #define A3XX_VPC_VARYING_INTERP_MODE_C4__SHIFT 8
  1529. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C4(enum a3xx_intp_mode val)
  1530. {
  1531. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C4__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C4__MASK;
  1532. }
  1533. #define A3XX_VPC_VARYING_INTERP_MODE_C5__MASK 0x00000c00
  1534. #define A3XX_VPC_VARYING_INTERP_MODE_C5__SHIFT 10
  1535. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C5(enum a3xx_intp_mode val)
  1536. {
  1537. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C5__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C5__MASK;
  1538. }
  1539. #define A3XX_VPC_VARYING_INTERP_MODE_C6__MASK 0x00003000
  1540. #define A3XX_VPC_VARYING_INTERP_MODE_C6__SHIFT 12
  1541. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C6(enum a3xx_intp_mode val)
  1542. {
  1543. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C6__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C6__MASK;
  1544. }
  1545. #define A3XX_VPC_VARYING_INTERP_MODE_C7__MASK 0x0000c000
  1546. #define A3XX_VPC_VARYING_INTERP_MODE_C7__SHIFT 14
  1547. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C7(enum a3xx_intp_mode val)
  1548. {
  1549. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C7__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C7__MASK;
  1550. }
  1551. #define A3XX_VPC_VARYING_INTERP_MODE_C8__MASK 0x00030000
  1552. #define A3XX_VPC_VARYING_INTERP_MODE_C8__SHIFT 16
  1553. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C8(enum a3xx_intp_mode val)
  1554. {
  1555. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C8__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C8__MASK;
  1556. }
  1557. #define A3XX_VPC_VARYING_INTERP_MODE_C9__MASK 0x000c0000
  1558. #define A3XX_VPC_VARYING_INTERP_MODE_C9__SHIFT 18
  1559. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_C9(enum a3xx_intp_mode val)
  1560. {
  1561. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_C9__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_C9__MASK;
  1562. }
  1563. #define A3XX_VPC_VARYING_INTERP_MODE_CA__MASK 0x00300000
  1564. #define A3XX_VPC_VARYING_INTERP_MODE_CA__SHIFT 20
  1565. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_CA(enum a3xx_intp_mode val)
  1566. {
  1567. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_CA__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_CA__MASK;
  1568. }
  1569. #define A3XX_VPC_VARYING_INTERP_MODE_CB__MASK 0x00c00000
  1570. #define A3XX_VPC_VARYING_INTERP_MODE_CB__SHIFT 22
  1571. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_CB(enum a3xx_intp_mode val)
  1572. {
  1573. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_CB__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_CB__MASK;
  1574. }
  1575. #define A3XX_VPC_VARYING_INTERP_MODE_CC__MASK 0x03000000
  1576. #define A3XX_VPC_VARYING_INTERP_MODE_CC__SHIFT 24
  1577. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_CC(enum a3xx_intp_mode val)
  1578. {
  1579. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_CC__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_CC__MASK;
  1580. }
  1581. #define A3XX_VPC_VARYING_INTERP_MODE_CD__MASK 0x0c000000
  1582. #define A3XX_VPC_VARYING_INTERP_MODE_CD__SHIFT 26
  1583. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_CD(enum a3xx_intp_mode val)
  1584. {
  1585. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_CD__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_CD__MASK;
  1586. }
  1587. #define A3XX_VPC_VARYING_INTERP_MODE_CE__MASK 0x30000000
  1588. #define A3XX_VPC_VARYING_INTERP_MODE_CE__SHIFT 28
  1589. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_CE(enum a3xx_intp_mode val)
  1590. {
  1591. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_CE__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_CE__MASK;
  1592. }
  1593. #define A3XX_VPC_VARYING_INTERP_MODE_CF__MASK 0xc0000000
  1594. #define A3XX_VPC_VARYING_INTERP_MODE_CF__SHIFT 30
  1595. static inline uint32_t A3XX_VPC_VARYING_INTERP_MODE_CF(enum a3xx_intp_mode val)
  1596. {
  1597. return ((val) << A3XX_VPC_VARYING_INTERP_MODE_CF__SHIFT) & A3XX_VPC_VARYING_INTERP_MODE_CF__MASK;
  1598. }
  1599. static inline uint32_t REG_A3XX_VPC_VARYING_PS_REPL(uint32_t i0) { return 0x00002286 + 0x1*i0; }
  1600. static inline uint32_t REG_A3XX_VPC_VARYING_PS_REPL_MODE(uint32_t i0) { return 0x00002286 + 0x1*i0; }
  1601. #define A3XX_VPC_VARYING_PS_REPL_MODE_C0__MASK 0x00000003
  1602. #define A3XX_VPC_VARYING_PS_REPL_MODE_C0__SHIFT 0
  1603. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C0(enum a3xx_repl_mode val)
  1604. {
  1605. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C0__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C0__MASK;
  1606. }
  1607. #define A3XX_VPC_VARYING_PS_REPL_MODE_C1__MASK 0x0000000c
  1608. #define A3XX_VPC_VARYING_PS_REPL_MODE_C1__SHIFT 2
  1609. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C1(enum a3xx_repl_mode val)
  1610. {
  1611. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C1__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C1__MASK;
  1612. }
  1613. #define A3XX_VPC_VARYING_PS_REPL_MODE_C2__MASK 0x00000030
  1614. #define A3XX_VPC_VARYING_PS_REPL_MODE_C2__SHIFT 4
  1615. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C2(enum a3xx_repl_mode val)
  1616. {
  1617. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C2__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C2__MASK;
  1618. }
  1619. #define A3XX_VPC_VARYING_PS_REPL_MODE_C3__MASK 0x000000c0
  1620. #define A3XX_VPC_VARYING_PS_REPL_MODE_C3__SHIFT 6
  1621. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C3(enum a3xx_repl_mode val)
  1622. {
  1623. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C3__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C3__MASK;
  1624. }
  1625. #define A3XX_VPC_VARYING_PS_REPL_MODE_C4__MASK 0x00000300
  1626. #define A3XX_VPC_VARYING_PS_REPL_MODE_C4__SHIFT 8
  1627. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C4(enum a3xx_repl_mode val)
  1628. {
  1629. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C4__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C4__MASK;
  1630. }
  1631. #define A3XX_VPC_VARYING_PS_REPL_MODE_C5__MASK 0x00000c00
  1632. #define A3XX_VPC_VARYING_PS_REPL_MODE_C5__SHIFT 10
  1633. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C5(enum a3xx_repl_mode val)
  1634. {
  1635. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C5__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C5__MASK;
  1636. }
  1637. #define A3XX_VPC_VARYING_PS_REPL_MODE_C6__MASK 0x00003000
  1638. #define A3XX_VPC_VARYING_PS_REPL_MODE_C6__SHIFT 12
  1639. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C6(enum a3xx_repl_mode val)
  1640. {
  1641. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C6__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C6__MASK;
  1642. }
  1643. #define A3XX_VPC_VARYING_PS_REPL_MODE_C7__MASK 0x0000c000
  1644. #define A3XX_VPC_VARYING_PS_REPL_MODE_C7__SHIFT 14
  1645. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C7(enum a3xx_repl_mode val)
  1646. {
  1647. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C7__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C7__MASK;
  1648. }
  1649. #define A3XX_VPC_VARYING_PS_REPL_MODE_C8__MASK 0x00030000
  1650. #define A3XX_VPC_VARYING_PS_REPL_MODE_C8__SHIFT 16
  1651. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C8(enum a3xx_repl_mode val)
  1652. {
  1653. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C8__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C8__MASK;
  1654. }
  1655. #define A3XX_VPC_VARYING_PS_REPL_MODE_C9__MASK 0x000c0000
  1656. #define A3XX_VPC_VARYING_PS_REPL_MODE_C9__SHIFT 18
  1657. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_C9(enum a3xx_repl_mode val)
  1658. {
  1659. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_C9__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_C9__MASK;
  1660. }
  1661. #define A3XX_VPC_VARYING_PS_REPL_MODE_CA__MASK 0x00300000
  1662. #define A3XX_VPC_VARYING_PS_REPL_MODE_CA__SHIFT 20
  1663. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_CA(enum a3xx_repl_mode val)
  1664. {
  1665. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_CA__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_CA__MASK;
  1666. }
  1667. #define A3XX_VPC_VARYING_PS_REPL_MODE_CB__MASK 0x00c00000
  1668. #define A3XX_VPC_VARYING_PS_REPL_MODE_CB__SHIFT 22
  1669. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_CB(enum a3xx_repl_mode val)
  1670. {
  1671. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_CB__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_CB__MASK;
  1672. }
  1673. #define A3XX_VPC_VARYING_PS_REPL_MODE_CC__MASK 0x03000000
  1674. #define A3XX_VPC_VARYING_PS_REPL_MODE_CC__SHIFT 24
  1675. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_CC(enum a3xx_repl_mode val)
  1676. {
  1677. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_CC__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_CC__MASK;
  1678. }
  1679. #define A3XX_VPC_VARYING_PS_REPL_MODE_CD__MASK 0x0c000000
  1680. #define A3XX_VPC_VARYING_PS_REPL_MODE_CD__SHIFT 26
  1681. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_CD(enum a3xx_repl_mode val)
  1682. {
  1683. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_CD__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_CD__MASK;
  1684. }
  1685. #define A3XX_VPC_VARYING_PS_REPL_MODE_CE__MASK 0x30000000
  1686. #define A3XX_VPC_VARYING_PS_REPL_MODE_CE__SHIFT 28
  1687. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_CE(enum a3xx_repl_mode val)
  1688. {
  1689. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_CE__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_CE__MASK;
  1690. }
  1691. #define A3XX_VPC_VARYING_PS_REPL_MODE_CF__MASK 0xc0000000
  1692. #define A3XX_VPC_VARYING_PS_REPL_MODE_CF__SHIFT 30
  1693. static inline uint32_t A3XX_VPC_VARYING_PS_REPL_MODE_CF(enum a3xx_repl_mode val)
  1694. {
  1695. return ((val) << A3XX_VPC_VARYING_PS_REPL_MODE_CF__SHIFT) & A3XX_VPC_VARYING_PS_REPL_MODE_CF__MASK;
  1696. }
  1697. #define REG_A3XX_VPC_VARY_CYLWRAP_ENABLE_0 0x0000228a
  1698. #define REG_A3XX_VPC_VARY_CYLWRAP_ENABLE_1 0x0000228b
  1699. #define REG_A3XX_SP_SP_CTRL_REG 0x000022c0
  1700. #define A3XX_SP_SP_CTRL_REG_RESOLVE 0x00010000
  1701. #define A3XX_SP_SP_CTRL_REG_CONSTMODE__MASK 0x00040000
  1702. #define A3XX_SP_SP_CTRL_REG_CONSTMODE__SHIFT 18
  1703. static inline uint32_t A3XX_SP_SP_CTRL_REG_CONSTMODE(uint32_t val)
  1704. {
  1705. return ((val) << A3XX_SP_SP_CTRL_REG_CONSTMODE__SHIFT) & A3XX_SP_SP_CTRL_REG_CONSTMODE__MASK;
  1706. }
  1707. #define A3XX_SP_SP_CTRL_REG_BINNING 0x00080000
  1708. #define A3XX_SP_SP_CTRL_REG_SLEEPMODE__MASK 0x00300000
  1709. #define A3XX_SP_SP_CTRL_REG_SLEEPMODE__SHIFT 20
  1710. static inline uint32_t A3XX_SP_SP_CTRL_REG_SLEEPMODE(uint32_t val)
  1711. {
  1712. return ((val) << A3XX_SP_SP_CTRL_REG_SLEEPMODE__SHIFT) & A3XX_SP_SP_CTRL_REG_SLEEPMODE__MASK;
  1713. }
  1714. #define A3XX_SP_SP_CTRL_REG_L0MODE__MASK 0x00c00000
  1715. #define A3XX_SP_SP_CTRL_REG_L0MODE__SHIFT 22
  1716. static inline uint32_t A3XX_SP_SP_CTRL_REG_L0MODE(uint32_t val)
  1717. {
  1718. return ((val) << A3XX_SP_SP_CTRL_REG_L0MODE__SHIFT) & A3XX_SP_SP_CTRL_REG_L0MODE__MASK;
  1719. }
  1720. #define REG_A3XX_SP_VS_CTRL_REG0 0x000022c4
  1721. #define A3XX_SP_VS_CTRL_REG0_THREADMODE__MASK 0x00000001
  1722. #define A3XX_SP_VS_CTRL_REG0_THREADMODE__SHIFT 0
  1723. static inline uint32_t A3XX_SP_VS_CTRL_REG0_THREADMODE(enum a3xx_threadmode val)
  1724. {
  1725. return ((val) << A3XX_SP_VS_CTRL_REG0_THREADMODE__SHIFT) & A3XX_SP_VS_CTRL_REG0_THREADMODE__MASK;
  1726. }
  1727. #define A3XX_SP_VS_CTRL_REG0_INSTRBUFFERMODE__MASK 0x00000002
  1728. #define A3XX_SP_VS_CTRL_REG0_INSTRBUFFERMODE__SHIFT 1
  1729. static inline uint32_t A3XX_SP_VS_CTRL_REG0_INSTRBUFFERMODE(enum a3xx_instrbuffermode val)
  1730. {
  1731. return ((val) << A3XX_SP_VS_CTRL_REG0_INSTRBUFFERMODE__SHIFT) & A3XX_SP_VS_CTRL_REG0_INSTRBUFFERMODE__MASK;
  1732. }
  1733. #define A3XX_SP_VS_CTRL_REG0_CACHEINVALID 0x00000004
  1734. #define A3XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__MASK 0x000003f0
  1735. #define A3XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT 4
  1736. static inline uint32_t A3XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
  1737. {
  1738. return ((val) << A3XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A3XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
  1739. }
  1740. #define A3XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__MASK 0x0003fc00
  1741. #define A3XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT 10
  1742. static inline uint32_t A3XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
  1743. {
  1744. return ((val) << A3XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A3XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
  1745. }
  1746. #define A3XX_SP_VS_CTRL_REG0_INOUTREGOVERLAP__MASK 0x000c0000
  1747. #define A3XX_SP_VS_CTRL_REG0_INOUTREGOVERLAP__SHIFT 18
  1748. static inline uint32_t A3XX_SP_VS_CTRL_REG0_INOUTREGOVERLAP(uint32_t val)
  1749. {
  1750. return ((val) << A3XX_SP_VS_CTRL_REG0_INOUTREGOVERLAP__SHIFT) & A3XX_SP_VS_CTRL_REG0_INOUTREGOVERLAP__MASK;
  1751. }
  1752. #define A3XX_SP_VS_CTRL_REG0_THREADSIZE__MASK 0x00100000
  1753. #define A3XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT 20
  1754. static inline uint32_t A3XX_SP_VS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
  1755. {
  1756. return ((val) << A3XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT) & A3XX_SP_VS_CTRL_REG0_THREADSIZE__MASK;
  1757. }
  1758. #define A3XX_SP_VS_CTRL_REG0_SUPERTHREADMODE 0x00200000
  1759. #define A3XX_SP_VS_CTRL_REG0_PIXLODENABLE 0x00400000
  1760. #define A3XX_SP_VS_CTRL_REG0_COMPUTEMODE 0x00800000
  1761. #define A3XX_SP_VS_CTRL_REG0_LENGTH__MASK 0xff000000
  1762. #define A3XX_SP_VS_CTRL_REG0_LENGTH__SHIFT 24
  1763. static inline uint32_t A3XX_SP_VS_CTRL_REG0_LENGTH(uint32_t val)
  1764. {
  1765. return ((val) << A3XX_SP_VS_CTRL_REG0_LENGTH__SHIFT) & A3XX_SP_VS_CTRL_REG0_LENGTH__MASK;
  1766. }
  1767. #define REG_A3XX_SP_VS_CTRL_REG1 0x000022c5
  1768. #define A3XX_SP_VS_CTRL_REG1_CONSTLENGTH__MASK 0x000003ff
  1769. #define A3XX_SP_VS_CTRL_REG1_CONSTLENGTH__SHIFT 0
  1770. static inline uint32_t A3XX_SP_VS_CTRL_REG1_CONSTLENGTH(uint32_t val)
  1771. {
  1772. return ((val) << A3XX_SP_VS_CTRL_REG1_CONSTLENGTH__SHIFT) & A3XX_SP_VS_CTRL_REG1_CONSTLENGTH__MASK;
  1773. }
  1774. #define A3XX_SP_VS_CTRL_REG1_CONSTFOOTPRINT__MASK 0x000ffc00
  1775. #define A3XX_SP_VS_CTRL_REG1_CONSTFOOTPRINT__SHIFT 10
  1776. static inline uint32_t A3XX_SP_VS_CTRL_REG1_CONSTFOOTPRINT(uint32_t val)
  1777. {
  1778. return ((val) << A3XX_SP_VS_CTRL_REG1_CONSTFOOTPRINT__SHIFT) & A3XX_SP_VS_CTRL_REG1_CONSTFOOTPRINT__MASK;
  1779. }
  1780. #define A3XX_SP_VS_CTRL_REG1_INITIALOUTSTANDING__MASK 0x7f000000
  1781. #define A3XX_SP_VS_CTRL_REG1_INITIALOUTSTANDING__SHIFT 24
  1782. static inline uint32_t A3XX_SP_VS_CTRL_REG1_INITIALOUTSTANDING(uint32_t val)
  1783. {
  1784. return ((val) << A3XX_SP_VS_CTRL_REG1_INITIALOUTSTANDING__SHIFT) & A3XX_SP_VS_CTRL_REG1_INITIALOUTSTANDING__MASK;
  1785. }
  1786. #define REG_A3XX_SP_VS_PARAM_REG 0x000022c6
  1787. #define A3XX_SP_VS_PARAM_REG_POSREGID__MASK 0x000000ff
  1788. #define A3XX_SP_VS_PARAM_REG_POSREGID__SHIFT 0
  1789. static inline uint32_t A3XX_SP_VS_PARAM_REG_POSREGID(uint32_t val)
  1790. {
  1791. return ((val) << A3XX_SP_VS_PARAM_REG_POSREGID__SHIFT) & A3XX_SP_VS_PARAM_REG_POSREGID__MASK;
  1792. }
  1793. #define A3XX_SP_VS_PARAM_REG_PSIZEREGID__MASK 0x0000ff00
  1794. #define A3XX_SP_VS_PARAM_REG_PSIZEREGID__SHIFT 8
  1795. static inline uint32_t A3XX_SP_VS_PARAM_REG_PSIZEREGID(uint32_t val)
  1796. {
  1797. return ((val) << A3XX_SP_VS_PARAM_REG_PSIZEREGID__SHIFT) & A3XX_SP_VS_PARAM_REG_PSIZEREGID__MASK;
  1798. }
  1799. #define A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR__MASK 0xfff00000
  1800. #define A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR__SHIFT 20
  1801. static inline uint32_t A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR(uint32_t val)
  1802. {
  1803. return ((val) << A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR__SHIFT) & A3XX_SP_VS_PARAM_REG_TOTALVSOUTVAR__MASK;
  1804. }
  1805. static inline uint32_t REG_A3XX_SP_VS_OUT(uint32_t i0) { return 0x000022c7 + 0x1*i0; }
  1806. static inline uint32_t REG_A3XX_SP_VS_OUT_REG(uint32_t i0) { return 0x000022c7 + 0x1*i0; }
  1807. #define A3XX_SP_VS_OUT_REG_A_REGID__MASK 0x000001ff
  1808. #define A3XX_SP_VS_OUT_REG_A_REGID__SHIFT 0
  1809. static inline uint32_t A3XX_SP_VS_OUT_REG_A_REGID(uint32_t val)
  1810. {
  1811. return ((val) << A3XX_SP_VS_OUT_REG_A_REGID__SHIFT) & A3XX_SP_VS_OUT_REG_A_REGID__MASK;
  1812. }
  1813. #define A3XX_SP_VS_OUT_REG_A_COMPMASK__MASK 0x00001e00
  1814. #define A3XX_SP_VS_OUT_REG_A_COMPMASK__SHIFT 9
  1815. static inline uint32_t A3XX_SP_VS_OUT_REG_A_COMPMASK(uint32_t val)
  1816. {
  1817. return ((val) << A3XX_SP_VS_OUT_REG_A_COMPMASK__SHIFT) & A3XX_SP_VS_OUT_REG_A_COMPMASK__MASK;
  1818. }
  1819. #define A3XX_SP_VS_OUT_REG_B_REGID__MASK 0x01ff0000
  1820. #define A3XX_SP_VS_OUT_REG_B_REGID__SHIFT 16
  1821. static inline uint32_t A3XX_SP_VS_OUT_REG_B_REGID(uint32_t val)
  1822. {
  1823. return ((val) << A3XX_SP_VS_OUT_REG_B_REGID__SHIFT) & A3XX_SP_VS_OUT_REG_B_REGID__MASK;
  1824. }
  1825. #define A3XX_SP_VS_OUT_REG_B_COMPMASK__MASK 0x1e000000
  1826. #define A3XX_SP_VS_OUT_REG_B_COMPMASK__SHIFT 25
  1827. static inline uint32_t A3XX_SP_VS_OUT_REG_B_COMPMASK(uint32_t val)
  1828. {
  1829. return ((val) << A3XX_SP_VS_OUT_REG_B_COMPMASK__SHIFT) & A3XX_SP_VS_OUT_REG_B_COMPMASK__MASK;
  1830. }
  1831. static inline uint32_t REG_A3XX_SP_VS_VPC_DST(uint32_t i0) { return 0x000022d0 + 0x1*i0; }
  1832. static inline uint32_t REG_A3XX_SP_VS_VPC_DST_REG(uint32_t i0) { return 0x000022d0 + 0x1*i0; }
  1833. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC0__MASK 0x000000ff
  1834. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC0__SHIFT 0
  1835. static inline uint32_t A3XX_SP_VS_VPC_DST_REG_OUTLOC0(uint32_t val)
  1836. {
  1837. return ((val) << A3XX_SP_VS_VPC_DST_REG_OUTLOC0__SHIFT) & A3XX_SP_VS_VPC_DST_REG_OUTLOC0__MASK;
  1838. }
  1839. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC1__MASK 0x0000ff00
  1840. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC1__SHIFT 8
  1841. static inline uint32_t A3XX_SP_VS_VPC_DST_REG_OUTLOC1(uint32_t val)
  1842. {
  1843. return ((val) << A3XX_SP_VS_VPC_DST_REG_OUTLOC1__SHIFT) & A3XX_SP_VS_VPC_DST_REG_OUTLOC1__MASK;
  1844. }
  1845. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC2__MASK 0x00ff0000
  1846. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC2__SHIFT 16
  1847. static inline uint32_t A3XX_SP_VS_VPC_DST_REG_OUTLOC2(uint32_t val)
  1848. {
  1849. return ((val) << A3XX_SP_VS_VPC_DST_REG_OUTLOC2__SHIFT) & A3XX_SP_VS_VPC_DST_REG_OUTLOC2__MASK;
  1850. }
  1851. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC3__MASK 0xff000000
  1852. #define A3XX_SP_VS_VPC_DST_REG_OUTLOC3__SHIFT 24
  1853. static inline uint32_t A3XX_SP_VS_VPC_DST_REG_OUTLOC3(uint32_t val)
  1854. {
  1855. return ((val) << A3XX_SP_VS_VPC_DST_REG_OUTLOC3__SHIFT) & A3XX_SP_VS_VPC_DST_REG_OUTLOC3__MASK;
  1856. }
  1857. #define REG_A3XX_SP_VS_OBJ_OFFSET_REG 0x000022d4
  1858. #define A3XX_SP_VS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__MASK 0x01ff0000
  1859. #define A3XX_SP_VS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__SHIFT 16
  1860. static inline uint32_t A3XX_SP_VS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET(uint32_t val)
  1861. {
  1862. return ((val) << A3XX_SP_VS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__SHIFT) & A3XX_SP_VS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__MASK;
  1863. }
  1864. #define A3XX_SP_VS_OBJ_OFFSET_REG_SHADEROBJOFFSET__MASK 0xfe000000
  1865. #define A3XX_SP_VS_OBJ_OFFSET_REG_SHADEROBJOFFSET__SHIFT 25
  1866. static inline uint32_t A3XX_SP_VS_OBJ_OFFSET_REG_SHADEROBJOFFSET(uint32_t val)
  1867. {
  1868. return ((val) << A3XX_SP_VS_OBJ_OFFSET_REG_SHADEROBJOFFSET__SHIFT) & A3XX_SP_VS_OBJ_OFFSET_REG_SHADEROBJOFFSET__MASK;
  1869. }
  1870. #define REG_A3XX_SP_VS_OBJ_START_REG 0x000022d5
  1871. #define REG_A3XX_SP_VS_PVT_MEM_PARAM_REG 0x000022d6
  1872. #define REG_A3XX_SP_VS_PVT_MEM_ADDR_REG 0x000022d7
  1873. #define REG_A3XX_SP_VS_PVT_MEM_SIZE_REG 0x000022d8
  1874. #define REG_A3XX_SP_VS_LENGTH_REG 0x000022df
  1875. #define A3XX_SP_VS_LENGTH_REG_SHADERLENGTH__MASK 0xffffffff
  1876. #define A3XX_SP_VS_LENGTH_REG_SHADERLENGTH__SHIFT 0
  1877. static inline uint32_t A3XX_SP_VS_LENGTH_REG_SHADERLENGTH(uint32_t val)
  1878. {
  1879. return ((val) << A3XX_SP_VS_LENGTH_REG_SHADERLENGTH__SHIFT) & A3XX_SP_VS_LENGTH_REG_SHADERLENGTH__MASK;
  1880. }
  1881. #define REG_A3XX_SP_FS_CTRL_REG0 0x000022e0
  1882. #define A3XX_SP_FS_CTRL_REG0_THREADMODE__MASK 0x00000001
  1883. #define A3XX_SP_FS_CTRL_REG0_THREADMODE__SHIFT 0
  1884. static inline uint32_t A3XX_SP_FS_CTRL_REG0_THREADMODE(enum a3xx_threadmode val)
  1885. {
  1886. return ((val) << A3XX_SP_FS_CTRL_REG0_THREADMODE__SHIFT) & A3XX_SP_FS_CTRL_REG0_THREADMODE__MASK;
  1887. }
  1888. #define A3XX_SP_FS_CTRL_REG0_INSTRBUFFERMODE__MASK 0x00000002
  1889. #define A3XX_SP_FS_CTRL_REG0_INSTRBUFFERMODE__SHIFT 1
  1890. static inline uint32_t A3XX_SP_FS_CTRL_REG0_INSTRBUFFERMODE(enum a3xx_instrbuffermode val)
  1891. {
  1892. return ((val) << A3XX_SP_FS_CTRL_REG0_INSTRBUFFERMODE__SHIFT) & A3XX_SP_FS_CTRL_REG0_INSTRBUFFERMODE__MASK;
  1893. }
  1894. #define A3XX_SP_FS_CTRL_REG0_CACHEINVALID 0x00000004
  1895. #define A3XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__MASK 0x000003f0
  1896. #define A3XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT 4
  1897. static inline uint32_t A3XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
  1898. {
  1899. return ((val) << A3XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A3XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
  1900. }
  1901. #define A3XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__MASK 0x0003fc00
  1902. #define A3XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT 10
  1903. static inline uint32_t A3XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
  1904. {
  1905. return ((val) << A3XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A3XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
  1906. }
  1907. #define A3XX_SP_FS_CTRL_REG0_INOUTREGOVERLAP__MASK 0x000c0000
  1908. #define A3XX_SP_FS_CTRL_REG0_INOUTREGOVERLAP__SHIFT 18
  1909. static inline uint32_t A3XX_SP_FS_CTRL_REG0_INOUTREGOVERLAP(uint32_t val)
  1910. {
  1911. return ((val) << A3XX_SP_FS_CTRL_REG0_INOUTREGOVERLAP__SHIFT) & A3XX_SP_FS_CTRL_REG0_INOUTREGOVERLAP__MASK;
  1912. }
  1913. #define A3XX_SP_FS_CTRL_REG0_THREADSIZE__MASK 0x00100000
  1914. #define A3XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT 20
  1915. static inline uint32_t A3XX_SP_FS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
  1916. {
  1917. return ((val) << A3XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT) & A3XX_SP_FS_CTRL_REG0_THREADSIZE__MASK;
  1918. }
  1919. #define A3XX_SP_FS_CTRL_REG0_SUPERTHREADMODE 0x00200000
  1920. #define A3XX_SP_FS_CTRL_REG0_PIXLODENABLE 0x00400000
  1921. #define A3XX_SP_FS_CTRL_REG0_COMPUTEMODE 0x00800000
  1922. #define A3XX_SP_FS_CTRL_REG0_LENGTH__MASK 0xff000000
  1923. #define A3XX_SP_FS_CTRL_REG0_LENGTH__SHIFT 24
  1924. static inline uint32_t A3XX_SP_FS_CTRL_REG0_LENGTH(uint32_t val)
  1925. {
  1926. return ((val) << A3XX_SP_FS_CTRL_REG0_LENGTH__SHIFT) & A3XX_SP_FS_CTRL_REG0_LENGTH__MASK;
  1927. }
  1928. #define REG_A3XX_SP_FS_CTRL_REG1 0x000022e1
  1929. #define A3XX_SP_FS_CTRL_REG1_CONSTLENGTH__MASK 0x000003ff
  1930. #define A3XX_SP_FS_CTRL_REG1_CONSTLENGTH__SHIFT 0
  1931. static inline uint32_t A3XX_SP_FS_CTRL_REG1_CONSTLENGTH(uint32_t val)
  1932. {
  1933. return ((val) << A3XX_SP_FS_CTRL_REG1_CONSTLENGTH__SHIFT) & A3XX_SP_FS_CTRL_REG1_CONSTLENGTH__MASK;
  1934. }
  1935. #define A3XX_SP_FS_CTRL_REG1_CONSTFOOTPRINT__MASK 0x000ffc00
  1936. #define A3XX_SP_FS_CTRL_REG1_CONSTFOOTPRINT__SHIFT 10
  1937. static inline uint32_t A3XX_SP_FS_CTRL_REG1_CONSTFOOTPRINT(uint32_t val)
  1938. {
  1939. return ((val) << A3XX_SP_FS_CTRL_REG1_CONSTFOOTPRINT__SHIFT) & A3XX_SP_FS_CTRL_REG1_CONSTFOOTPRINT__MASK;
  1940. }
  1941. #define A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING__MASK 0x00f00000
  1942. #define A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING__SHIFT 20
  1943. static inline uint32_t A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING(uint32_t val)
  1944. {
  1945. return ((val) << A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING__SHIFT) & A3XX_SP_FS_CTRL_REG1_INITIALOUTSTANDING__MASK;
  1946. }
  1947. #define A3XX_SP_FS_CTRL_REG1_HALFPRECVAROFFSET__MASK 0x3f000000
  1948. #define A3XX_SP_FS_CTRL_REG1_HALFPRECVAROFFSET__SHIFT 24
  1949. static inline uint32_t A3XX_SP_FS_CTRL_REG1_HALFPRECVAROFFSET(uint32_t val)
  1950. {
  1951. return ((val) << A3XX_SP_FS_CTRL_REG1_HALFPRECVAROFFSET__SHIFT) & A3XX_SP_FS_CTRL_REG1_HALFPRECVAROFFSET__MASK;
  1952. }
  1953. #define REG_A3XX_SP_FS_OBJ_OFFSET_REG 0x000022e2
  1954. #define A3XX_SP_FS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__MASK 0x01ff0000
  1955. #define A3XX_SP_FS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__SHIFT 16
  1956. static inline uint32_t A3XX_SP_FS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET(uint32_t val)
  1957. {
  1958. return ((val) << A3XX_SP_FS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__SHIFT) & A3XX_SP_FS_OBJ_OFFSET_REG_CONSTOBJECTOFFSET__MASK;
  1959. }
  1960. #define A3XX_SP_FS_OBJ_OFFSET_REG_SHADEROBJOFFSET__MASK 0xfe000000
  1961. #define A3XX_SP_FS_OBJ_OFFSET_REG_SHADEROBJOFFSET__SHIFT 25
  1962. static inline uint32_t A3XX_SP_FS_OBJ_OFFSET_REG_SHADEROBJOFFSET(uint32_t val)
  1963. {
  1964. return ((val) << A3XX_SP_FS_OBJ_OFFSET_REG_SHADEROBJOFFSET__SHIFT) & A3XX_SP_FS_OBJ_OFFSET_REG_SHADEROBJOFFSET__MASK;
  1965. }
  1966. #define REG_A3XX_SP_FS_OBJ_START_REG 0x000022e3
  1967. #define REG_A3XX_SP_FS_PVT_MEM_PARAM_REG 0x000022e4
  1968. #define REG_A3XX_SP_FS_PVT_MEM_ADDR_REG 0x000022e5
  1969. #define REG_A3XX_SP_FS_PVT_MEM_SIZE_REG 0x000022e6
  1970. #define REG_A3XX_SP_FS_FLAT_SHAD_MODE_REG_0 0x000022e8
  1971. #define REG_A3XX_SP_FS_FLAT_SHAD_MODE_REG_1 0x000022e9
  1972. #define REG_A3XX_SP_FS_OUTPUT_REG 0x000022ec
  1973. #define A3XX_SP_FS_OUTPUT_REG_MRT__MASK 0x00000003
  1974. #define A3XX_SP_FS_OUTPUT_REG_MRT__SHIFT 0
  1975. static inline uint32_t A3XX_SP_FS_OUTPUT_REG_MRT(uint32_t val)
  1976. {
  1977. return ((val) << A3XX_SP_FS_OUTPUT_REG_MRT__SHIFT) & A3XX_SP_FS_OUTPUT_REG_MRT__MASK;
  1978. }
  1979. #define A3XX_SP_FS_OUTPUT_REG_DEPTH_ENABLE 0x00000080
  1980. #define A3XX_SP_FS_OUTPUT_REG_DEPTH_REGID__MASK 0x0000ff00
  1981. #define A3XX_SP_FS_OUTPUT_REG_DEPTH_REGID__SHIFT 8
  1982. static inline uint32_t A3XX_SP_FS_OUTPUT_REG_DEPTH_REGID(uint32_t val)
  1983. {
  1984. return ((val) << A3XX_SP_FS_OUTPUT_REG_DEPTH_REGID__SHIFT) & A3XX_SP_FS_OUTPUT_REG_DEPTH_REGID__MASK;
  1985. }
  1986. static inline uint32_t REG_A3XX_SP_FS_MRT(uint32_t i0) { return 0x000022f0 + 0x1*i0; }
  1987. static inline uint32_t REG_A3XX_SP_FS_MRT_REG(uint32_t i0) { return 0x000022f0 + 0x1*i0; }
  1988. #define A3XX_SP_FS_MRT_REG_REGID__MASK 0x000000ff
  1989. #define A3XX_SP_FS_MRT_REG_REGID__SHIFT 0
  1990. static inline uint32_t A3XX_SP_FS_MRT_REG_REGID(uint32_t val)
  1991. {
  1992. return ((val) << A3XX_SP_FS_MRT_REG_REGID__SHIFT) & A3XX_SP_FS_MRT_REG_REGID__MASK;
  1993. }
  1994. #define A3XX_SP_FS_MRT_REG_HALF_PRECISION 0x00000100
  1995. #define A3XX_SP_FS_MRT_REG_SINT 0x00000400
  1996. #define A3XX_SP_FS_MRT_REG_UINT 0x00000800
  1997. static inline uint32_t REG_A3XX_SP_FS_IMAGE_OUTPUT(uint32_t i0) { return 0x000022f4 + 0x1*i0; }
  1998. static inline uint32_t REG_A3XX_SP_FS_IMAGE_OUTPUT_REG(uint32_t i0) { return 0x000022f4 + 0x1*i0; }
  1999. #define A3XX_SP_FS_IMAGE_OUTPUT_REG_MRTFORMAT__MASK 0x0000003f
  2000. #define A3XX_SP_FS_IMAGE_OUTPUT_REG_MRTFORMAT__SHIFT 0
  2001. static inline uint32_t A3XX_SP_FS_IMAGE_OUTPUT_REG_MRTFORMAT(enum a3xx_color_fmt val)
  2002. {
  2003. return ((val) << A3XX_SP_FS_IMAGE_OUTPUT_REG_MRTFORMAT__SHIFT) & A3XX_SP_FS_IMAGE_OUTPUT_REG_MRTFORMAT__MASK;
  2004. }
  2005. #define REG_A3XX_SP_FS_LENGTH_REG 0x000022ff
  2006. #define A3XX_SP_FS_LENGTH_REG_SHADERLENGTH__MASK 0xffffffff
  2007. #define A3XX_SP_FS_LENGTH_REG_SHADERLENGTH__SHIFT 0
  2008. static inline uint32_t A3XX_SP_FS_LENGTH_REG_SHADERLENGTH(uint32_t val)
  2009. {
  2010. return ((val) << A3XX_SP_FS_LENGTH_REG_SHADERLENGTH__SHIFT) & A3XX_SP_FS_LENGTH_REG_SHADERLENGTH__MASK;
  2011. }
  2012. #define REG_A3XX_PA_SC_AA_CONFIG 0x00002301
  2013. #define REG_A3XX_TPL1_TP_VS_TEX_OFFSET 0x00002340
  2014. #define A3XX_TPL1_TP_VS_TEX_OFFSET_SAMPLEROFFSET__MASK 0x000000ff
  2015. #define A3XX_TPL1_TP_VS_TEX_OFFSET_SAMPLEROFFSET__SHIFT 0
  2016. static inline uint32_t A3XX_TPL1_TP_VS_TEX_OFFSET_SAMPLEROFFSET(uint32_t val)
  2017. {
  2018. return ((val) << A3XX_TPL1_TP_VS_TEX_OFFSET_SAMPLEROFFSET__SHIFT) & A3XX_TPL1_TP_VS_TEX_OFFSET_SAMPLEROFFSET__MASK;
  2019. }
  2020. #define A3XX_TPL1_TP_VS_TEX_OFFSET_MEMOBJOFFSET__MASK 0x0000ff00
  2021. #define A3XX_TPL1_TP_VS_TEX_OFFSET_MEMOBJOFFSET__SHIFT 8
  2022. static inline uint32_t A3XX_TPL1_TP_VS_TEX_OFFSET_MEMOBJOFFSET(uint32_t val)
  2023. {
  2024. return ((val) << A3XX_TPL1_TP_VS_TEX_OFFSET_MEMOBJOFFSET__SHIFT) & A3XX_TPL1_TP_VS_TEX_OFFSET_MEMOBJOFFSET__MASK;
  2025. }
  2026. #define A3XX_TPL1_TP_VS_TEX_OFFSET_BASETABLEPTR__MASK 0xffff0000
  2027. #define A3XX_TPL1_TP_VS_TEX_OFFSET_BASETABLEPTR__SHIFT 16
  2028. static inline uint32_t A3XX_TPL1_TP_VS_TEX_OFFSET_BASETABLEPTR(uint32_t val)
  2029. {
  2030. return ((val) << A3XX_TPL1_TP_VS_TEX_OFFSET_BASETABLEPTR__SHIFT) & A3XX_TPL1_TP_VS_TEX_OFFSET_BASETABLEPTR__MASK;
  2031. }
  2032. #define REG_A3XX_TPL1_TP_VS_BORDER_COLOR_BASE_ADDR 0x00002341
  2033. #define REG_A3XX_TPL1_TP_FS_TEX_OFFSET 0x00002342
  2034. #define A3XX_TPL1_TP_FS_TEX_OFFSET_SAMPLEROFFSET__MASK 0x000000ff
  2035. #define A3XX_TPL1_TP_FS_TEX_OFFSET_SAMPLEROFFSET__SHIFT 0
  2036. static inline uint32_t A3XX_TPL1_TP_FS_TEX_OFFSET_SAMPLEROFFSET(uint32_t val)
  2037. {
  2038. return ((val) << A3XX_TPL1_TP_FS_TEX_OFFSET_SAMPLEROFFSET__SHIFT) & A3XX_TPL1_TP_FS_TEX_OFFSET_SAMPLEROFFSET__MASK;
  2039. }
  2040. #define A3XX_TPL1_TP_FS_TEX_OFFSET_MEMOBJOFFSET__MASK 0x0000ff00
  2041. #define A3XX_TPL1_TP_FS_TEX_OFFSET_MEMOBJOFFSET__SHIFT 8
  2042. static inline uint32_t A3XX_TPL1_TP_FS_TEX_OFFSET_MEMOBJOFFSET(uint32_t val)
  2043. {
  2044. return ((val) << A3XX_TPL1_TP_FS_TEX_OFFSET_MEMOBJOFFSET__SHIFT) & A3XX_TPL1_TP_FS_TEX_OFFSET_MEMOBJOFFSET__MASK;
  2045. }
  2046. #define A3XX_TPL1_TP_FS_TEX_OFFSET_BASETABLEPTR__MASK 0xffff0000
  2047. #define A3XX_TPL1_TP_FS_TEX_OFFSET_BASETABLEPTR__SHIFT 16
  2048. static inline uint32_t A3XX_TPL1_TP_FS_TEX_OFFSET_BASETABLEPTR(uint32_t val)
  2049. {
  2050. return ((val) << A3XX_TPL1_TP_FS_TEX_OFFSET_BASETABLEPTR__SHIFT) & A3XX_TPL1_TP_FS_TEX_OFFSET_BASETABLEPTR__MASK;
  2051. }
  2052. #define REG_A3XX_TPL1_TP_FS_BORDER_COLOR_BASE_ADDR 0x00002343
  2053. #define REG_A3XX_VBIF_CLKON 0x00003001
  2054. #define REG_A3XX_VBIF_FIXED_SORT_EN 0x0000300c
  2055. #define REG_A3XX_VBIF_FIXED_SORT_SEL0 0x0000300d
  2056. #define REG_A3XX_VBIF_FIXED_SORT_SEL1 0x0000300e
  2057. #define REG_A3XX_VBIF_ABIT_SORT 0x0000301c
  2058. #define REG_A3XX_VBIF_ABIT_SORT_CONF 0x0000301d
  2059. #define REG_A3XX_VBIF_GATE_OFF_WRREQ_EN 0x0000302a
  2060. #define REG_A3XX_VBIF_IN_RD_LIM_CONF0 0x0000302c
  2061. #define REG_A3XX_VBIF_IN_RD_LIM_CONF1 0x0000302d
  2062. #define REG_A3XX_VBIF_IN_WR_LIM_CONF0 0x00003030
  2063. #define REG_A3XX_VBIF_IN_WR_LIM_CONF1 0x00003031
  2064. #define REG_A3XX_VBIF_OUT_RD_LIM_CONF0 0x00003034
  2065. #define REG_A3XX_VBIF_OUT_WR_LIM_CONF0 0x00003035
  2066. #define REG_A3XX_VBIF_DDR_OUT_MAX_BURST 0x00003036
  2067. #define REG_A3XX_VBIF_ARB_CTL 0x0000303c
  2068. #define REG_A3XX_VBIF_ROUND_ROBIN_QOS_ARB 0x00003049
  2069. #define REG_A3XX_VBIF_OUT_AXI_AMEMTYPE_CONF0 0x00003058
  2070. #define REG_A3XX_VBIF_OUT_AXI_AOOO_EN 0x0000305e
  2071. #define REG_A3XX_VBIF_OUT_AXI_AOOO 0x0000305f
  2072. #define REG_A3XX_VBIF_PERF_CNT_EN 0x00003070
  2073. #define A3XX_VBIF_PERF_CNT_EN_CNT0 0x00000001
  2074. #define A3XX_VBIF_PERF_CNT_EN_CNT1 0x00000002
  2075. #define A3XX_VBIF_PERF_CNT_EN_PWRCNT0 0x00000004
  2076. #define A3XX_VBIF_PERF_CNT_EN_PWRCNT1 0x00000008
  2077. #define A3XX_VBIF_PERF_CNT_EN_PWRCNT2 0x00000010
  2078. #define REG_A3XX_VBIF_PERF_CNT_CLR 0x00003071
  2079. #define A3XX_VBIF_PERF_CNT_CLR_CNT0 0x00000001
  2080. #define A3XX_VBIF_PERF_CNT_CLR_CNT1 0x00000002
  2081. #define A3XX_VBIF_PERF_CNT_CLR_PWRCNT0 0x00000004
  2082. #define A3XX_VBIF_PERF_CNT_CLR_PWRCNT1 0x00000008
  2083. #define A3XX_VBIF_PERF_CNT_CLR_PWRCNT2 0x00000010
  2084. #define REG_A3XX_VBIF_PERF_CNT_SEL 0x00003072
  2085. #define REG_A3XX_VBIF_PERF_CNT0_LO 0x00003073
  2086. #define REG_A3XX_VBIF_PERF_CNT0_HI 0x00003074
  2087. #define REG_A3XX_VBIF_PERF_CNT1_LO 0x00003075
  2088. #define REG_A3XX_VBIF_PERF_CNT1_HI 0x00003076
  2089. #define REG_A3XX_VBIF_PERF_PWR_CNT0_LO 0x00003077
  2090. #define REG_A3XX_VBIF_PERF_PWR_CNT0_HI 0x00003078
  2091. #define REG_A3XX_VBIF_PERF_PWR_CNT1_LO 0x00003079
  2092. #define REG_A3XX_VBIF_PERF_PWR_CNT1_HI 0x0000307a
  2093. #define REG_A3XX_VBIF_PERF_PWR_CNT2_LO 0x0000307b
  2094. #define REG_A3XX_VBIF_PERF_PWR_CNT2_HI 0x0000307c
  2095. #define REG_A3XX_VSC_BIN_SIZE 0x00000c01
  2096. #define A3XX_VSC_BIN_SIZE_WIDTH__MASK 0x0000001f
  2097. #define A3XX_VSC_BIN_SIZE_WIDTH__SHIFT 0
  2098. static inline uint32_t A3XX_VSC_BIN_SIZE_WIDTH(uint32_t val)
  2099. {
  2100. return ((val >> 5) << A3XX_VSC_BIN_SIZE_WIDTH__SHIFT) & A3XX_VSC_BIN_SIZE_WIDTH__MASK;
  2101. }
  2102. #define A3XX_VSC_BIN_SIZE_HEIGHT__MASK 0x000003e0
  2103. #define A3XX_VSC_BIN_SIZE_HEIGHT__SHIFT 5
  2104. static inline uint32_t A3XX_VSC_BIN_SIZE_HEIGHT(uint32_t val)
  2105. {
  2106. return ((val >> 5) << A3XX_VSC_BIN_SIZE_HEIGHT__SHIFT) & A3XX_VSC_BIN_SIZE_HEIGHT__MASK;
  2107. }
  2108. #define REG_A3XX_VSC_SIZE_ADDRESS 0x00000c02
  2109. static inline uint32_t REG_A3XX_VSC_PIPE(uint32_t i0) { return 0x00000c06 + 0x3*i0; }
  2110. static inline uint32_t REG_A3XX_VSC_PIPE_CONFIG(uint32_t i0) { return 0x00000c06 + 0x3*i0; }
  2111. #define A3XX_VSC_PIPE_CONFIG_X__MASK 0x000003ff
  2112. #define A3XX_VSC_PIPE_CONFIG_X__SHIFT 0
  2113. static inline uint32_t A3XX_VSC_PIPE_CONFIG_X(uint32_t val)
  2114. {
  2115. return ((val) << A3XX_VSC_PIPE_CONFIG_X__SHIFT) & A3XX_VSC_PIPE_CONFIG_X__MASK;
  2116. }
  2117. #define A3XX_VSC_PIPE_CONFIG_Y__MASK 0x000ffc00
  2118. #define A3XX_VSC_PIPE_CONFIG_Y__SHIFT 10
  2119. static inline uint32_t A3XX_VSC_PIPE_CONFIG_Y(uint32_t val)
  2120. {
  2121. return ((val) << A3XX_VSC_PIPE_CONFIG_Y__SHIFT) & A3XX_VSC_PIPE_CONFIG_Y__MASK;
  2122. }
  2123. #define A3XX_VSC_PIPE_CONFIG_W__MASK 0x00f00000
  2124. #define A3XX_VSC_PIPE_CONFIG_W__SHIFT 20
  2125. static inline uint32_t A3XX_VSC_PIPE_CONFIG_W(uint32_t val)
  2126. {
  2127. return ((val) << A3XX_VSC_PIPE_CONFIG_W__SHIFT) & A3XX_VSC_PIPE_CONFIG_W__MASK;
  2128. }
  2129. #define A3XX_VSC_PIPE_CONFIG_H__MASK 0x0f000000
  2130. #define A3XX_VSC_PIPE_CONFIG_H__SHIFT 24
  2131. static inline uint32_t A3XX_VSC_PIPE_CONFIG_H(uint32_t val)
  2132. {
  2133. return ((val) << A3XX_VSC_PIPE_CONFIG_H__SHIFT) & A3XX_VSC_PIPE_CONFIG_H__MASK;
  2134. }
  2135. static inline uint32_t REG_A3XX_VSC_PIPE_DATA_ADDRESS(uint32_t i0) { return 0x00000c07 + 0x3*i0; }
  2136. static inline uint32_t REG_A3XX_VSC_PIPE_DATA_LENGTH(uint32_t i0) { return 0x00000c08 + 0x3*i0; }
  2137. #define REG_A3XX_VSC_BIN_CONTROL 0x00000c3c
  2138. #define A3XX_VSC_BIN_CONTROL_BINNING_ENABLE 0x00000001
  2139. #define REG_A3XX_UNKNOWN_0C3D 0x00000c3d
  2140. #define REG_A3XX_PC_PERFCOUNTER0_SELECT 0x00000c48
  2141. #define REG_A3XX_PC_PERFCOUNTER1_SELECT 0x00000c49
  2142. #define REG_A3XX_PC_PERFCOUNTER2_SELECT 0x00000c4a
  2143. #define REG_A3XX_PC_PERFCOUNTER3_SELECT 0x00000c4b
  2144. #define REG_A3XX_GRAS_TSE_DEBUG_ECO 0x00000c81
  2145. #define REG_A3XX_GRAS_PERFCOUNTER0_SELECT 0x00000c88
  2146. #define REG_A3XX_GRAS_PERFCOUNTER1_SELECT 0x00000c89
  2147. #define REG_A3XX_GRAS_PERFCOUNTER2_SELECT 0x00000c8a
  2148. #define REG_A3XX_GRAS_PERFCOUNTER3_SELECT 0x00000c8b
  2149. static inline uint32_t REG_A3XX_GRAS_CL_USER_PLANE(uint32_t i0) { return 0x00000ca0 + 0x4*i0; }
  2150. static inline uint32_t REG_A3XX_GRAS_CL_USER_PLANE_X(uint32_t i0) { return 0x00000ca0 + 0x4*i0; }
  2151. static inline uint32_t REG_A3XX_GRAS_CL_USER_PLANE_Y(uint32_t i0) { return 0x00000ca1 + 0x4*i0; }
  2152. static inline uint32_t REG_A3XX_GRAS_CL_USER_PLANE_Z(uint32_t i0) { return 0x00000ca2 + 0x4*i0; }
  2153. static inline uint32_t REG_A3XX_GRAS_CL_USER_PLANE_W(uint32_t i0) { return 0x00000ca3 + 0x4*i0; }
  2154. #define REG_A3XX_RB_GMEM_BASE_ADDR 0x00000cc0
  2155. #define REG_A3XX_RB_DEBUG_ECO_CONTROLS_ADDR 0x00000cc1
  2156. #define REG_A3XX_RB_PERFCOUNTER0_SELECT 0x00000cc6
  2157. #define REG_A3XX_RB_PERFCOUNTER1_SELECT 0x00000cc7
  2158. #define REG_A3XX_RB_FRAME_BUFFER_DIMENSION 0x00000ce0
  2159. #define A3XX_RB_FRAME_BUFFER_DIMENSION_WIDTH__MASK 0x00003fff
  2160. #define A3XX_RB_FRAME_BUFFER_DIMENSION_WIDTH__SHIFT 0
  2161. static inline uint32_t A3XX_RB_FRAME_BUFFER_DIMENSION_WIDTH(uint32_t val)
  2162. {
  2163. return ((val) << A3XX_RB_FRAME_BUFFER_DIMENSION_WIDTH__SHIFT) & A3XX_RB_FRAME_BUFFER_DIMENSION_WIDTH__MASK;
  2164. }
  2165. #define A3XX_RB_FRAME_BUFFER_DIMENSION_HEIGHT__MASK 0x0fffc000
  2166. #define A3XX_RB_FRAME_BUFFER_DIMENSION_HEIGHT__SHIFT 14
  2167. static inline uint32_t A3XX_RB_FRAME_BUFFER_DIMENSION_HEIGHT(uint32_t val)
  2168. {
  2169. return ((val) << A3XX_RB_FRAME_BUFFER_DIMENSION_HEIGHT__SHIFT) & A3XX_RB_FRAME_BUFFER_DIMENSION_HEIGHT__MASK;
  2170. }
  2171. #define REG_A3XX_HLSQ_PERFCOUNTER0_SELECT 0x00000e00
  2172. #define REG_A3XX_HLSQ_PERFCOUNTER1_SELECT 0x00000e01
  2173. #define REG_A3XX_HLSQ_PERFCOUNTER2_SELECT 0x00000e02
  2174. #define REG_A3XX_HLSQ_PERFCOUNTER3_SELECT 0x00000e03
  2175. #define REG_A3XX_HLSQ_PERFCOUNTER4_SELECT 0x00000e04
  2176. #define REG_A3XX_HLSQ_PERFCOUNTER5_SELECT 0x00000e05
  2177. #define REG_A3XX_UNKNOWN_0E43 0x00000e43
  2178. #define REG_A3XX_VFD_PERFCOUNTER0_SELECT 0x00000e44
  2179. #define REG_A3XX_VFD_PERFCOUNTER1_SELECT 0x00000e45
  2180. #define REG_A3XX_VPC_VPC_DEBUG_RAM_SEL 0x00000e61
  2181. #define REG_A3XX_VPC_VPC_DEBUG_RAM_READ 0x00000e62
  2182. #define REG_A3XX_VPC_PERFCOUNTER0_SELECT 0x00000e64
  2183. #define REG_A3XX_VPC_PERFCOUNTER1_SELECT 0x00000e65
  2184. #define REG_A3XX_UCHE_CACHE_MODE_CONTROL_REG 0x00000e82
  2185. #define REG_A3XX_UCHE_PERFCOUNTER0_SELECT 0x00000e84
  2186. #define REG_A3XX_UCHE_PERFCOUNTER1_SELECT 0x00000e85
  2187. #define REG_A3XX_UCHE_PERFCOUNTER2_SELECT 0x00000e86
  2188. #define REG_A3XX_UCHE_PERFCOUNTER3_SELECT 0x00000e87
  2189. #define REG_A3XX_UCHE_PERFCOUNTER4_SELECT 0x00000e88
  2190. #define REG_A3XX_UCHE_PERFCOUNTER5_SELECT 0x00000e89
  2191. #define REG_A3XX_UCHE_CACHE_INVALIDATE0_REG 0x00000ea0
  2192. #define A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR__MASK 0x0fffffff
  2193. #define A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR__SHIFT 0
  2194. static inline uint32_t A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR(uint32_t val)
  2195. {
  2196. return ((val) << A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR__SHIFT) & A3XX_UCHE_CACHE_INVALIDATE0_REG_ADDR__MASK;
  2197. }
  2198. #define REG_A3XX_UCHE_CACHE_INVALIDATE1_REG 0x00000ea1
  2199. #define A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR__MASK 0x0fffffff
  2200. #define A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR__SHIFT 0
  2201. static inline uint32_t A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR(uint32_t val)
  2202. {
  2203. return ((val) << A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR__SHIFT) & A3XX_UCHE_CACHE_INVALIDATE1_REG_ADDR__MASK;
  2204. }
  2205. #define A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE__MASK 0x30000000
  2206. #define A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE__SHIFT 28
  2207. static inline uint32_t A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE(enum a3xx_cache_opcode val)
  2208. {
  2209. return ((val) << A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE__SHIFT) & A3XX_UCHE_CACHE_INVALIDATE1_REG_OPCODE__MASK;
  2210. }
  2211. #define A3XX_UCHE_CACHE_INVALIDATE1_REG_ENTIRE_CACHE 0x80000000
  2212. #define REG_A3XX_UNKNOWN_0EA6 0x00000ea6
  2213. #define REG_A3XX_SP_PERFCOUNTER0_SELECT 0x00000ec4
  2214. #define REG_A3XX_SP_PERFCOUNTER1_SELECT 0x00000ec5
  2215. #define REG_A3XX_SP_PERFCOUNTER2_SELECT 0x00000ec6
  2216. #define REG_A3XX_SP_PERFCOUNTER3_SELECT 0x00000ec7
  2217. #define REG_A3XX_SP_PERFCOUNTER4_SELECT 0x00000ec8
  2218. #define REG_A3XX_SP_PERFCOUNTER5_SELECT 0x00000ec9
  2219. #define REG_A3XX_SP_PERFCOUNTER6_SELECT 0x00000eca
  2220. #define REG_A3XX_SP_PERFCOUNTER7_SELECT 0x00000ecb
  2221. #define REG_A3XX_UNKNOWN_0EE0 0x00000ee0
  2222. #define REG_A3XX_UNKNOWN_0F03 0x00000f03
  2223. #define REG_A3XX_TP_PERFCOUNTER0_SELECT 0x00000f04
  2224. #define REG_A3XX_TP_PERFCOUNTER1_SELECT 0x00000f05
  2225. #define REG_A3XX_TP_PERFCOUNTER2_SELECT 0x00000f06
  2226. #define REG_A3XX_TP_PERFCOUNTER3_SELECT 0x00000f07
  2227. #define REG_A3XX_TP_PERFCOUNTER4_SELECT 0x00000f08
  2228. #define REG_A3XX_TP_PERFCOUNTER5_SELECT 0x00000f09
  2229. #define REG_A3XX_VGT_CL_INITIATOR 0x000021f0
  2230. #define REG_A3XX_VGT_EVENT_INITIATOR 0x000021f9
  2231. #define REG_A3XX_VGT_DRAW_INITIATOR 0x000021fc
  2232. #define A3XX_VGT_DRAW_INITIATOR_PRIM_TYPE__MASK 0x0000003f
  2233. #define A3XX_VGT_DRAW_INITIATOR_PRIM_TYPE__SHIFT 0
  2234. static inline uint32_t A3XX_VGT_DRAW_INITIATOR_PRIM_TYPE(enum pc_di_primtype val)
  2235. {
  2236. return ((val) << A3XX_VGT_DRAW_INITIATOR_PRIM_TYPE__SHIFT) & A3XX_VGT_DRAW_INITIATOR_PRIM_TYPE__MASK;
  2237. }
  2238. #define A3XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__MASK 0x000000c0
  2239. #define A3XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__SHIFT 6
  2240. static inline uint32_t A3XX_VGT_DRAW_INITIATOR_SOURCE_SELECT(enum pc_di_src_sel val)
  2241. {
  2242. return ((val) << A3XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__SHIFT) & A3XX_VGT_DRAW_INITIATOR_SOURCE_SELECT__MASK;
  2243. }
  2244. #define A3XX_VGT_DRAW_INITIATOR_VIS_CULL__MASK 0x00000600
  2245. #define A3XX_VGT_DRAW_INITIATOR_VIS_CULL__SHIFT 9
  2246. static inline uint32_t A3XX_VGT_DRAW_INITIATOR_VIS_CULL(enum pc_di_vis_cull_mode val)
  2247. {
  2248. return ((val) << A3XX_VGT_DRAW_INITIATOR_VIS_CULL__SHIFT) & A3XX_VGT_DRAW_INITIATOR_VIS_CULL__MASK;
  2249. }
  2250. #define A3XX_VGT_DRAW_INITIATOR_INDEX_SIZE__MASK 0x00000800
  2251. #define A3XX_VGT_DRAW_INITIATOR_INDEX_SIZE__SHIFT 11
  2252. static inline uint32_t A3XX_VGT_DRAW_INITIATOR_INDEX_SIZE(enum pc_di_index_size val)
  2253. {
  2254. return ((val) << A3XX_VGT_DRAW_INITIATOR_INDEX_SIZE__SHIFT) & A3XX_VGT_DRAW_INITIATOR_INDEX_SIZE__MASK;
  2255. }
  2256. #define A3XX_VGT_DRAW_INITIATOR_NOT_EOP 0x00001000
  2257. #define A3XX_VGT_DRAW_INITIATOR_SMALL_INDEX 0x00002000
  2258. #define A3XX_VGT_DRAW_INITIATOR_PRE_DRAW_INITIATOR_ENABLE 0x00004000
  2259. #define A3XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__MASK 0xff000000
  2260. #define A3XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__SHIFT 24
  2261. static inline uint32_t A3XX_VGT_DRAW_INITIATOR_NUM_INSTANCES(uint32_t val)
  2262. {
  2263. return ((val) << A3XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__SHIFT) & A3XX_VGT_DRAW_INITIATOR_NUM_INSTANCES__MASK;
  2264. }
  2265. #define REG_A3XX_VGT_IMMED_DATA 0x000021fd
  2266. #define REG_A3XX_TEX_SAMP_0 0x00000000
  2267. #define A3XX_TEX_SAMP_0_CLAMPENABLE 0x00000001
  2268. #define A3XX_TEX_SAMP_0_MIPFILTER_LINEAR 0x00000002
  2269. #define A3XX_TEX_SAMP_0_XY_MAG__MASK 0x0000000c
  2270. #define A3XX_TEX_SAMP_0_XY_MAG__SHIFT 2
  2271. static inline uint32_t A3XX_TEX_SAMP_0_XY_MAG(enum a3xx_tex_filter val)
  2272. {
  2273. return ((val) << A3XX_TEX_SAMP_0_XY_MAG__SHIFT) & A3XX_TEX_SAMP_0_XY_MAG__MASK;
  2274. }
  2275. #define A3XX_TEX_SAMP_0_XY_MIN__MASK 0x00000030
  2276. #define A3XX_TEX_SAMP_0_XY_MIN__SHIFT 4
  2277. static inline uint32_t A3XX_TEX_SAMP_0_XY_MIN(enum a3xx_tex_filter val)
  2278. {
  2279. return ((val) << A3XX_TEX_SAMP_0_XY_MIN__SHIFT) & A3XX_TEX_SAMP_0_XY_MIN__MASK;
  2280. }
  2281. #define A3XX_TEX_SAMP_0_WRAP_S__MASK 0x000001c0
  2282. #define A3XX_TEX_SAMP_0_WRAP_S__SHIFT 6
  2283. static inline uint32_t A3XX_TEX_SAMP_0_WRAP_S(enum a3xx_tex_clamp val)
  2284. {
  2285. return ((val) << A3XX_TEX_SAMP_0_WRAP_S__SHIFT) & A3XX_TEX_SAMP_0_WRAP_S__MASK;
  2286. }
  2287. #define A3XX_TEX_SAMP_0_WRAP_T__MASK 0x00000e00
  2288. #define A3XX_TEX_SAMP_0_WRAP_T__SHIFT 9
  2289. static inline uint32_t A3XX_TEX_SAMP_0_WRAP_T(enum a3xx_tex_clamp val)
  2290. {
  2291. return ((val) << A3XX_TEX_SAMP_0_WRAP_T__SHIFT) & A3XX_TEX_SAMP_0_WRAP_T__MASK;
  2292. }
  2293. #define A3XX_TEX_SAMP_0_WRAP_R__MASK 0x00007000
  2294. #define A3XX_TEX_SAMP_0_WRAP_R__SHIFT 12
  2295. static inline uint32_t A3XX_TEX_SAMP_0_WRAP_R(enum a3xx_tex_clamp val)
  2296. {
  2297. return ((val) << A3XX_TEX_SAMP_0_WRAP_R__SHIFT) & A3XX_TEX_SAMP_0_WRAP_R__MASK;
  2298. }
  2299. #define A3XX_TEX_SAMP_0_ANISO__MASK 0x00038000
  2300. #define A3XX_TEX_SAMP_0_ANISO__SHIFT 15
  2301. static inline uint32_t A3XX_TEX_SAMP_0_ANISO(enum a3xx_tex_aniso val)
  2302. {
  2303. return ((val) << A3XX_TEX_SAMP_0_ANISO__SHIFT) & A3XX_TEX_SAMP_0_ANISO__MASK;
  2304. }
  2305. #define A3XX_TEX_SAMP_0_COMPARE_FUNC__MASK 0x00700000
  2306. #define A3XX_TEX_SAMP_0_COMPARE_FUNC__SHIFT 20
  2307. static inline uint32_t A3XX_TEX_SAMP_0_COMPARE_FUNC(enum adreno_compare_func val)
  2308. {
  2309. return ((val) << A3XX_TEX_SAMP_0_COMPARE_FUNC__SHIFT) & A3XX_TEX_SAMP_0_COMPARE_FUNC__MASK;
  2310. }
  2311. #define A3XX_TEX_SAMP_0_CUBEMAPSEAMLESSFILTOFF 0x01000000
  2312. #define A3XX_TEX_SAMP_0_UNNORM_COORDS 0x80000000
  2313. #define REG_A3XX_TEX_SAMP_1 0x00000001
  2314. #define A3XX_TEX_SAMP_1_LOD_BIAS__MASK 0x000007ff
  2315. #define A3XX_TEX_SAMP_1_LOD_BIAS__SHIFT 0
  2316. static inline uint32_t A3XX_TEX_SAMP_1_LOD_BIAS(float val)
  2317. {
  2318. return ((((int32_t)(val * 64.0))) << A3XX_TEX_SAMP_1_LOD_BIAS__SHIFT) & A3XX_TEX_SAMP_1_LOD_BIAS__MASK;
  2319. }
  2320. #define A3XX_TEX_SAMP_1_MAX_LOD__MASK 0x003ff000
  2321. #define A3XX_TEX_SAMP_1_MAX_LOD__SHIFT 12
  2322. static inline uint32_t A3XX_TEX_SAMP_1_MAX_LOD(float val)
  2323. {
  2324. return ((((uint32_t)(val * 64.0))) << A3XX_TEX_SAMP_1_MAX_LOD__SHIFT) & A3XX_TEX_SAMP_1_MAX_LOD__MASK;
  2325. }
  2326. #define A3XX_TEX_SAMP_1_MIN_LOD__MASK 0xffc00000
  2327. #define A3XX_TEX_SAMP_1_MIN_LOD__SHIFT 22
  2328. static inline uint32_t A3XX_TEX_SAMP_1_MIN_LOD(float val)
  2329. {
  2330. return ((((uint32_t)(val * 64.0))) << A3XX_TEX_SAMP_1_MIN_LOD__SHIFT) & A3XX_TEX_SAMP_1_MIN_LOD__MASK;
  2331. }
  2332. #define REG_A3XX_TEX_CONST_0 0x00000000
  2333. #define A3XX_TEX_CONST_0_TILED 0x00000001
  2334. #define A3XX_TEX_CONST_0_SRGB 0x00000004
  2335. #define A3XX_TEX_CONST_0_SWIZ_X__MASK 0x00000070
  2336. #define A3XX_TEX_CONST_0_SWIZ_X__SHIFT 4
  2337. static inline uint32_t A3XX_TEX_CONST_0_SWIZ_X(enum a3xx_tex_swiz val)
  2338. {
  2339. return ((val) << A3XX_TEX_CONST_0_SWIZ_X__SHIFT) & A3XX_TEX_CONST_0_SWIZ_X__MASK;
  2340. }
  2341. #define A3XX_TEX_CONST_0_SWIZ_Y__MASK 0x00000380
  2342. #define A3XX_TEX_CONST_0_SWIZ_Y__SHIFT 7
  2343. static inline uint32_t A3XX_TEX_CONST_0_SWIZ_Y(enum a3xx_tex_swiz val)
  2344. {
  2345. return ((val) << A3XX_TEX_CONST_0_SWIZ_Y__SHIFT) & A3XX_TEX_CONST_0_SWIZ_Y__MASK;
  2346. }
  2347. #define A3XX_TEX_CONST_0_SWIZ_Z__MASK 0x00001c00
  2348. #define A3XX_TEX_CONST_0_SWIZ_Z__SHIFT 10
  2349. static inline uint32_t A3XX_TEX_CONST_0_SWIZ_Z(enum a3xx_tex_swiz val)
  2350. {
  2351. return ((val) << A3XX_TEX_CONST_0_SWIZ_Z__SHIFT) & A3XX_TEX_CONST_0_SWIZ_Z__MASK;
  2352. }
  2353. #define A3XX_TEX_CONST_0_SWIZ_W__MASK 0x0000e000
  2354. #define A3XX_TEX_CONST_0_SWIZ_W__SHIFT 13
  2355. static inline uint32_t A3XX_TEX_CONST_0_SWIZ_W(enum a3xx_tex_swiz val)
  2356. {
  2357. return ((val) << A3XX_TEX_CONST_0_SWIZ_W__SHIFT) & A3XX_TEX_CONST_0_SWIZ_W__MASK;
  2358. }
  2359. #define A3XX_TEX_CONST_0_MIPLVLS__MASK 0x000f0000
  2360. #define A3XX_TEX_CONST_0_MIPLVLS__SHIFT 16
  2361. static inline uint32_t A3XX_TEX_CONST_0_MIPLVLS(uint32_t val)
  2362. {
  2363. return ((val) << A3XX_TEX_CONST_0_MIPLVLS__SHIFT) & A3XX_TEX_CONST_0_MIPLVLS__MASK;
  2364. }
  2365. #define A3XX_TEX_CONST_0_MSAATEX__MASK 0x00300000
  2366. #define A3XX_TEX_CONST_0_MSAATEX__SHIFT 20
  2367. static inline uint32_t A3XX_TEX_CONST_0_MSAATEX(enum a3xx_tex_msaa val)
  2368. {
  2369. return ((val) << A3XX_TEX_CONST_0_MSAATEX__SHIFT) & A3XX_TEX_CONST_0_MSAATEX__MASK;
  2370. }
  2371. #define A3XX_TEX_CONST_0_FMT__MASK 0x1fc00000
  2372. #define A3XX_TEX_CONST_0_FMT__SHIFT 22
  2373. static inline uint32_t A3XX_TEX_CONST_0_FMT(enum a3xx_tex_fmt val)
  2374. {
  2375. return ((val) << A3XX_TEX_CONST_0_FMT__SHIFT) & A3XX_TEX_CONST_0_FMT__MASK;
  2376. }
  2377. #define A3XX_TEX_CONST_0_NOCONVERT 0x20000000
  2378. #define A3XX_TEX_CONST_0_TYPE__MASK 0xc0000000
  2379. #define A3XX_TEX_CONST_0_TYPE__SHIFT 30
  2380. static inline uint32_t A3XX_TEX_CONST_0_TYPE(enum a3xx_tex_type val)
  2381. {
  2382. return ((val) << A3XX_TEX_CONST_0_TYPE__SHIFT) & A3XX_TEX_CONST_0_TYPE__MASK;
  2383. }
  2384. #define REG_A3XX_TEX_CONST_1 0x00000001
  2385. #define A3XX_TEX_CONST_1_HEIGHT__MASK 0x00003fff
  2386. #define A3XX_TEX_CONST_1_HEIGHT__SHIFT 0
  2387. static inline uint32_t A3XX_TEX_CONST_1_HEIGHT(uint32_t val)
  2388. {
  2389. return ((val) << A3XX_TEX_CONST_1_HEIGHT__SHIFT) & A3XX_TEX_CONST_1_HEIGHT__MASK;
  2390. }
  2391. #define A3XX_TEX_CONST_1_WIDTH__MASK 0x0fffc000
  2392. #define A3XX_TEX_CONST_1_WIDTH__SHIFT 14
  2393. static inline uint32_t A3XX_TEX_CONST_1_WIDTH(uint32_t val)
  2394. {
  2395. return ((val) << A3XX_TEX_CONST_1_WIDTH__SHIFT) & A3XX_TEX_CONST_1_WIDTH__MASK;
  2396. }
  2397. #define A3XX_TEX_CONST_1_FETCHSIZE__MASK 0xf0000000
  2398. #define A3XX_TEX_CONST_1_FETCHSIZE__SHIFT 28
  2399. static inline uint32_t A3XX_TEX_CONST_1_FETCHSIZE(enum a3xx_tex_fetchsize val)
  2400. {
  2401. return ((val) << A3XX_TEX_CONST_1_FETCHSIZE__SHIFT) & A3XX_TEX_CONST_1_FETCHSIZE__MASK;
  2402. }
  2403. #define REG_A3XX_TEX_CONST_2 0x00000002
  2404. #define A3XX_TEX_CONST_2_INDX__MASK 0x000001ff
  2405. #define A3XX_TEX_CONST_2_INDX__SHIFT 0
  2406. static inline uint32_t A3XX_TEX_CONST_2_INDX(uint32_t val)
  2407. {
  2408. return ((val) << A3XX_TEX_CONST_2_INDX__SHIFT) & A3XX_TEX_CONST_2_INDX__MASK;
  2409. }
  2410. #define A3XX_TEX_CONST_2_PITCH__MASK 0x3ffff000
  2411. #define A3XX_TEX_CONST_2_PITCH__SHIFT 12
  2412. static inline uint32_t A3XX_TEX_CONST_2_PITCH(uint32_t val)
  2413. {
  2414. return ((val) << A3XX_TEX_CONST_2_PITCH__SHIFT) & A3XX_TEX_CONST_2_PITCH__MASK;
  2415. }
  2416. #define A3XX_TEX_CONST_2_SWAP__MASK 0xc0000000
  2417. #define A3XX_TEX_CONST_2_SWAP__SHIFT 30
  2418. static inline uint32_t A3XX_TEX_CONST_2_SWAP(enum a3xx_color_swap val)
  2419. {
  2420. return ((val) << A3XX_TEX_CONST_2_SWAP__SHIFT) & A3XX_TEX_CONST_2_SWAP__MASK;
  2421. }
  2422. #define REG_A3XX_TEX_CONST_3 0x00000003
  2423. #define A3XX_TEX_CONST_3_LAYERSZ1__MASK 0x0001ffff
  2424. #define A3XX_TEX_CONST_3_LAYERSZ1__SHIFT 0
  2425. static inline uint32_t A3XX_TEX_CONST_3_LAYERSZ1(uint32_t val)
  2426. {
  2427. return ((val >> 12) << A3XX_TEX_CONST_3_LAYERSZ1__SHIFT) & A3XX_TEX_CONST_3_LAYERSZ1__MASK;
  2428. }
  2429. #define A3XX_TEX_CONST_3_DEPTH__MASK 0x0ffe0000
  2430. #define A3XX_TEX_CONST_3_DEPTH__SHIFT 17
  2431. static inline uint32_t A3XX_TEX_CONST_3_DEPTH(uint32_t val)
  2432. {
  2433. return ((val) << A3XX_TEX_CONST_3_DEPTH__SHIFT) & A3XX_TEX_CONST_3_DEPTH__MASK;
  2434. }
  2435. #define A3XX_TEX_CONST_3_LAYERSZ2__MASK 0xf0000000
  2436. #define A3XX_TEX_CONST_3_LAYERSZ2__SHIFT 28
  2437. static inline uint32_t A3XX_TEX_CONST_3_LAYERSZ2(uint32_t val)
  2438. {
  2439. return ((val >> 12) << A3XX_TEX_CONST_3_LAYERSZ2__SHIFT) & A3XX_TEX_CONST_3_LAYERSZ2__MASK;
  2440. }
  2441. #endif /* A3XX_XML */