Repository navigation
fix(agc): submit tiled multisample test targets before destroying them - #4907
Merged
oneandonlydean merged 1 commit intoOct 13, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
The tiled cases of agc_multisample_guest_access destroyed each target while its layout transition and clear were still recorded, so the recorder later submitted commands for destroyed images and lavapipe crashed executing them. Each case now submits and waits first, as the linear case does. The 2x case runs only when the device renders 2x color, like the 8x case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
agc_multisample_guest_accesssegfaults in the Linux CI job on currentmain(llvmpipe). It started with #4199, which added three tiled cases tomultisampleGuestAccessTestsintests/Recorder.cpp.Each new case calls
MultisampleTargetView, which records the new image's layout transition and clear into the recorder's open batch, and thenClearMultisampleTargets, which destroys the image. Nothing is submitted in between. The recorder submits that batch later (at the latest in~Recorder), so the queue executes commands for images that no longer exist. lavapipe runs the commands on the CPU and crashes in its queue thread while the main thread waits inRecorder::~Recorder->Sync.The 2x case also ran without checking that the device renders 2x color. lavapipe reports 1x and 4x only, so the target constructor throws "the device cannot render color with the target's sample count" there. The 8x case already has this check.
The test passed for the testers on Windows NVIDIA and Linux RADV, which support 2x and did not crash on the stale commands. #4199 was merged without a full build, so the llvmpipe job never ran on it.
The fix is in the test only:
Submit,WaitQueue,Sync) beforeClearMultisampleTargets, as the linear case above them already does;framebufferColorSampleCountshasVK_SAMPLE_COUNT_2_BIT.guard()inMultisampleTarget.cppis unchanged. The emulator's own teardown syncs and destroys the recorder beforeClearMultisampleTargets.Tested
BUILD_TESTING=ON:main(c13dc7e):agc_multisample_guest_accesssegfaults, the same as the CI Linux job;ctest -R "agc|shader"with this PR: 453 of 457 pass. The four failures areagc_driver_prepared_shaders*, which this does not touch; they pass in the CI Linux job and were not rerun on unmodifiedmainin this container.python3 tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_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)