freedreno/registers: Fix RB_A2D_DEST_FLAG_BUFFER_PITCH

We were using the old-style RB_COLOR_FLAG_BUFFER_PITCH builders for
this.  The new cs builders don't allow that slop.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36589>
This commit is contained in:
Rob Clark
2025-07-30 11:52:47 -07:00
committed by Marge Bot
parent a22391632a
commit 5635f2769f
5 changed files with 29 additions and 31 deletions
+10 -12
View File
@@ -1652,10 +1652,13 @@ by a particular renderpass/blit.
<!-- array-pitch is size of layer -->
<reg32 offset="0x88db" name="RB_RESOLVE_SYSTEM_BUFFER_ARRAY_PITCH" low="0" high="28" shr="6" type="uint" usage="rp_blit"/>
<reg64 offset="0x88dc" name="RB_RESOLVE_SYSTEM_FLAG_BUFFER_BASE" type="waddress" align="64" usage="rp_blit"/>
<reg32 offset="0x88de" name="RB_RESOLVE_SYSTEM_FLAG_BUFFER_PITCH" usage="rp_blit">
<bitset name="a6xx_flag_buffer_pitch" inline="yes">
<bitfield name="PITCH" low="0" high="10" shr="6" type="uint"/>
<bitfield name="ARRAY_PITCH" low="11" high="27" shr="7" type="uint"/>
</reg32>
<bitfield name="ARRAY_PITCH" low="11" high="28" shr="7" type="uint"/>
</bitset>
<reg32 offset="0x88de" name="RB_RESOLVE_SYSTEM_FLAG_BUFFER_PITCH" type="a6xx_flag_buffer_pitch" usage="rp_blit"/>
<reg32 offset="0x88df" name="RB_RESOLVE_CLEAR_COLOR_DW0" usage="rp_blit"/>
<reg32 offset="0x88e0" name="RB_RESOLVE_CLEAR_COLOR_DW1" usage="rp_blit"/>
@@ -1728,10 +1731,7 @@ by a particular renderpass/blit.
<reg32 offset="0x88f0" name="RB_UNKNOWN_88F0" low="0" high="11" usage="cmd"/>
<!-- could be for separate stencil? (or may not be a flag buffer at all) -->
<reg64 offset="0x88f1" name="RB_UNK_FLAG_BUFFER_BASE" type="waddress" align="64"/>
<reg32 offset="0x88f3" name="RB_UNK_FLAG_BUFFER_PITCH">
<bitfield name="PITCH" low="0" high="10" shr="6" type="uint"/>
<bitfield name="ARRAY_PITCH" low="11" high="23" shr="7" type="uint"/>
</reg32>
<reg32 offset="0x88f3" name="RB_UNK_FLAG_BUFFER_PITCH" type="a6xx_flag_buffer_pitch"/>
<reg32 offset="0x88f4" name="RB_VRS_CONFIG" usage="rp_blit">
<bitfield name="UNK2" pos="2" type="boolean"/>
@@ -1749,12 +1749,10 @@ by a particular renderpass/blit.
<bitfield name="UNK8" low="8" high="10"/>
<bitfield name="ARRAY_PITCH" low="11" high="27" shr="7" type="uint"/>
</reg32>
<array offset="0x8903" name="RB_COLOR_FLAG_BUFFER" stride="3" length="8" usage="rp_blit">
<reg64 offset="0" name="ADDR" type="waddress" align="64"/>
<reg32 offset="2" name="PITCH">
<bitfield name="PITCH" low="0" high="10" shr="6" type="uint"/>
<bitfield name="ARRAY_PITCH" low="11" high="28" shr="7" type="uint"/>
</reg32>
<reg32 offset="2" name="PITCH" type="a6xx_flag_buffer_pitch"/>
</array>
<!-- 0x891b-0x8926 invalid -->
<doc>
@@ -1817,7 +1815,7 @@ by a particular renderpass/blit.
<reg64 offset="0x8c1e" name="RB_A2D_DEST_BUFFER_BASE_2" type="waddress" align="64" usage="rp_blit"/>
<reg64 offset="0x8c20" name="RB_A2D_DEST_FLAG_BUFFER_BASE" type="waddress" align="64" usage="rp_blit"/>
<reg32 offset="0x8c22" name="RB_A2D_DEST_FLAG_BUFFER_PITCH" low="0" high="7" shr="6" type="uint" usage="rp_blit"/>
<reg32 offset="0x8c22" name="RB_A2D_DEST_FLAG_BUFFER_PITCH" type="a6xx_flag_buffer_pitch" usage="rp_blit"/>
<!-- this is a guess but seems likely (for NV12 with UBWC): -->
<reg64 offset="0x8c23" name="RB_A2D_DEST_FLAG_BUFFER_BASE_1" type="waddress" align="64" usage="rp_blit"/>
<reg32 offset="0x8c25" name="RB_A2D_DEST_FLAG_BUFFER_PITCH_1" low="0" high="7" shr="6" type="uint" usage="rp_blit"/>
+2 -2
View File
@@ -6074,7 +6074,7 @@ WARNING: 64b discontinuity (no _LO dword for 890d)
00000000 0x8c15: 00000000
00000000 0x8c16: 00000000
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
- context: 1
@@ -6100,7 +6100,7 @@ WARNING: 64b discontinuity (no _LO dword for 890d)
00000000 0x8c15: 00000000
00000000 0x8c16: 00000000
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
- cluster-name: CLUSTER_PS
@@ -1957,7 +1957,7 @@ got cmdszdw=38
!+ 100082000 RB_A2D_DEST_BUFFER_BASE: 0x100082000
!+ 00000008 RB_A2D_DEST_BUFFER_PITCH: 512
!+ 100082000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x100082000
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW0: 0x3f800000
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW1: 0x3f800000
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW2: 0x3f800000
@@ -2012,7 +2012,7 @@ got cmdszdw=38
!+ 100095000 RB_A2D_DEST_BUFFER_BASE: 0x100095000
!+ 00000004 RB_A2D_DEST_BUFFER_PITCH: 256
!+ 100094000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x100094000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: 64 | 0x4000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 1024 }
!+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
!+ 00000000 RB_A2D_CLEAR_COLOR_DW1: 0
!+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2033,7 +2033,7 @@ got cmdszdw=38
!+ 10009c000 RB_A2D_DEST_BUFFER_BASE: 0x10009c000
!+ 00000008 RB_A2D_DEST_BUFFER_PITCH: 512
!+ 10009c000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x10009c000
!+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
!+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW0: 0x3f800000
+ 00000000 RB_A2D_CLEAR_COLOR_DW1: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2054,7 +2054,7 @@ got cmdszdw=38
!+ 1000af000 RB_A2D_DEST_BUFFER_BASE: 0x1000af000
!+ 00000004 RB_A2D_DEST_BUFFER_PITCH: 256
!+ 1000ae000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000ae000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: 64 | 0x4000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 1024 }
!+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW1: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2075,7 +2075,7 @@ got cmdszdw=38
!+ 1000b6000 RB_A2D_DEST_BUFFER_BASE: 0x1000b6000
+ 00000004 RB_A2D_DEST_BUFFER_PITCH: 256
!+ 1000b6000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000b6000
!+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
!+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW1: 0x3f800000
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2096,7 +2096,7 @@ got cmdszdw=38
!+ 1000bf000 RB_A2D_DEST_BUFFER_BASE: 0x1000bf000
!+ 00000008 RB_A2D_DEST_BUFFER_PITCH: 512
!+ 1000bf000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000bf000
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW0: 0x3f800000
!+ 00000000 RB_A2D_CLEAR_COLOR_DW1: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2117,7 +2117,7 @@ got cmdszdw=38
!+ 1000d1000 RB_A2D_DEST_BUFFER_BASE: 0x1000d1000
!+ 00000004 RB_A2D_DEST_BUFFER_PITCH: 256
!+ 1000d1000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000d1000
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 00000001 RB_A2D_CLEAR_COLOR_DW0: 0x1
+ 00000000 RB_A2D_CLEAR_COLOR_DW1: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2138,7 +2138,7 @@ got cmdszdw=38
!+ 1000da000 RB_A2D_DEST_BUFFER_BASE: 0x1000da000
+ 00000004 RB_A2D_DEST_BUFFER_PITCH: 256
!+ 1000da000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000da000
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
!+ 000000ff RB_A2D_CLEAR_COLOR_DW1: 0xff
!+ 000000ff RB_A2D_CLEAR_COLOR_DW2: 0xff
@@ -2990,7 +2990,7 @@ got cmdszdw=38
!+ 1000b6000 RB_A2D_DEST_BUFFER_BASE: 0x1000b6000
+ 00000004 RB_A2D_DEST_BUFFER_PITCH: 256
!+ 1000b6000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000b6000
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW0: 0x3f800000
!+ 3f800000 RB_A2D_CLEAR_COLOR_DW1: 0x3f800000
!+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -3675,7 +3675,7 @@ got cmdszdw=38
!+ 1000bf000 RB_A2D_DEST_BUFFER_BASE: 0x1000bf000
!+ 00000008 RB_A2D_DEST_BUFFER_PITCH: 512
!+ 1000bf000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000bf000
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
!+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
+ 3f800000 RB_A2D_CLEAR_COLOR_DW1: 0x3f800000
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -17725,7 +17725,7 @@ WARNING: 64b discontinuity (no _LO dword for 890d)
00000000 0x8c15: 00000000
00000000 0x8c16: 00000000
1000b6000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000b6000
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
- context: 1
@@ -17751,7 +17751,7 @@ WARNING: 64b discontinuity (no _LO dword for 890d)
00000000 0x8c15: 00000000
00000000 0x8c16: 00000000
1000bf000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1000bf000
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 0 | ARRAY_PITCH = 0 }
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
- cluster-name: CLUSTER_PS
@@ -260,7 +260,7 @@ cmdstream[0]: 265 dwords
00000000010582b8: 0000: 408c1704 00001330 01013000 00000000 00000010
write RB_A2D_DEST_FLAG_BUFFER_BASE (8c20)
RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1012000
RB_A2D_DEST_FLAG_BUFFER_PITCH: 64 | 0x4000
RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 1024 }
00000000010582cc: 0000: 488c2083 01012000 00000000 00004001
opcode: CP_BLIT (2c) (2 dwords)
{ OP = BLIT_OP_SCALE }
@@ -301,7 +301,7 @@ cmdstream[0]: 265 dwords
!+ 01013000 RB_A2D_DEST_BUFFER_BASE: 0x1013000
!+ 00000010 RB_A2D_DEST_BUFFER_PITCH: 1024
!+ 01012000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x1012000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: 64 | 0x4000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 1024 }
+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW1: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW2: 0
@@ -2541,7 +2541,7 @@ got cmdszdw=416
+ 00000000 RB_A2D_DEST_BUFFER_PITCH_1: 0
+ 00000000 RB_A2D_DEST_BUFFER_BASE_2: 0
!+ 103735000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x103735000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: 64 | 0x4000
!+ 00004001 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 1024 }
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
+ 00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
+ 00000000 RB_A2D_CLEAR_COLOR_DW0: 0
@@ -143616,7 +143616,7 @@ WARNING: 64b discontinuity (no _LO dword for 890d)
00000000 0x8c15: 00000000
00000000 0x8c16: 00000000
103735000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x103735000
00000001 RB_A2D_DEST_FLAG_BUFFER_PITCH: 64
00000001 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 0 }
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
- context: 1
@@ -143642,7 +143642,7 @@ WARNING: 64b discontinuity (no _LO dword for 890d)
00000000 0x8c15: 00000000
00000000 0x8c16: 00000000
103735000 RB_A2D_DEST_FLAG_BUFFER_BASE: 0x103735000
00000001 RB_A2D_DEST_FLAG_BUFFER_PITCH: 64
00000001 RB_A2D_DEST_FLAG_BUFFER_PITCH: { PITCH = 64 | ARRAY_PITCH = 0 }
00000000 RB_A2D_DEST_FLAG_BUFFER_BASE_1: 0
00000000 RB_A2D_DEST_FLAG_BUFFER_PITCH_1: 0
- cluster-name: CLUSTER_PS