AGC: 2D array color targets with a nonzero MIP0_DEPTH are rejected (VITA5, Homebrew UI Lab) #2578
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T06:50:30Z.
VITA5 (PPSA39410) and Homebrew UI Lab (PPSA99050) stop at
unsupported color depth, dimension, resource level or metadata modewithCB_COLOR_ATTRIB3 = 0x4dc6c001. That is a 2D color target withMIP0_DEPTH1, rendered through a single-slice view.Cause
DecodeColorTileModeaccepts 2D color targets only whenCB_COLOR_ATTRIB3.MIP0_DEPTHis 0, so a 2D array target can only be used when its surface declares one slice. radeonsi writes the last layer of the resource there for array targets (Mesa35b085c4,src/gallium/drivers/radeonsi/si_state.c:2350.num_layers = util_max_layer(...),src/amd/common/ac_descriptors.c:1319), and Mesa-built homebrew does the same.Fix
AlxcBTW:fix/agc-array-color-target-v2(5bef2fde). It is rebased ontomaind5c8e42dand keeps the 1D color targets that7638ade7added: 1D still needsMIP0_DEPTH0. In full CI, Linux and macOS pass. The only Windows failure isagc_driver_prepared_shaders_deferred_undecodable, which fails on everymainrun at the moment (fix: AlxcBTW/AnyPS5#13). The first version (6fca50cd, AlxcBTW/AnyPS5#3) passed fully onc72d5ce1. I can't open it as a PR while intake is limited, so it's here if a collaborator wants to cherry-pick it.DecodeColorTileModeaccepts 2D targets with anyMIP0_DEPTH.DecodeColorBufferalready moves a 2D target by the view's slice times the slice size. It now also rejects a view slice beyondMIP0_DEPTHwhen the field is nonzero. Surfaces withMIP0_DEPTH0 behave as before.Tested
Windows 11, WinLibs GCC 15.2.0 r7.
ColorTargetLayouttests:0x4dc6c001is accepted, while 1D with a nonzeroMIP0_DEPTHand resource type 3 are still rejected.Graphicstests: slice 1 of a two-slice linear target moves the address by one slice, and slice 2 is rejected.ctest -R ^agcond5c8e42d: all pass exceptagc_driver_f32_arithmetic_nan, which fails the same way without the change on this NVIDIA GPU.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T08:29:56Z.
@AlxcBTW's 6fca50cd no longer applies to current
main, and one of its test lines now contradictsmain:DecodeColorTileModeconflicts with7638ade7(mainnow renders into 1D color targets as one-row 2D targets,resourceType <= 1). I resolved it so that 1D targets keep theMIP0_DEPTH == 0rule frommainand 2D targets accept anyMIP0_DEPTH, as this fix intends:((resourceType == 0 && (attrib3 & 0x1fffu) == 0) || resourceType == 1 || resourceType == 2).reject([] { DecodeColorTileMode(0x4cc6c000); })intests/ColorTargetLayout.cppexpects that descriptor to be rejected, but0x4cc6c000is a 1D target (type 0, depth 0, mode 0x1b) thatmain's test now requires to be accepted. A plain merge keeps both lines andagc_driver_graphicsfails withexpected color layout rejection, so I dropped that line, and the fix's secondreject(0x4fc6c000), whichmainalready has.Rebased commit (still authored by AlxcBTW):
LeandroLP23:rebase/agc-array-color-target(31201433, onmain89a1fb4e, also merges cleanly onto6cc33583). Radeon 860M (RDNA 3.5), Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release: all 247agc_drivertests pass, conventions pass. I have neither VITA5 nor Homebrew UI Lab, so the titles themselves are untested here.