feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9020"
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 frankea on 2026-10-21T09:55:50Z.
What
A blended or partial write into a one-sample 11_11_10 float color target used to throw (
AGC graphics: blending into an 11_11_10 float color target is unsupported). No host format holds this target's bits (red in 31..21, blue in 9..0, the mirror ofB10G11R11), so it renders as R32_UINT and fixed-function blending can't apply. This PR blends in the pixel shader instead, through the pixel-interlock merge that JAB-dev's #8564 adds for partial 4_4_4_4 writes. The merge mechanism is theirs; this PR adds blending to it and opens it to mips and 2D array slices.#8564 and #8563 are in
mainsincedcd7e3a61, and this branch mergesmain3bd88ca119. The changes of this PR are its two commits,9a7a202bf(the blend) and6f240cbfa(mips and array slices), plus the resolution of the merge commits, which number this PR's serializer fields after #8564's:github.com/frankea/[email protected]DecodeStateturns a blended or partial write into a one-sample 11_11_10 float target into a merge.TargetMergecarries the target's packing and the color equation ofCB_BLEND_CONTROL, and its mask is 32 bits wide;ColorTarget.partialWriteMaskis 32 bits as well, next to a newmergeBlend. With #12916 inmaina draw carries oneTargetMergeper merged target, and these fields sit on each entry; a packed merge still merges alone, so an 11_11_10 blend or partial write next to another merged target throws, as a 4_4_4_4 partial write does.TargetMergeSurfacedescribes the resident image of the whole array (ArraySurfaceForTarget, moved fromDraw.cpptoState.cppand shared) at the drawn mip, so the merge's storage image is the same image the target renders into.EncodeTextureResourceencodes a mip range and 2D arrays, and the shader addresses the view's first slice plusgl_Layer, clamped to the view's last slice as the console clamps the render target index toSLICE_MAX, so a guest layer index past the view never reaches outside the image. This applies to one-sample 4_4_4_4 merges too.fragmentShaderPixelInterlock. The refusal now names the target's shape.mainreads #8564's merge record from 46 (target, mask, samples, descriptor and the two depth and stencil flags), #11684's target blend from 46 as well (bit 16 of the mask word, then its fields after the two flags), #12916's further merges (their count in bits 17-19 of the first record's mask word, then one record each), its depth export bounds from 49, and target flags at the end of the stream from 51 to 54; it rejects 50. At 55 this PR writes each record's mask as a full 32-bit word and, after the two flags, a flag byte that holds what the 46-54 word kept above its mask (bit 0 the blend, bits 1-3 the number of further merges, on the first record), then #11684's blend fields when it is set, then this PR's packing, blend control, layered flag and the view's first and last slice; the depth export bounds follow the last record. A version 46 to 54 record (asmainwrites it) takes the flags from the upper half of its mask word, keeps the 16-bit mask limit, and without a blend reads a merge as a one-slice 4_4_4_4 merge without blending.request_serializerandagc_shader_memoryread version 51, 53 and 54 streams asmainwrites them. Shader disk cache 57 (mainis at 56; #10049 takes 58; this branch's cache key adds the merge's packing, blend and slice fields). Pipeline journal 16 withsizeof(State)944 (mainis at 15 and 936; #8564's 16-bitpartialWriteMaskbecomes 32 bits andmergeBlendfollows it).mainon 10/29): its blend into an unclamped normalized target uses the same merge with a float storage image and a stored texel, and this PR's packed merges keep the uint image and the stored word;MergeColorTargettakes #11684's path first when its blend is set.ShaderInputInfoBuilderaccepts a merge without packing only when it carries #11684's blend.TargetMergeSurfacenow gives every merge, #11684's included, the drawn mip and, for a 2D array view, the array's image with the view's slices; the 11_11_10 debt entry says so. #11684'sUnclampedBlendMask(0xffff) stays unambiguous with the 32-bit mask: a 4_4_4_4 merge with all four nibbles is a full write and never merges, and no 11_11_10 field mask gives 0xffff.main's ONE/ZERO/ADD rule (such a color equation into a packed target is a plain write) the merge only takes other equations, and withmain's staged multisampled 4_4_4_4 partial writes (StagedMerge.cpp) a multisampled 4_4_4_4 partial write still takes that path; 11_11_10 merges stay one-sample.Tested
main3cb1cd29ecand3bd88ca119(head4ba1676e00), Apple M5 Max (macOS 27.0.1, x86-64 under Rosetta 2, MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0), each test run three times:request_serializer,agc_shader_memory,agc_driver_graphics,agc_driver_packed_float_blend,agc_driver_packed_float_color_target,agc_driver_packed_unorm4444_color_targetandagc_driver_packed_unorm4444_partial_writepass 7/7, andagc_driver_packed_unorm4444_multisample_partial_writeskips (no multisampled storage images on MoltenVK).mainno longer buildslibkernelon macOS (pthread_getattr_np,pthread_getcpuclockid, the Linux signal context,sched_getcpu,RUSAGE_THREAD,environ), so these builds carry a local, uncommitted macOS patch for those calls. The RTX 4090 runs below predate this merge; I will repeat them on it.mainee9a9a66c(headaa1d45243; #12916's multi-target merges, see the comments), RTX 4090 (NVIDIA 616.92, Windows 11), each test run three times: the 75 ctest entries of the same 14 targets pass 75/75, and 75/75 under the validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V): 115Insert instance layerlines, noVUID-line, 39Undefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings (in the testsmainalso runs, the countsmainshows; 10 inagc_driver_packed_float_blend).mainee9a9a66cpasses a 236-entry set holding all of these butagc_driver_packed_float_blendin both runs, with noVUID-line. The shader memory test now also checks one and two merges at serializer versions 49 and 50. Not run on Linux.mainbb04a4f1e(head237ede9d9; see the comments for the renumbering and #11684), RTX 4090, each test run three times: the 72 ctest entries of 14 targets (request_serializer,agc_shader_memory,agc_shader_disk_cache,agc_driver_pipeline_journal,agc_driver_graphics,agc_driver_key_miss,agc_driver_unclamped_normalized_blend,agc_driver_depth_export_clamp,agc_driver_layered_array_color_draw,agc_driver_packed_float_blend,agc_driver_packed_float_color_target,agc_driver_packed_unorm4444_color_target,agc_driver_packed_unorm4444_partial_write,agc_driver_packed_unorm4444_multisample_partial_write) pass 72/72, and 72/72 under the validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V): 115Insert instance layerlines, noVUID-line, nowas not found but was requested by env var VK_INSTANCE_LAYERS, 39Undefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings.mainbb04a4f1epasses its 71 entries (noagc_driver_packed_float_blend) in both runs: 110Insert instance layerlines, noVUID-line, 29 of those warnings.sizeof(State): a macOS probe gives 920 formain(its Linux guard) and 928 for this head (the new guard). Not run on Linux.tests/execution/PackedFloatBlend.cpp(new) against a CPU reference, bit for bit on every pixel: 11 equations, a blended and a plain partial write, a back-to-back chain, two same-draw overdraws of 16 alternating layers, and three array merges (mip 0 of all six slices of a 128x128 array of 8 mips, one layer per slice, the shape Gran Turismo 7 renders; mip 1 of slices 1 to 3 of a 256x256 array; one slice drawn without a layer export).599060108:agc_driver_packed_float_blend,agc_driver_packed_unorm4444_partial_write,agc_driver_packed_unorm4444_multisample_partial_write,agc_driver_packed_float_color_target,agc_driver_layered_array_color_draw,agc_driver_graphicsandagc_shader_memorypass.request_serializer,agc_shader_disk_cache,agc_shader_memory,agc_shader_control_flow,agc_driver_bda_device,agc_shader_replay_requests,agc_driver_graphics,agc_pipeline_journalandagc_driver_prepared_shaderspass.mainmerges, heade554d27c3on the RTX 4090:agc_shader_memory,agc_driver_graphics,agc_driver_layered_array_color_draw,agc_driver_packed_float_blend,agc_driver_packed_float_color_target,agc_driver_packed_unorm4444_partial_writeandagc_driver_packed_unorm4444_multisample_partial_writepass. The same 35 Linux tests pass on374556c0f, themainmerge before it.main7e69be679(head4fad5fd36) on the RTX 4090: the 49 ctest entries ofagc_driver_graphics_tests,agc_shader_memory_tests,agc_driver_pipeline_journal_tests,agc_driver_packed_float_blend_tests,agc_driver_packed_float_color_target_tests,agc_driver_packed_unorm4444_partial_write_tests,agc_driver_packed_unorm4444_multisample_partial_write_testsandagc_driver_layered_array_color_draw_testspass 49/49, each test run three times (ctest --repeat until-fail:3).VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan SDK 1.4.363.0),ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1withctest -V, onmain83462cc57(7e69be679plus eight commits totools/only) (46/46:mainlacks the float blend and both 4_4_4_4 partial-write tests) and on this head (49/49). Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS, and neither has aVUID-line. The layer's only messages on this head areUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings from the merge tests, where the merged target has no color attachment and the fragment output goes unused: 10 inagc_driver_packed_float_blend, 10 inagc_driver_packed_unorm4444_partial_writeand 9 inagc_driver_packed_unorm4444_multisample_partial_write.mainlogs no validation message in its 46.d201de3f3andmain2259f0530(head634b3dc78) on the RTX 4090: the 56 ctest entries ofagc_driver_graphics_tests,agc_shader_memory_tests,agc_driver_pipeline_journal_tests,agc_driver_packed_float_blend_tests,agc_driver_packed_float_color_target_tests,agc_driver_packed_unorm4444_partial_write_tests,agc_driver_packed_unorm4444_multisample_partial_write_tests,agc_driver_packed_unorm4444_color_target_tests,agc_driver_layered_array_color_draw_tests,request_serializer_tests,agc_shader_disk_cache_testsandagc_driver_key_miss_testspass 56/56, each test run three times. Under the validation layer, with the settings above: this head 56/56 andmain9d6adeb5554/54 (mainlacks the float blend test and #8564's three); noVUID-line in either log, and this head's only messages are the same 29Undefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings.main0db47b263(heada51e479d9; the only conflict was the disk cache format), RTX 4090: the same 56 ctest entries pass 56/56, each test run three times, and 56/56 under the validation layer with noVUID-line (the same 29 warnings);main0db47b26354/54 and 54/54 under the layer, noVUID-line.3a6688415(which takes disk cache format 46 and mergesmain) andmain513ca7e55(head6806092c4; no textual conflicts, and the disk cache format moves to 47), RTX 4090: the same 56 ctest entries pass 56/56, each test run three times, and 56/56 under the validation layer with noVUID-line (the same 29 warnings). The head also merges cleanly withmain58ceeb8ed.main379b1dca3(head5e0455020), which has #8564's final head: this PR's serializer fields move to version 47 and the disk cache stays at 47 overmain's 46; the journal is 10 andsizeof(State)832 overmain's 9 and 824.request_serializerandagc_shader_memorynow also check that a version 47 record carries the packing, blend control and slice bytes, that a version 46 record with a merge reads as 4_4_4_4 without blending, and that a version 46 record whose mask is wider than 16 bits is refused. RTX 4090: the 59 ctest entries of the same targets (mainadded three since the last run) pass 59/59, each test run three times, and 59/59 under the validation layer with noVUID-line (the same 29 warnings). Built with Apple clang on macOS,main'sRequestSerializerTests.cppaborts against this head's serializer (it expects version 46), and this head's passes. The head also merges cleanly withmain9c85790c9.main732ab06f4(a657def72): the only conflict was the journal'ssizeof(State)guard, now 848.mainhad meanwhile moved the pipeline journal to format 10 and the shader disk cache to 47 for its own changes, the numbers this PR used, so the merge kept both lines without a conflict.5f7287406moves them to 11 and 49. The request serializer stays at 47;main's is still 46. RTX 4090, head5f7287406: the 65 ctest entries of the same targets (mainadded six since the last run) pass 65/65, each test run three times, and 65/65 under the validation layer with noVUID-line (the same 29 warnings).main3af09d95e, on the targets it has plusagc_driver_sample_mask_draw_testsandagc_driver_stencil_known_replace_tests: 66/66, three times each, and 66/66 under the layer with noVUID-line (19Undefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings, from its own two 4_4_4_4 partial-write tests). The head also merges cleanly withmain504ea3b53, whose newer commits change no AGC code.aab4fb4a5among the trees: noVUID-errors. The layer's one message there isUndefined-Value-ShaderOutputNotConsumed-DynamicRendering, 10 per merge test, because the merged target has no color attachment and the fragment output goes unused.sizeof(State)is 848 on Linux x86-64 after the latest merge:main's 840 plus a 32-bitpartialWriteMaskandmergeBlend(#8564's 16-bit mask keepsmain's size). A probe built on macOS gives the Linux guards' values formain732ab06f4(840) and this PR's previous head5e0455020(832), and 848 for this head. Not built on Linux since the merge.mainmerge and the layer clamp) and #7978, #7243, #7256 and #7550 merged locally: past the 11_11_10 blend stop and the cube-map target, the main menu at 4.4 FPS. With scripted input it goes on to the World Map, the Used Cars dealer and a car purchase, then stops in the car delivery scene oncolor targets with fewer fragments than samples (EQAA) are unsupported, which this PR doesn't touch.Checklist
main; no other open PR implements the same functions (the ONE/ZERO/ADD case is left to #7243)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)main). #10049 (mine) takes shader disk cache format 58 and this PR 57, so if both land, the second one's version line conflicts instead of merging silently. #9335 (mine) is stacked on this PR.Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-21T18:05:56Z.
Review: COMMENTED
Replacing a thrown refusal with a working blend is worth having (GT7 gets past the 11_11_10 stop to its main menu), and building on #8564's interlock merge is reasonable. The cost of that mechanism is not in either PR.
Graphics.Drawper frame, so the cost is known before titles depend on it.fragmentShaderPixelInterlockand what happens on those that do not (the previous behavior was a clear throw; the replacement should be too, with a message that names the missing feature), including lavapipe, which the tests run on.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-21T20:02:42Z.
@CnRJay thanks, all three points are fair. In order:
Cost in GT7. Here is the same scene with and without the blend path, from the same build: Gran Turismo 7 (PPSA01317 01.710.000) idling on its main menu with no input, RTX 4090 (NVIDIA 616.92), Windows 11, Ryzen 7 5800X, 3840x2160 output, warm shader cache. The build is this PR before its
mainmerge, plus what GT7 needs to reach the menu (#9068's two fixes, #7978, #7243, #7256, #7550, and a local change that draws a partially resident depth target whose pages are all committed) and local diagnostics. For "without", a local switch that is not in this PR (APS5_REFUSE_PACKED_MERGE) throws for any pixel stage that would merge, andAPS5_SKIP_REFUSED_DRAWS=1skips those draws. Both configurations setAPS5_SKIP_REFUSED_DRAWS=1andAPS5_TRACE_SUMMARY_EVERY=10. They also set two local switches for later GT7 stops (APS5_SKIP_REFUSED_DISPATCHES,APS5_A2C_UNDITHERED), and neither fires in these runs. Two runs of each, alternating; each value is the median of the 10 s interval lines from 240 s to 510 s after the first present, when the menu is steady:Graphics.Drawper frame (ms)Driver.Packetper frame (ms)About 12 draws per frame go through the merge here, out of about 1,880, and all of them are this PR's path: blended, layered draws into an 11_11_10 array target, from one pixel shader (0x120af97800). GPU busy per present is the same either way, so in this scene the interlocked merge costs less than the run-to-run spread. But the merged draws are few, and the frame is CPU-bound (queue worker 0 is about 95% busy,
Driver.Packettakes about 255 ms per frame), so this scene says little about a blend-heavy pass with large overlapping draws. A skipped draw still goes through decode and capture up to the refusal every frame, so the CPU columns of the "without" rows include part of those draws' cost; the GPU column doesn't.For that bound I added a timed overdraw case to the GPU test,
aab4fb4a5:agc_driver_packed_float_blend_tests --benchmark-overdraw, which CTest doesn't run. It records one draw of N full-target triangles with a premultiplied source-over blend (CB_BLEND_CONTROL0x40000501, the blend of GT7's World Map draw in #9335) into a 2048x2048 tiled target, twice: once as 11_11_10 float through the merge, and once as 10_11_11 float, the same 32 bits in mirrored order, which the host blends itself asB10G11R11_UFLOAT. GPU time comes from the recorder's batch timestamps (APS5_PROFILE_GPU). The time per layer is (N=64 minus N=1) / 63, which leaves out the fixed cost of the batch. Medians of 9 rounds, three runs on the RTX 4090:So when every fragment overlaps 63 others in the same draw, the merge blends at about half the host's rate on this GPU: 2.07x the time per layer, the same in all three runs. At GT7's 12 merged draws per frame that disappears in the noise, as above. A full-screen particle or fog pass with heavy overdraw into an 11_11_10 target would take about twice as long as fixed-function blending. I only measured the RTX 4090.
One summary line of each configuration
On the mechanism:
Devices without
fragmentShaderPixelInterlock. That case stays a throw that names the feature. The recompiler throwsa partial write of a packed color target needs the fragmentShaderPixelInterlock feature, which the device lacks(#8564's check inSpirvModuleSetup.cpp). #8564's unit test pins it for a 4_4_4_4 merge with a target that lacks the capability, and the 11_11_10 merge goes through the same check. The GPU tests printskipped, the device lacks fragmentShaderPixelInterlockand return the skip code. Which drivers expose the feature:lvp_device.c), so the CI's lavapipe runs these tests rather than skipping them. ANV always (anv_physical_device.c). RADV on GFX9 and newer when it compiles with ACO (radv_has_pops). NVK, turnip, panvk and honeykrisp don't expose it.MVKDevice.mm).fragmentShaderPixelInterlocklisting and its&option=notcounterpart: NVIDIA from second-generation Maxwell on; the reports without it are Kepler, first-generation Maxwell, or drivers from 2019 and earlier. Intel from Gen9 on (Broadwell and older lack it). AMD's own driver from around Vulkan driver version 2.0.317 (early 2025), for example the RX 9070 GRE on 2.0.395 and the Radeon PRO W7900 on 2.0.353. It is missing on 2.0.310 and older, for example the RX 7700S on 2.0.310 and the RX 7800 XT on 2.0.299.So on an AMD Windows driver from before early 2025, GT7 now stops on the interlock message instead of the old 11_11_10 blend message.
#8563 and #8564. Agreed. The branch carries them unchanged so that it builds and tests as a whole. This PR's own change is the two commits in the compare link in the description. I merged current
maininto the branch today (e554d27c3), so it no longer conflicts. Once they merge, I'll rebase ontomainand drop them.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-22T02:24:15Z.
Ghost of Yōtei (PPSA26344) on plain
main(0c6a5bd593) stops about 20 minutes into a warm open-world run onAGC graphics: blending into a 10_11_11 unorm color target is unsupported. That's the sibling packed target, so I'd like to cover it on top of your merge instead of adding a second mechanism.Your blend path already passes the packing through
TargetMerge,PackedWriteMaskand the merge emitter. As far as I can see, 10_11_11 unorm needs four things on top: decode lettingUnorm10_11_11into the merge, its 10/11/11 fields inPackedWriteMask, unorm unpack and pack in the merge emitter (round to nearest, as the existing export does), and the serializer range. We've carried a working version of that blend in our own tree since 10-12. It uses a separate epilogue, so I wouldn't send it as is, but its CPU reference test (the factor and op combinations Yōtei uses, add and both subtracts) should carry over.Would you rather fold 10_11_11 unorm into #9020, or should I open a small follow-up with
Depends on: #9020once your stack settles? Either way I'll run it in Yōtei and post the result here. I don't think #7243's ONE/ZERO case covers it: I haven't pinned down the exact blend Yōtei sets on this target yet, but our working version needed real blending.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-22T08:56:32Z.
@Celegans12 thanks for the Yōtei report. Please open it as a follow-up with
Depends on: #9020; I'd keep #9020 to 11_11_10 float while it's under review. #9020 itself depends on #8564, which is still open, so your PR stacks on both.Your list matches what I see in #9020's head (
aab4fb4a5):DecodeColorBuffer, only an 11_11_10 float target moves the blend intomergeBlend, so a blended 10_11_11 unorm target still reachesblending into a 10_11_11 unorm color target is unsupported. The decode already requires ROUND_MODE 0 for 10_11_11 unorm, which fits your round-to-nearest pack.PackedWriteMasktakes 4_4_4_4 unorm and 11_11_10 float only. It needs the 10_11_11 fields: red in the low 11 bits, green in the next 11 and blue in the top 10.ShaderInputInfoBuilderrefuses a blending merge into anything but 11_11_10 float. That's where your unorm unpack and pack go.ColorExportPackingup toUnorm4_4_4_4, which includesUnorm10_11_11, and it reads the merge's blend control unconditionally.Two limits of #9020 to keep in mind for Yōtei. First, its blend refuses a multisampled 11_11_10 float target, so a multisampled 10_11_11 unorm target would need that case too. The merge as a whole also refuses volume targets and mipmapped or array multisampled ones. Second, the merge needs
fragmentShaderPixelInterlock, and devices without it throw.Post the Yōtei result here or on your PR, whichever you prefer. I can run your branch on an RTX 4090 if that helps.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-22T12:14:37Z.
@frankea thanks for the pointers. The 10_11_11 unorm follow-up is up as #9748, stacked on this PR's head
aab4fb4a5, so only its last commit is new.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T03:53:04Z.
Review: DISMISSED
Reviewed — changes requested
On its own base the head builds, the focused tests pass under the validation layer, and the new GPU test fails without the emitter change. It no longer merges with current
main, though, andmainhas since taken the request-serializer, pipeline-journal and shader-disk-cache version numbers this PR uses.What I ran
5f7287406a069f053e70a86b4e79220d12f2fece(merge base withmain:732ab06f41772c1d805cf58193d1682616ee88d8)main:b433c40f2f46aa2e59e19806010a839ac8572d64Results
mainb433c40f2fgit diff --checktools/check_conventions.py --base origin/mainAll conventions checks passed.-Wstringop-overflowfromRequestSerializerTests.cpp(54 bytes), which already exists onmain, as ycbuzi notedVUID-lines, nowas not found but was requested by env var VK_INSTANCE_LAYERS; 29Undefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings, the number the description reportsmainb433c40f2f, validation layerVUID-lines, no missing-layer line; 19 of the same warnings (frommain's own 4_4_4_4 merge tests)agc_driver_pipeline_journal);agc_driver_packed_float_blendwell under thatagc_driver_packed_float_blendfails (details below)Conflicting files when merging into main
b433c40f2fPR head, validation layer
Negative control
On the PR head I restored only
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppfrom the merge base732ab06f4. That version always packs the merge as 4_4_4_4 and has no blend orgl_Layeraddressing. I rebuiltagc_driver_packed_float_blend_tests, and the test fails on its first case:Restoring all production files does not build, because the tests use
PackedBlendControland the newTargetMergefields (ycbuzi reported the same). So the emitter-only revert is the meaningful control. I then restored the file.Findings
Blocking
The PR conflicts with
main, andmainnow uses its format numbers. The merge intob433c40f2fconflicts in the 7 files above. Resolving the text is not enough:mainwrites version 49: 48 addsfragmentBarycentricBuiltins, and 49 adds the depth-export range after the target merge (RequestSerializer.cpp L362-L369 and L456-L459 on main). This PR reads its packing, blend control and slice fields atversion >= 47u(RequestSerializer.cpp L450-L458 at the head). After a merge, a version 47–49 request written bymainwould have the depth-export words read as merge fields. The new fields need their own version after 49 (50), and a version 47–49 record needs the same "4_4_4_4, no blend, one slice" default the PR gives version 46.mainis atFileFormat = 12uwithsizeof(State) == 912(PipelineJournal.cpp L41-L50 on main); the head has 11 and 848. This PR'spartialWriteMaskwidening andmergeBlendneed 13 and a new size guard.mainis already atFormatVersion = 49, fromb9f4f65904(ShaderDiskCache.hpp L16 on main). The head also sets 49, so this line merges without a conflict, and two different cache key layouts would ship under the same format. That is the silent collision the description wanted to avoid with #10049. It needs 50, or the next free number at rebase time.Please merge or rebase onto current
main, renumber, update the description's "Formats" bullet and theDepends online (it still says this PR takes 49 and #10049 takes 48), and rerun the serializer, disk-cache, journal and merge tests on the new head.Non-blocking
core/libs/prx/libSceAgcDriver/tests/execution/PackedFloatBlend.cpp:64,:561and:587-589describe the test (// Position from the buffer at offset 0, …,// A 2D array of 11_11_10 float slices …,// One full-screen triangle per layer …). CONVENTIONS allows comments only for technical debt,#endifand namespace ends.check_conventions.pylets them through only because the PR also editsdocs/dev/debt/. Some existing tests undertests/execution/have similar comments, so this is not blocking, but please drop them or fold the information into names or failure messages.I also checked these points and found nothing to change:
PackedBlendControlkeeps only the color equation, which fits a target without alpha.0xe4and0xc6, so the merge's source alpha (mapped component 3) is always the export alpha.arraySlice + layers - 1, which is the view'sSLICE_MAXwhen a layer is exported, andfirstSlicewhen it is not.Not verified
732ab06f4, which is 3,637 commits behindmain.fragmentShaderPixelInterlock. I tested only the NVIDIA GPU above.To get this to a good state
mainand resolve the 7 conflicts.sizeof(State), and disk cache format 50 (or whatever is free then).request_serializer,agc_shader_memory,agc_shader_disk_cache,agc_driver_pipeline_journal,agc_driver_graphicsand the merge tests under the validation layer, and update Tested, Formats and Depends on.