freedreno: Sort MRTs so output is stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7095
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35402>
(cherry picked from commit 8c8496e2f6)
This commit is contained in:
Vinson Lee 2025-06-07 09:40:14 -07:00 committed by Eric Engestrom
parent 1aa840d251
commit 51d5d13411
3 changed files with 11 additions and 4 deletions

View file

@ -13764,7 +13764,7 @@
"description": "freedreno: Sort MRTs so output is stable",
"nominated": false,
"nomination_type": 0,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -38,9 +38,9 @@ Batch:
mode: RM6_BIN_RENDER_START
bin size: 640x192 (18 bins)
DEPTHTEST DEPTHWRITE
MRT[0x28fc000:0x0]: 1920x1080 FMT6_Z24_UNORM_S8_UINT (MSAA_ONE) CLEARED RESOLVED
MRT[0x18ae000:0x0]: 1920x1080 FMT6_8_8_8_8_UNORM (MSAA_ONE) CLEARED RESOLVED
MRT[0x0:0x0]: 1920x1080 FMT6_8_8_8_8_UNORM (MSAA_ONE) CLEARED RESOLVED
MRT[0x18ae000:0x0]: 1920x1080 FMT6_8_8_8_8_UNORM (MSAA_ONE) CLEARED RESOLVED
MRT[0x28fc000:0x0]: 1920x1080 FMT6_Z24_UNORM_S8_UINT (MSAA_ONE) CLEARED RESOLVED
SRC[0x4715000:0x46f3000]: 3840x2160 FMT6_Z24_UNORM_S8_UINT (MSAA_ONE)

View file

@ -136,7 +136,14 @@ function finish()
printf("-----\n")
end
for base,mrt in pairs(mrts) do
local keys = {}
for base in pairs(mrts) do
table.insert(keys,base)
end
table.sort(keys)
for _,base in ipairs(keys) do
local mrt = mrts[base]
printf(" MRT[0x%x:0x%x]:\t%ux%u\t\t%s (%s)", base, mrt.flag, mrt.w, mrt.h, mrt.format, mrt.samples)
if drawmode == "RM6_BIN_RENDER_START" then
if cleared[mrt.gmem] then