Repository navigation
vk: preserve immutable samplers during descriptor copies - #445
Draft
pablogonz12 wants to merge 1 commit into
Draft
pablogonz12 wants to merge 1 commit into
pablogonz12 wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
Owner
Author
|
Prepared an owner-only single-file AArch64 glibc immcopy probe from exact PR source 1c65e33 and the existing #460 embedded-SPIR-V generator. Native RX 9070 XT RADV actual readback: repeat and inside blue; direct and copied red; pass=true. SPIR-V validation and warning-clean builds passed. Exact baseline and candidate hashes/provenance verified, and an interleaved guarded X4 owner test request recorded. Mali pixel evidence remains pending; no device access or production driver changes in this pass. |
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.
Summary
Fix copying a combined image descriptor into a binding with immutable samplers.
mali_dset_copy()previously copied the whole element, replacing the destination sampler with the source sampler. It now copies only the image descriptors and keeps the destination's immutable sampler.The image portion can contain two texture descriptors for YCbCr, so the copy length follows the destination's plane count. Mutable destination samplers still copy normally. No extension flags, compiler transformations, or driver defaults change.
Evidence
t_descregression produces 18 failing assertions against unchanged main's implementation.vk/tests/build-t_desc.shpasses with zero failures. Fifteen configurations cover v10/v11/v13 descriptor layouts, all four ordinary mutable/immutable source/destination combinations, synthetic two-plane YCbCr descriptors, array offsets, binding gaps, untouched neighboring elements, and unchanged source data. These are host byte checks, not GPU rendering evidence.vk/check.sh --no-build: OK, 280okrows. The optional standalone state-sweep binary is absent and its row is skipped.1c65e336; SHA-2569b46388c505cab492138eeaf9df331dd3ea0fc47b8e1fd22936569eab1d9ad8b.t_vk_feat --only immcopy. It samples a copied image at a coordinate where the source's repeat sampler produces blue, but the destination's immutable clamp sampler must produce red. Independent source-repeat, fresh direct-write, and in-range image controls prevent a missing copy/draw from passing. Fake-backend recording passes on v10/v11/v13; pixels are explicitly skipped there.Additional sanitizer run
The complete
MALI_SAN=1 vk/check.shrun did not pass: 244okrows and three failures (KCPU pending fence model,async import reader drain, andvk_trace v10). All three newimmcopyfake-GPU rows passed under ASan/UBSan.The standalone KCPU/import tests do not compile
mali_descriptor.c; their input sources are unchanged from main. Both passed when rerun without the harness-wide ASan preload. The KCPU failure reports a fixed-address BO mapping collision (File exists). The trace test intentionally faults and requires SIGSEGV termination; it passed with ASan's SIGSEGV interception disabled (handle_segv=0). These observations are recorded as sanitizer-harness limitations, not as a passing full sanitizer gate or hardware evidence. No unrelated harness behavior was changed in this PR.Hardware status
Not yet hardware-validated. X4 was reachable and passed the initial health check, but the guarded runner refused to proceed because Android Settings was foreground with the screen on. No files were staged, no application was launched, and no phone settings or installed drivers were changed. CMF was not reachable through the configured device wrapper and wireless discovery.
A bounded, hash-verified before/after regression run is prepared, followed by the guarded product smoke. Keep this draft until hardware evidence is available. No performance claim is made.
Specification
The immutable sampler contract applies to combined image descriptor updates: only image views change, while immutable sampler updates are ignored.
VkCopyDescriptorSet's prohibition on immutable destinations applies to standalone SAMPLER descriptors, not COMBINED_IMAGE_SAMPLER descriptors.Merge Danger
Door: Two-way, revertible.
Blast radius: Descriptor copying for immutable combined-image bindings, shared by the GPU architectures. Changes are confined to
mali_descriptor.cand regression tests; existing overlapping driver lanes are untouched. Hardware smoke remains required before merging.