Skip to content

test(agc): skip the straddling import check on a device without a sparse queue of its own - #23993

Closed
GiannisG1 wants to merge 1 commit into
boykopovar:mainfrom
GiannisG1:test/sparse-straddle-needs-sparse-queue
Closed

GiannisG1 wants to merge 1 commit into
boykopovar:mainfrom
GiannisG1:test/sparse-straddle-needs-sparse-queue

Conversation

@GiannisG1

Copy link
Copy Markdown
Contributor

What

agc_driver_sparse_dma_buf_straddle (new with #23272) fails on lavapipe whenever /dev/udmabuf can be opened:

AGC graphics: straddling import: a 2 MiB range across a chunk boundary was imported as a buffer object of its own instead of being bound into the two chunk imports

The test imports its ranges at map time (ImportGuestMemory(..., false), without the GPU lock). createSparseDmaBufImport binds such a range only on a device with a queue of its own that binds sparse memory. Without one, the bind would need the GPU mutex, so it returns early and the range takes a udmabuf of its own, as the "Sparse dma-buf imports" debt entry says ("when it is imported at map time on a device with no second family"). lavapipe has a single queue family, so the straddling range is never chunk-bound there. The check holds on RADV, which has a second family, and NVIDIA and the Intel HD 630 already skip the test (no dma-buf import, no sparse binding).

The test now skips after the range inside one chunk has been imported, checked and filled, when the device has no sparse queue of its own (sparseQueue / sparseQueueMutex of the context, the condition createSparseDmaBufImport uses): skipped, the device has no queue of its own that binds sparse memory, so a range imported at map time is not bound into the chunk imports. On a device with one, nothing changes.

Tested

Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, under Xvfb, with /dev/udmabuf access, head on main 0626a8334f. lavapipe from Mesa 26.0.8 (the release tarball, sha256 as in its release notes) selected with VK_DRIVER_FILES.

Device main this PR, 3 runs
llvmpipe, Mesa 25.2.8 fails, message above the range inside one chunk passes, then skips with the line above
lavapipe, Mesa 26.0.8 fails, message above the same as llvmpipe
Intel HD Graphics 630, Mesa 25.2.8 skips: the device has no sparse binding the same
NVIDIA GTX 1050 Ti, 580.178.04 skips: the device does not import shared memory through dma-buf the same
  • The failure does not come from fix(agc): probe sparse dma-buf binds before binding imports sparsely #21649's sparse dma-buf probe: with fix(agc): probe sparse dma-buf binds before binding imports sparsely #21649 applied it is the same on both Mesa versions, with APS5_SPARSE_DMA_BUF_IMPORTS at probe, on or off. The two PRs touch different files.
  • check_skips.py accepts every skip.
  • Khronos validation layer 1.4.363.1 (LunarG SDK), VK_LOADER_DEBUG=layer, on llvmpipe and lavapipe 26.0.8: the loader inserts the layer, and no VUID-, SYNC-HAZARD- or UNASSIGNED- message appears.
  • The source-scanning tests (public_headers, the conventions, checker and tools tests, 318) pass.
  • check_conventions.py, check_test_registration.py, check_main_sync.py (merges cleanly) and check_compile.py are clean. pr_overlap.py --branch: no overlap with open pull requests (2 share a file and merge cleanly).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce GTX 1050 Ti (580.178.04), Intel HD Graphics 630 (Mesa 25.2.8 ANV), llvmpipe (Mesa 25.2.8) and lavapipe (Mesa 26.0.8), Linux Mint 22.3 (kernel 7.0)
  • AI-assisted: yes

🤖 Generated with Claude Code

…rse queue of its own

A range imported at map time is bound into the chunk imports only on a device
with a queue family of its own that binds sparse memory: without one the bind
would need the GPU mutex, so createSparseDmaBufImport declines and the range
takes a udmabuf of its own, as the "Sparse dma-buf imports" debt entry says.
lavapipe has a single queue family, so agc_driver_sparse_dma_buf_straddle
failed there whenever /dev/udmabuf could be opened. The range inside one chunk
is still checked first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the queue check matches the import path’s requirements and preserves the straddling assertion on devices that can bind it.

What I ran

Reviewed head 5ce83ccd51da53680edbc24d6b53b029e35b8407 and the changed test plus its import-path and context definitions. No commands or tests were run.

Results

Check Result Note
Changed-line review passed All six added lines read
Hardware and automated checks not run Results in the PR description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

The reported GPU runs, source-scanning tests, and checks were not independently run. The only changed file, core/libs/prx/libSceAgcDriver/tests/execution/SparseDmaBufStraddle.cpp, was read in full; no files were excluded by the manifest.

To get this to a good state

Nothing is required.

@GiannisG1

Copy link
Copy Markdown
Contributor Author

Closing: the test this PR adjusts left main with the revert of #23272 (#24052). If #23272 comes back, its test needs to handle the runner's Mesa 25.2.8, where a sparse bind of dma-buf memory loses its GPU writes, rather than this skip: #23272 (comment). Thanks for the review.

@GiannisG1 GiannisG1 closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants