freedreno/a6xx: Add UNK fields to CP_REG_TEST and CP_COND_REG_EXEC
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Thu, 14 Apr 2022 14:15:49 +0000 (17:15 +0300)
committerMarge Bot <emma+marge@anholt.net>
Fri, 29 Apr 2022 09:29:55 +0000 (09:29 +0000)
Their meaning is unknown, however they DO change the behavior.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15974>

src/freedreno/registers/adreno/adreno_pm4.xml

index 7b89870..0b3bf0f 100644 (file)
@@ -1604,6 +1604,13 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
                <bitfield name="BIT" low="20" high="24" type="uint"/>
                <!-- execute CP_WAIT_FOR_ME beforehand -->
                <bitfield name="WAIT_FOR_ME" pos="25" type="boolean"/>
+               <!--
+                       Appears only in:
+                               opcode: CP_REG_TEST (39) (4 dwords)
+                                               { REG = 0 | BIT = 0 | WAIT_FOR_ME | UNK31 }
+                       Seem to force CP_REG_TEST to write false
+                -->
+               <bitfield name="UNK31" pos="31" type="boolean"/>
        </reg32>
 </domain>
 
@@ -1621,6 +1628,16 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
                <bitfield name="REG0" low="0" high="17" type="hex"/>
 
                <!--
+                       Blob uses them for vkCmdClearAttachments in gmem mode. Examples:
+                               opcode: CP_COND_REG_EXEC (47) (3 dwords)
+                                               { REG0 = 0 | MODE = PRED_TEST | 0x140000 }
+                               opcode: CP_COND_REG_EXEC (47) (3 dwords)
+                                               { REG0 = 0 | MODE = PRED_TEST | 0x100000 }
+               -->
+               <bitfield name="UNK18" pos="18" varset="chip" variants="A6XX-" type="boolean"/>
+               <bitfield name="UNK20" pos="20" varset="chip" variants="A6XX-" type="boolean"/>
+
+               <!--
                        Note: these bits have the same meaning, and use the same
                        internal mechanism as the bits in CP_SET_DRAW_STATE.
                        When RENDER_MODE is selected, they're used as