a3xx.xml.h 126 KB

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