Path: blob/21.2-virgl/src/freedreno/isa/ir3-cat5.xml
4564 views
<?xml version="1.0" encoding="UTF-8"?>1<!--2Copyright © 2020 Google, Inc.34Permission is hereby granted, free of charge, to any person obtaining a5copy of this software and associated documentation files (the "Software"),6to deal in the Software without restriction, including without limitation7the rights to use, copy, modify, merge, publish, distribute, sublicense,8and/or sell copies of the Software, and to permit persons to whom the9Software is furnished to do so, subject to the following conditions:1011The above copyright notice and this permission notice (including the next12paragraph) shall be included in all copies or substantial portions of the13Software.1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL18THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21SOFTWARE.22-->2324<isa>2526<!--27Cat5 Instructions: texture instructions28-->2930<bitset name="#cat5-s2en-bindless-base" size="1">31<doc>32The BASE field is actually split across BASE_LO and BASE_HI,33but '.baseN' should only appear in the bindless case.. the34easiest way to accomplish that is by splitting it out into a35bitset. We just arbitrarily map this to BASE_LO36</doc>37<override>38<expr>{BINDLESS}</expr>39<display>40.base{BASE}41</display>42</override>43<display/>44<field name="BASE_LO" pos="0" type="uint"/>45<derived name="BASE" type="uint">46<expr>({BASE_HI} * 2) | {BASE_LO}</expr>47</derived>48<encode type="struct ir3_instruction *">49<map name="BASE_LO">src->cat5.tex_base & 0x1</map>50</encode>51</bitset>5253<bitset name="#instruction-cat5" extends="#instruction">54<override>55<expr>{S2EN_BINDLESS}</expr>56<doc>57The s2en (indirect) or bindless case58</doc>59<display>60{SY}{JP}{NAME}{3D}{A}{O}{P}{S}{S2EN}{UNIFORM}{NONUNIFORM}{BASE} {TYPE}({WRMASK}){DST_HALF}{DST}{SRC1}{SRC2}{SRC3}{A1}61</display>62<field name="BASE_HI" low="19" high="20" type="uint"/>63<field name="SRC3" low="21" high="28" type="#cat5-src3">64<param name="BINDLESS"/>65<param name="DESC_MODE"/>66<param name="HAS_SAMP"/>67<param name="HAS_TEX"/>68</field>69<field name="DESC_MODE" low="29" high="31" type="#cat5-s2en-bindless-desc-mode"/>70<field name="BASE" pos="47" type="#cat5-s2en-bindless-base">71<param name="BINDLESS"/>72<param name="BASE_HI"/>73</field>74<derived name="BINDLESS" expr="#cat5-s2enb-is-bindless" type="bool"/>75<derived name="S2EN" expr="#cat5-s2enb-is-indirect" type="bool" display=".s2en"/>76<derived name="UNIFORM" expr="#cat5-s2enb-is-uniform" type="bool" display=".uniform"/>77<derived name="NONUNIFORM" expr="#cat5-s2enb-is-nonuniform" type="bool" display=".nonuniform"/>78<derived name="A1" expr="#cat5-s2enb-uses_a1" type="bool" display=", a1.x"/>79</override>8081<doc>82The "normal" case, ie. not s2en (indirect) and/or bindless83</doc>84<display>85{SY}{JP}{NAME}{3D}{A}{O}{P}{S} {TYPE}({WRMASK}){DST_HALF}{DST}{SRC1}{SRC2}{SAMP}{TEX}86</display>87<derived name="DST_HALF" type="bool" display="h">88<expr>89({TYPE} == 0) /* f16 */ ||90({TYPE} == 2) /* u16 */ ||91({TYPE} == 4) /* s16 */ ||92({TYPE} == 6) /* u8 */ ||93({TYPE} == 7) /* s8 */94</expr>95</derived>96<field name="FULL" pos="0" type="bool"/>97<derived name="HALF" expr="#multisrc-half" type="bool" display="h"/>98<field name="SRC1" low="1" high="8" type="#cat5-src1">99<param name="NUM_SRC"/>100<param name="HALF"/>101</field>102<field name="SRC2" low="9" high="16" type="#cat5-src2">103<param name="NUM_SRC"/>104<param name="HALF"/>105<param name="O"/>106</field>107<!--108TODO remainder of first 32b differ depending on s2en/bindless..109possibly use overrides? Need to sort-out how to display..110111Note b17 seems to show up in some blob traces (samgpN), need112to figure out what this bit does113-->114<pattern low="17" high="18">0x</pattern>115<assert low="19" high="20">00</assert> <!-- BASE_HI -->116<field name="SAMP" low="21" high="24" type="#cat5-samp">117<param name="HAS_SAMP"/>118</field>119<field name="TEX" low="25" high="31" type="#cat5-tex">120<param name="HAS_TEX"/>121</field>122123<field name="DST" low="32" high="39" type="#reg-gpr"/>124<field name="WRMASK" low="40" high="43" type="#wrmask"/>125<field name="TYPE" low="44" high="46" type="#cat5-type">126<param name="HAS_TYPE"/>127</field>128<assert pos="47">0</assert> <!-- BASE_LO -->129<field name="3D" pos="48" type="bool" display=".3d"/>130<field name="A" pos="49" type="bool" display=".a"/>131<field name="S" pos="50" type="bool" display=".s"/>132<field name="S2EN_BINDLESS" pos="51" type="bool"/>133<field name="O" pos="52" type="bool" display=".o"/>134<field name="P" pos="53" type="bool" display=".p"/>135<!-- OPC -->136<field name="JP" pos="59" type="bool" display="(jp)"/>137<field name="SY" pos="60" type="bool" display="(sy)"/>138<pattern low="61" high="63">101</pattern> <!-- cat5 -->139<encode>140<map name="FULL">extract_cat5_FULL(src)</map>141<map name="TEX">src</map>142<map name="SAMP">src</map>143<map name="WRMASK">src->dsts[0]->wrmask</map>144<map name="BASE">src</map>145<map name="TYPE">src</map>146<map name="BASE_HI">src->cat5.tex_base >> 1</map>147<map name="3D">!!(src->flags & IR3_INSTR_3D)</map>148<map name="A">!!(src->flags & IR3_INSTR_A)</map>149<map name="S">!!(src->flags & IR3_INSTR_S)</map>150<map name="S2EN_BINDLESS">!!(src->flags & (IR3_INSTR_S2EN | IR3_INSTR_B))</map>151<map name="O">!!(src->flags & IR3_INSTR_O)</map>152<map name="P">!!(src->flags & IR3_INSTR_P)</map>153<map name="DESC_MODE">extract_cat5_DESC_MODE(src)</map>154<!--155TODO the src order is currently a bit messy due to ir3 using srcs[0]156for s2en src in the s2en case157-->158<map name="SRC1">extract_cat5_SRC(src, 0)</map>159<map name="SRC2">extract_cat5_SRC(src, 1)</map>160<map name="SRC3">(src->srcs_count > 0) ? src->srcs[0] : NULL</map>161</encode>162</bitset>163164<bitset name="isam" extends="#instruction-cat5">165<pattern low="54" high="58">00000</pattern>166<derived name="NUM_SRC" expr="#one" type="uint"/>167<derived name="HAS_SAMP" expr="#true" type="bool"/>168<derived name="HAS_TEX" expr="#true" type="bool"/>169<derived name="HAS_TYPE" expr="#true" type="bool"/>170</bitset>171172<bitset name="isaml" extends="#instruction-cat5">173<pattern low="54" high="58">00001</pattern>174<derived name="NUM_SRC" expr="#two" type="uint"/>175<derived name="HAS_SAMP" expr="#true" type="bool"/>176<derived name="HAS_TEX" expr="#true" type="bool"/>177<derived name="HAS_TYPE" expr="#true" type="bool"/>178</bitset>179180<bitset name="isamm" extends="#instruction-cat5">181<pattern low="54" high="58">00010</pattern>182<derived name="NUM_SRC" expr="#one" type="uint"/>183<derived name="HAS_SAMP" expr="#true" type="bool"/>184<derived name="HAS_TEX" expr="#true" type="bool"/>185<derived name="HAS_TYPE" expr="#true" type="bool"/>186</bitset>187188<bitset name="sam" extends="#instruction-cat5">189<pattern low="54" high="58">00011</pattern>190<derived name="NUM_SRC" expr="#one" type="uint"/>191<derived name="HAS_SAMP" expr="#true" type="bool"/>192<derived name="HAS_TEX" expr="#true" type="bool"/>193<derived name="HAS_TYPE" expr="#true" type="bool"/>194</bitset>195196<bitset name="samb" extends="#instruction-cat5">197<pattern low="54" high="58">00100</pattern>198<derived name="NUM_SRC" expr="#two" type="uint"/>199<derived name="HAS_SAMP" expr="#true" type="bool"/>200<derived name="HAS_TEX" expr="#true" type="bool"/>201<derived name="HAS_TYPE" expr="#true" type="bool"/>202</bitset>203204<bitset name="saml" extends="#instruction-cat5">205<pattern low="54" high="58">00101</pattern>206<derived name="NUM_SRC" expr="#two" type="uint"/>207<derived name="HAS_SAMP" expr="#true" type="bool"/>208<derived name="HAS_TEX" expr="#true" type="bool"/>209<derived name="HAS_TYPE" expr="#true" type="bool"/>210</bitset>211212<bitset name="samgq" extends="#instruction-cat5">213<pattern low="54" high="58">00110</pattern>214<derived name="NUM_SRC" expr="#one" type="uint"/>215<derived name="HAS_SAMP" expr="#true" type="bool"/>216<derived name="HAS_TEX" expr="#true" type="bool"/>217<derived name="HAS_TYPE" expr="#true" type="bool"/>218</bitset>219220<bitset name="getlod" extends="#instruction-cat5">221<pattern low="54" high="58">00111</pattern>222<derived name="NUM_SRC" expr="#one" type="uint"/>223<derived name="HAS_SAMP" expr="#true" type="bool"/>224<derived name="HAS_TEX" expr="#true" type="bool"/>225<derived name="HAS_TYPE" expr="#true" type="bool"/>226</bitset>227228<bitset name="conv" extends="#instruction-cat5">229<pattern low="54" high="58">01000</pattern>230<derived name="NUM_SRC" expr="#two" type="uint"/>231<derived name="HAS_SAMP" expr="#true" type="bool"/>232<derived name="HAS_TEX" expr="#true" type="bool"/>233<derived name="HAS_TYPE" expr="#true" type="bool"/>234</bitset>235236<bitset name="convm" extends="#instruction-cat5">237<pattern low="54" high="58">01001</pattern>238<derived name="NUM_SRC" expr="#two" type="uint"/>239<derived name="HAS_SAMP" expr="#true" type="bool"/>240<derived name="HAS_TEX" expr="#true" type="bool"/>241<derived name="HAS_TYPE" expr="#true" type="bool"/>242</bitset>243244<bitset name="getsize" extends="#instruction-cat5">245<pattern low="54" high="58">01010</pattern>246<derived name="NUM_SRC" expr="#one" type="uint"/>247<derived name="HAS_SAMP" expr="#false" type="bool"/>248<derived name="HAS_TEX" expr="#true" type="bool"/>249<derived name="HAS_TYPE" expr="#true" type="bool"/>250</bitset>251252<bitset name="getbuf" extends="#instruction-cat5">253<pattern low="54" high="58">01011</pattern>254<derived name="NUM_SRC" expr="#zero" type="uint"/>255<derived name="HAS_SAMP" expr="#false" type="bool"/>256<derived name="HAS_TEX" expr="#true" type="bool"/>257<derived name="HAS_TYPE" expr="#true" type="bool"/>258</bitset>259260<bitset name="getpos" extends="#instruction-cat5">261<pattern low="54" high="58">01100</pattern>262<derived name="NUM_SRC" expr="#one" type="uint"/>263<derived name="HAS_SAMP" expr="#false" type="bool"/>264<derived name="HAS_TEX" expr="#true" type="bool"/>265<derived name="HAS_TYPE" expr="#true" type="bool"/>266</bitset>267268<bitset name="getinfo" extends="#instruction-cat5">269<pattern low="54" high="58">01101</pattern>270<derived name="NUM_SRC" expr="#zero" type="uint"/>271<derived name="HAS_SAMP" expr="#false" type="bool"/>272<derived name="HAS_TEX" expr="#true" type="bool"/>273<derived name="HAS_TYPE" expr="#true" type="bool"/>274</bitset>275276<bitset name="dsx" extends="#instruction-cat5">277<pattern low="54" high="58">01110</pattern>278<derived name="NUM_SRC" expr="#one" type="uint"/>279<derived name="HAS_SAMP" expr="#false" type="bool"/>280<derived name="HAS_TEX" expr="#false" type="bool"/>281<derived name="HAS_TYPE" expr="#true" type="bool"/>282</bitset>283284<bitset name="dsy" extends="#instruction-cat5">285<pattern low="54" high="58">01111</pattern>286<derived name="NUM_SRC" expr="#one" type="uint"/>287<derived name="HAS_SAMP" expr="#false" type="bool"/>288<derived name="HAS_TEX" expr="#false" type="bool"/>289<derived name="HAS_TYPE" expr="#true" type="bool"/>290</bitset>291292<bitset name="gather4r" extends="#instruction-cat5">293<pattern low="54" high="58">10000</pattern>294<derived name="NUM_SRC" expr="#one" type="uint"/>295<derived name="HAS_SAMP" expr="#true" type="bool"/>296<derived name="HAS_TEX" expr="#true" type="bool"/>297<derived name="HAS_TYPE" expr="#true" type="bool"/>298</bitset>299300<bitset name="gather4g" extends="#instruction-cat5">301<pattern low="54" high="58">10001</pattern>302<derived name="NUM_SRC" expr="#one" type="uint"/>303<derived name="HAS_SAMP" expr="#true" type="bool"/>304<derived name="HAS_TEX" expr="#true" type="bool"/>305<derived name="HAS_TYPE" expr="#true" type="bool"/>306</bitset>307308<bitset name="gather4b" extends="#instruction-cat5">309<pattern low="54" high="58">10010</pattern>310<derived name="NUM_SRC" expr="#one" type="uint"/>311<derived name="HAS_SAMP" expr="#true" type="bool"/>312<derived name="HAS_TEX" expr="#true" type="bool"/>313<derived name="HAS_TYPE" expr="#true" type="bool"/>314</bitset>315316<bitset name="gather4a" extends="#instruction-cat5">317<pattern low="54" high="58">10011</pattern>318<derived name="NUM_SRC" expr="#one" type="uint"/>319<derived name="HAS_SAMP" expr="#true" type="bool"/>320<derived name="HAS_TEX" expr="#true" type="bool"/>321<derived name="HAS_TYPE" expr="#true" type="bool"/>322</bitset>323324<bitset name="samgp0" extends="#instruction-cat5">325<pattern low="54" high="58">10100</pattern>326<derived name="NUM_SRC" expr="#one" type="uint"/>327<derived name="HAS_SAMP" expr="#true" type="bool"/>328<derived name="HAS_TEX" expr="#true" type="bool"/>329<derived name="HAS_TYPE" expr="#true" type="bool"/>330</bitset>331332<bitset name="samgp1" extends="#instruction-cat5">333<pattern low="54" high="58">10101</pattern>334<derived name="NUM_SRC" expr="#one" type="uint"/>335<derived name="HAS_SAMP" expr="#true" type="bool"/>336<derived name="HAS_TEX" expr="#true" type="bool"/>337<derived name="HAS_TYPE" expr="#true" type="bool"/>338</bitset>339340<bitset name="samgp2" extends="#instruction-cat5">341<pattern low="54" high="58">10110</pattern>342<derived name="NUM_SRC" expr="#one" type="uint"/>343<derived name="HAS_SAMP" expr="#true" type="bool"/>344<derived name="HAS_TEX" expr="#true" type="bool"/>345<derived name="HAS_TYPE" expr="#true" type="bool"/>346</bitset>347348<bitset name="samgp3" extends="#instruction-cat5">349<pattern low="54" high="58">10111</pattern>350<derived name="NUM_SRC" expr="#one" type="uint"/>351<derived name="HAS_SAMP" expr="#true" type="bool"/>352<derived name="HAS_TEX" expr="#true" type="bool"/>353<derived name="HAS_TYPE" expr="#true" type="bool"/>354</bitset>355356<bitset name="dsxpp.1" extends="#instruction-cat5">357<pattern low="54" high="58">11000</pattern>358<derived name="NUM_SRC" expr="#one" type="uint"/>359<derived name="HAS_SAMP" expr="#false" type="bool"/>360<derived name="HAS_TEX" expr="#false" type="bool"/>361<derived name="HAS_TYPE" expr="#false" type="bool"/>362</bitset>363364<bitset name="dsypp.1" extends="#instruction-cat5">365<pattern low="54" high="58">11001</pattern>366<derived name="NUM_SRC" expr="#one" type="uint"/>367<derived name="HAS_SAMP" expr="#false" type="bool"/>368<derived name="HAS_TEX" expr="#false" type="bool"/>369<derived name="HAS_TYPE" expr="#false" type="bool"/>370</bitset>371372<bitset name="rgetpos" extends="#instruction-cat5">373<pattern low="54" high="58">11010</pattern>374<derived name="NUM_SRC" expr="#one" type="uint"/>375<derived name="HAS_SAMP" expr="#false" type="bool"/>376<derived name="HAS_TEX" expr="#false" type="bool"/>377<derived name="HAS_TYPE" expr="#true" type="bool"/>378</bitset>379380<bitset name="rgetinfo" extends="#instruction-cat5">381<pattern low="54" high="58">11011</pattern>382<derived name="NUM_SRC" expr="#zero" type="uint"/>383<derived name="HAS_SAMP" expr="#false" type="bool"/>384<derived name="HAS_TEX" expr="#false" type="bool"/>385<derived name="HAS_TYPE" expr="#true" type="bool"/>386</bitset>387388389<!--390All the magic for conditionally displaying various srcs, etc391for the non-bindless / non-indirect case, or things that are in392common with the bindless / indirect case393-->394395<bitset name="#cat5-src1" size="8">396<override>397<expr>{NUM_SRC} > 0</expr>398<display>399, {HALF}{SRC}400</display>401<field name="SRC" low="0" high="7" type="#reg-gpr"/>402</override>403<display/>404<assert low="0" high="7">00000000</assert>405<encode type="struct ir3_register *">406<map name="SRC">src</map>407</encode>408</bitset>409410<bitset name="#cat5-src2" size="8">411<override>412<expr>{O} || ({NUM_SRC} > 1)</expr>413<display>414, {HALF}{SRC}415</display>416<field name="SRC" low="0" high="7" type="#reg-gpr"/>417</override>418<display/>419<assert low="0" high="7">00000000</assert>420<encode type="struct ir3_register *">421<map name="SRC">src</map>422</encode>423</bitset>424425<bitset name="#cat5-samp" size="4">426<override>427<expr>{HAS_SAMP}</expr>428<display>429, s#{SAMP}430</display>431<field name="SAMP" low="0" high="3" type="uint"/>432</override>433<display/>434<assert low="0" high="3">0000</assert>435<encode type="struct ir3_instruction *">436<map name="SAMP">src->cat5.samp</map>437</encode>438</bitset>439440<bitset name="#cat5-samp-s2en-bindless-a1" size="8">441<doc>s2en (indirect) / bindless case with a1.x has 8b samp</doc>442<override>443<expr>{HAS_SAMP}</expr>444<display>445, s#{SAMP}446</display>447<field name="SAMP" low="0" high="7" type="uint"/>448</override>449<display/>450<assert low="0" high="7">00000000</assert>451<encode type="struct ir3_instruction *">452<map name="SAMP">src->cat5.samp</map>453</encode>454</bitset>455456<bitset name="#cat5-tex" size="7">457<override>458<expr>{HAS_TEX}</expr>459<display>460, t#{TEX}461</display>462<field name="TEX" low="0" high="6" type="uint"/>463</override>464<display/>465<assert low="0" high="6">0000000</assert>466<encode type="struct ir3_instruction *">467<map name="TEX">src->cat5.tex</map>468</encode>469</bitset>470471<bitset name="#cat5-tex-s2en-bindless" size="4">472<doc>s2en (indirect) / bindless case only has 4b tex</doc>473<override>474<expr>{HAS_TEX}</expr>475<display>476, t#{TEX}477</display>478<field name="TEX" low="0" high="3" type="uint"/>479</override>480<display/>481<assert low="0" high="3">0000</assert>482<encode type="struct ir3_instruction *">483<!--484TODO properly decouple the encoding from ir3 IR in this485case.. the IR has no business knowing how this gets486encoded into "SRC3"..487-->488<map name="TEX">src->cat5.samp >> 4</map>489</encode>490</bitset>491492<bitset name="#cat5-type" size="3">493<display/>494<override>495<expr>{HAS_TYPE}</expr>496<display>497({TYPE})498</display>499</override>500<field name="TYPE" low="0" high="2" type="#type"/>501<encode type="struct ir3_instruction *">502<!--503Normally we only encode fields that have visible impact on504the decoded disasm, but the type field is one of those505special exceptions506-->507<map name="TYPE" force="true">src->cat5.type</map>508</encode>509</bitset>510511<!--512Helpers/bitsets/etc for dealing with the bindless/indirect case:513-->514515<enum name="#cat5-s2en-bindless-desc-mode">516<doc>517We don't actually display this enum, but it is useful to518document the various cases519520TODO we should probably have an option for uniforms w/out521display strings, but which have 'C' names that can be used522to generate header that the compiler can use523</doc>524<value val="0" display="CAT5_NONUNIFORM">525<doc>526Use traditional GL binding model, get texture and sampler index527from src3 which is not presumed to be uniform. This is528backwards-compatible with earlier generations, where this field was529always 0 and nonuniform-indexed sampling always worked.530</doc>531</value>532<value val="1" display="CAT5_BINDLESS_A1_UNIFORM">533<doc>534The sampler base comes from the low 3 bits of a1.x, and the sampler535and texture index come from src3 which is presumed to be uniform.536</doc>537</value>538<value val="2" display="CAT5_BINDLESS_NONUNIFORM">539<doc>540The texture and sampler share the same base, and the sampler and541texture index come from src3 which is *not* presumed to be uniform.542</doc>543</value>544<value val="3" display="CAT5_BINDLESS_A1_NONUNIFORM">545<doc>546The sampler base comes from the low 3 bits of a1.x, and the sampler547and texture index come from src3 which is *not* presumed to be548uniform.549</doc>550</value>551<value val="4" display="CAT5_UNIFORM">552<doc>553Use traditional GL binding model, get texture and sampler index554from src3 which is presumed to be uniform.555</doc>556</value>557<value val="5" display="CAT5_BINDLESS_UNIFORM">558<doc>559The texture and sampler share the same base, and the sampler and560texture index come from src3 which is presumed to be uniform.561</doc>562</value>563<value val="6" display="CAT5_BINDLESS_IMM">564<doc>565The texture and sampler share the same base, get sampler index from low5664 bits of src3 and texture index from high 4 bits.567</doc>568</value>569<value val="7" display="CAT5_BINDLESS_A1_IMM">570<doc>571The sampler base comes from the low 3 bits of a1.x, and the texture572index comes from the next 8 bits of a1.x. The sampler index is an573immediate in src3.574</doc>575</value>576</enum>577578<!-- Helper to map s2en/bindless DESC_MODE to whether it is an indirect mode -->579<expr name="#cat5-s2enb-is-indirect">580{DESC_MODE} < 6 /* CAT5_BINDLESS_IMM */581</expr>582583<!-- Helper to map s2en/bindless DESC_MODE to whether it is a bindless mode -->584<expr name="#cat5-s2enb-is-bindless">585({DESC_MODE} == 1) /* CAT5_BINDLESS_A1_UNIFORM */ ||586({DESC_MODE} == 2) /* CAT5_BINDLESS_NONUNIFORM */ ||587({DESC_MODE} == 3) /* CAT5_BINDLESS_A1_NONUNIFORM */ ||588({DESC_MODE} == 5) /* CAT5_BINDLESS_UNIFORM */ ||589({DESC_MODE} == 6) /* CAT5_BINDLESS_IMM */ ||590({DESC_MODE} == 7) /* CAT5_BINDLESS_A1_IMM */591</expr>592593<!-- Helper to map s2en/bindless DESC_MODE to whether it uses a1.x -->594<expr name="#cat5-s2enb-uses_a1">595({DESC_MODE} == 1) /* CAT5_BINDLESS_A1_UNIFORM */ ||596({DESC_MODE} == 3) /* CAT5_BINDLESS_A1_NONUNIFORM */ ||597({DESC_MODE} == 7) /* CAT5_BINDLESS_A1_IMM */598</expr>599600<!-- Helper to map s2en/bindless DESC_MODE to whether it is uniform (flow control) mode -->601<expr name="#cat5-s2enb-is-uniform">602({DESC_MODE} == 1) /* CAT5_BINDLESS_A1_UNIFORM */ ||603({DESC_MODE} == 4) /* CAT5_UNIFORM */ ||604({DESC_MODE} == 5) /* CAT5_BINDLESS_UNIFORM */605</expr>606607<!-- Helper to map s2en/bindless DESC_MODE to whether it is non-uniform mode608Note that it returns only for bindless for now, since we need to figure out bindful609uniform/nonuniform mode correctly. See TODO in extract_cat5_DESC_MODE in encode.c -->610<expr name="#cat5-s2enb-is-nonuniform">611({DESC_MODE} == 2) /* CAT5_BINDLESS_NONUNIFORM */ ||612({DESC_MODE} == 3) /* CAT5_BINDLESS_A1_NONUNIFORM */613</expr>614615<bitset name="#cat5-src3" size="8">616<doc>bindless/indirect src3, which can either be GPR or samp/tex</doc>617<override expr="#cat5-s2enb-is-indirect">618<display>619, {SRC_HALF}{SRC}620</display>621<field name="SRC" low="0" high="7" type="#reg-gpr"/>622<derived name="SRC_HALF" type="bool" display="h">623<expr>!{BINDLESS}</expr>624</derived>625</override>626<override expr="#cat5-s2enb-uses_a1">627<doc>628In the case that a1.x is used, all 8 bits encode sampler629</doc>630<display>631{SAMP}632</display>633<field name="SAMP" low="0" high="7" type="#cat5-samp-s2en-bindless-a1">634<param name="HAS_SAMP"/>635</field>636</override>637<display>638{SAMP}{TEX}639</display>640<field name="SAMP" low="0" high="3" type="#cat5-samp">641<param name="HAS_SAMP"/>642</field>643<field name="TEX" low="4" high="7" type="#cat5-tex-s2en-bindless">644<param name="HAS_TEX"/>645</field>646<encode type="struct ir3_register *">647<map name="SAMP">s->instr</map>648<map name="TEX">s->instr</map>649<map name="SRC">src</map>650</encode>651</bitset>652653</isa>654655656