Repository navigation
Revert #896 and #822: GL coalesced submissions break render ordering on G13/G14 - #979
Conversation
…ass-coalesce-frag-barriers" This reverts merge commit 3fc1b77, reversing changes made to 8315013. #822 breaks gpubench-gl render.postfx on M1 Pro (G13X) and M2 Air (G14G): the output check fails with the centre pixel at (0,249,0,255). A bisect on a bare-metal M1 Pro found 8315013 as the last good commit and 3fc1b77 as the first bad one. On those GPUs the kernel accepts DRM_ASAHI_RENDER_FRAGMENT_BARRIERS and then adds no wait at all for the earlier render, relying on the order of the fragment queue. #822 sets that flag on every render that depends on an earlier one, and queues the passes of a multi-pass chain into one submission. Nothing but fragment-queue order then separates a pass from the output of the pass before it, which is not enough on these GPUs. Revert it until the ordering is correct on every GPU. Later commits build on parts of #822. The conflicts are resolved as follows: - #896 (inter-submission barrier elision) uses the written-BO list and the per-batch submitted_has_vdm, submitted_has_cdm and barrier_untracked state. That tracking and its single-submission barrier test are kept. Its changes to the coalesced submission path go with that path. - #754 (PBO upload) replaced the valid-level bit with agx_resource_set_valid(); that call is kept. - #745 (fast-clear batches) also checked the primitive counters #822 added. Those counters are gone; its draw checks remain. - #745's change to always write the compute end timestamp is kept. - The flush_resource barrier sequence update from #896 is kept; the pending-submission flush that went with it is removed. Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
The revert of #822 kept #896 (inter-submission barrier elision for disjoint AGX3 batches, merge commit ba9bcc7), but #896 is built on #822's written-BO list and per-batch submission state, so the driver no longer compiled. Revert #896 as well, in the order a clean revert takes: #896 first, then #822. Two later users of #822 are adapted rather than reverted: - #802 (HAL200 bind elision for multi-draw indirect) noted the indirect buffer as a vertex-stage read for #822's render barrier tracking. That tracking is gone; the indirect buffer is still recorded as a batch read. - #745 (fast-clear batches) also checked #822's primitive counters. Its draw checks remain. #754's agx_resource_set_valid() and #745's change to always write the compute end timestamp are kept. Two test changes keep later tests meaningful without #822: - #822's guard in the threaded-context test that skips comparing a compressed level is kept. That level uploads and reads back through GPU blits, which the no-op drm-shim never runs. - The #802 multi-draw test checked that a forced flush started a new batch by comparing batch pointers. Without #822 the flushed batch is submitted at once and its slot can be reused, so it compares the batch sequence number instead. Signed-off-by: Dj <43033058+DjDeveloperr@users.noreply.github.com>
|
241e852 build check: reverting #822 alone fails to compile in src/gallium/drivers/asahi/agx_batch.c:1127 (no member named 'written' in 'struct agx_batch::bo_list') because #896 (ba9bcc7, asahi-coalesced-barrier-elision) depends on #822's bo_list.written. Ready to run the J316s (G13S) + J413 (G14G) render.postfx + smoke confirm rows once #896 is reverted with #822. |
|
J773g row: Apple M4 Mac mini, Head Both kits are release builds (NDEBUG) made with the same options and the same toolchain, and staged in private prefixes; system Mesa was not touched. GL reports Correctness on this head
gpubench-gl ABBA (base, #979, #979, base)Each value is the median of 5 runs of 250 ms. Delta is #979 vs base; + means #979 is faster.
What the revert costs on J773g
What it gains
Everything else is within ±3.6%. Not covered here: Vulkan (this PR does not change it) and CTS. |
|
3432e67 J316s (M1 Pro, G13S C0, 7.3.0-aurora-fleet89) PASS (isolated ICD, MESA_SHADER_CACHE_DISABLE=1): render.postfx 1080p msaa=1 control 632ca19 FAIL 3/3 (valid=false, ctr=(0,249,0,255)/(0,250,0,255)) -> 3432e67 PASS 3/3 (valid=true, crc=b52e3012, 600-615 fps); gpubench-gl render.light ok (284.1 us), gpubench-vk render.light/compute.light ok (290.7/151.2 us), dEQP-GLES3 abs 48/48, dEQP-VK api.smoke 8/8; 0 GPU faults, 0 AVC, 0 failed units, Enforcing. (J413 G14G confirm row queued behind current M2 lock.) |
|
Neo row: MacBook Neo (J700, Head
No regression at
Two passes,
What the revert costs on G17P: depth-2 |
|
3432e67 J413 (M2 Air, G14G B0, 7.3.0-aurora-fleet89) PASS (isolated ICD, MESA_SHADER_CACHE_DISABLE=1): render.postfx 1080p msaa=1 control 632ca19 FAIL 3/3 (valid=false, ctr=(0,250,0,255)) -> 3432e67 PASS 3/3 (valid=true, crc=b52e3012, 760-790 fps); gpubench-gl render.light ok (252.0 us), gpubench-vk render.light/compute.light ok (214.5/132.9 us), dEQP-GLES3 abs 48/48, dEQP-VK api.smoke 8/8; 0 GPU faults, 0 AVC, 0 failed units, Enforcing. |
|
Independent review and merge verification at
Merging. |
What: Revert merge commits
ba9bcc76c11(#896) and3fc1b773a41(#822). On M1 Pro (G13S) and M2 Air (G14G),gpubench-gl render.postfx(1080p, msaa=1) fails its output check: the centre pixel reads(0,249,0,255)instead of a bright orange, with CRCs that vary between runs. A bisect on a bare-metal M1 Pro put the last good commit at83150137f7f(#821) and the first bad one at3fc1b773a41(#822). It passes withASAHI_MESA_DEBUG=sync, which turns off multi-command submissions, and still fails withGALLIUM_THREAD=0. M3 Air (G15G) passes.On G13, G14 and G14X the kernel accepts
DRM_ASAHI_RENDER_FRAGMENT_BARRIERSand then adds no wait at all for the earlier render. It relies on the order of the fragment queue instead (drivers/gpu/drm/asahi/queue/mod.rs, kernel commit24a7cfa37871). #822 sets that flag on renders that depend on an earlier render, and queues the passes of a multi-pass chain into one submission. #896 (inter-submission barrier elision for disjoint AGX3 batches) is built on #822's written-BO list and per-batch submission state, so it is reverted with it. Both will re-land together with ordering that holds on every GPU.Later commits that used #822 code are adapted, not reverted:
agx_resource_set_valid()is kept.Tested:
3432e675337d(--suite asahi): 194/0.asahisuite with asserts on (debugoptimized), every test built at that commit: 287 pass, 3 fail. The 3 areasahi-egl-priority-{allow,deny,once}, which fail the same way onaurora-wipc440b7f03c2. Passing:asahi-{g13g,g17p,t6041}-gallium-submit,asahi-{g13g,g16g,g17p}-threaded-context,asahi-{g13g,g15c,g15s,g17p,t6041}-gallium-vs.DjDeveloperr/mesaci/revert-pr822-gl-coalesced-submits.Risk: two-way. GL multi-pass chains go back to one submission per batch, and the vertex half of a render waits for the earlier render again. #822's GL submission gains and #896's AGX3 barrier elision are lost until the re-land.
Not yet:
render.postfxrows on M1 Pro and M2 Air, expectingvalid=true.