Repository navigation
fix(agc): retain registered headers sharing shader code - #2856
Merged
adriadam10 merged 2 commits intoOct 10, 2026
Merged
Conversation
This was referenced Oct 10, 2026
This was referenced Oct 10, 2026
9 tasks done
|
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.
|
Keep each registered header and its prepared shader state instead of replacing every registration for the same code address. Resolve explicit ABIs by header and programs by type, preserving re-registration order. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
|
Checked the diff, Added one commit: a bullet in Merging. |
adriadam10
force-pushed
the
fix-agc-shared-code-two-headers
branch
from
October 10, 2026 23:06
a60c8f7 to
946158a
Compare
6 tasks done
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
Registering another header for the same code address replaces the first snapshot on main. An ABI that still refers to the first registered header then fails, even when both headers were explicitly registered with different binary types.
Retain each registered header and its prepared state for unchanged code. ABI resolution finds the matching registered header; draws and dispatches select the registered binary type for their stage. Within a type, the last registered header wins as before. Re-registering an identical earlier header makes its original snapshot current again without preparing it again. Changed code invalidates the older registrations.
Unregistered header differences still throw. A geometry front entry matching both type 2 and type 4 is rejected as ambiguous. Main selected the last registration's type instead.
HeaderSelectiontests this new lookup refusal. Registration and static ABI preparation keep their existing timing; this adds no preparation fallback at draw.Retained headers live until code replacement or driver shutdown. Keeping their snapshots increases memory use and requires scanning the headers for a code address. Reordering an earlier registration also invalidates the registry's ABI and draw caches, while retaining the prepared artifacts.
Related public report
Public report #2700 records this refusal in Ghost of Yōtei (PPSA26344, 01.008) on Linux with lavapipe. It describes relocated pointer fields without a changed type. This change addresses explicitly registered headers; it does not accept an unregistered relocated copy or establish that the reported title is fixed. Ghost of Yōtei was not run here.
#1837 remains the rule for bound copies differing only in user_data or padding. This retains #639's registration and static ABI preparation.
Tested
CachyOS Linux, GCC Release build, RTX 4070 Ti (NVIDIA 615.78.08), AMD integrated GPU (RADV RAPHAEL_MENDOCINO), and Mesa lavapipe (llvmpipe, LLVM 23.1.1).
SharedCodeHeadersinagc_driver_prepared_shadersregisters one synthetic program as type 2 and type 4, resolves the first header and submits two draws. A third draw uses a newly registered type-2 header with distinct metadata pointers; a fourth follows re-registration of the original header. All complete without an exception. On mainde5e541d8with lavapipe, the two-draw fixture fails at ABI resolution with the replaced-header refusal, before its first draw.agc_driver_prepared_publicationasserts snapshot selection and lifetime, identical re-registration order, changed-code invalidation and ambiguous type rejection. The prepared shader, graphics, publication and export group passes 10/10 on all three drivers. The draw checks establish successful submission; they do not measure compilation counts.agc_driver_dcc_keys_first_writefailed; lavapipe 225 passed, 27 feature skips andagc_driver_f64_fma_subnormalsfailed. Both failures reproduce with the same error on an isolated build of mainde5e541d8.agc_driver; the same test segfaulted on isolated main. The final full RADV run passed it.tools/check_conventions.py --base origin/mainandgit diff --checkpass.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)