feat(agc): implement 10_11_11 unorm color targets through 32-bit uint attachments #1485
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1485"
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 Celegans12 on 2026-10-08T08:58:01Z.
What
Color targets with CB_COLOR_INFO format 6 (
COLOR_10_11_11) andNUMBER_UNORMthrowunsupported color format 6 number type 0 component swap 0; Vulkan has no unorm 11_11_10 format.EmitFormatStoreComponent: nearest even, NaN and negatives to 0) behind spec constantExportPackingBase + target;SpecializeFragmentOutputsmakes a packed target's output the uint4ValidateShadersrequires. TechnicalDebt: the CB is assumed to round alike.targetExportPackingis draw state: outside the static ABI key, inside the module key, the result memo, the draw key and the serialized request (version 14, after #1816's 13). Specialization failures are now rethrown instead of terminating insidestd::call_onceon MinGW.ROUND_MODE, component swaps, other number types.ValidateShaderscheck; #423, #448 and #1442 change the request version lines; #1349 editsDecodeColorFormatandDecodeState, with no conflict beyond its own withmain.Tested
mainf1451396: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)mainf1451396: 498/498 passagc_driver_packed_unorm_color_targetdraws through the registered pixel shader (tiled and linear; 32_ABGR and FP16_ABGR; ties, NaN, infinities) and checks exact words. It fails with the packing in the static key (unregistered program is not a compute shader) or out of the module key.unorm10_11_11TargetTests(agc_driver_graphics): one artifact, two specializations.agc_shader_memory: version 1-13 requests decode unpacked. None of the three builds onmain.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:57:50Z.
Checked on current
main: the only conflict was with #1073 inShaderValidation.cpp(uintExportvspackedin the same check). I merged both conditions (a target expectsu32x4if either applies, each with its own message) and rebased. Build + ctest of libSceAgcDriver green (267/267); the new tests don't compile without the change andagc_driver_packed_unorm_color_targetpasses.Unmodelled cases still throw and the CB-rounding assumption is recorded in TechnicalDebt. Merging once CI is green on the rebased head.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T01:56:00Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL332-333Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T05:58:52Z.
Checked on current
main: build + ctest of libSceAgcDriver/libSceAgc green, the new tests don't compile without the change,agc_driver_packed_unorm_color_targetdraws through the registered pixel shader on lavapipe, unmodelled cases still throw, the CB-rounding assumption is in TechnicalDebt. Merging once the full Linux/Windows build (dispatched manually) is green.