perf(agc): leave the unmapped levels below a T# minimum LOD without device memory #13646
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13646"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-30T21:16:26Z.
What
A title that streams texture mips by mapping pages keeps a T# over the whole mip chain, sets
MIN_LODto the first level it has streamed in, and leaves the guest memory of the levels above it unmapped. The sampled texture is still made with every level, so the device allocates and uploads levels the GPU never reads and the guest never wrote.Spider-Man 2 (PPSA03016 01.004.003) resolves a 22,528-record bindless T# heap in one compute dispatch (shader
0x11e2b3d500, image table 0 at0x1197030000, 22,528 keys, not narrowed). Its 7,509 distinct textures span 15,394 MiB of mip chains, of which 1,052 MiB are committed guest memory; 6,259 of them haveMIN_LOD > 0, and the levels above it are exactly the unmapped ones (13 exceptions). Making all of them took 15 GiB of device memory in about 10 s on a 16 GiB card (11.2 GiB device-local plus 4 GiB placed in host memory), and the run was stopped there.The texture is now created as a sparse residency image when the device has
sparseResidencyImage2Dfor its format. The image keeps its full extent and level count, and only the levels at and below the clamp get memory (the mip tail and the whole levels fromfloor(MIN_LOD)on). The levels above stay unbound, are not uploaded, and are never sampled, since the view keeps the T#'sMIN_LOD. Sampling, explicit LOD, the_clclamp operand, size queries and image loads see the same image as before. This is a memory change: frame time is not expected to move.UnmappedLevelsBelowMinLodcounts the leading levels of a 2D or 2D-array T# (base level 0, not depth-compare, sRGB-expanded or created from a clear value) belowfloor(EffectiveMinLod)whose guest memory has no committed page in any layer. A committed byte, a guest mip-tail level or the view's last level stops it.SparseLevelsSupportedchecks the device feature,VK_EXT_image_view_min_lod(so the view carries the clamp), the image format properties with the sparse flags, andvkGetPhysicalDeviceSparseImageFormatProperties. Otherwise, or withAPS5_NO_SPARSE_TEXTURE_LEVELS, the texture is made whole as before. The detile, repack and copy loops start at the first resident level.PlanSparseLevelsturns the image's sparse memory requirements into binds: the color levels from the first resident one up to the mip tail, the color mip tail (one, or one per layer), and every metadata mip tail (one withVK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, otherwise one per layer, each withVK_SPARSE_MEMORY_BIND_METADATA_BIT). Requirements with an aspect other than color and metadata, or without color, give no plan, and the texture is created again as a whole image.BindSparseLevelsallocates one block for the plan and binds it withvkQueueBindSparse, waiting on a fence, as resident heap mirrors do. Without a queue of its own the bind needs the GPU lock, so it is used only by a thread that holds it.sparseResidencyImage2DwithsparseBinding, andContextcarries it andvkGetPhysicalDeviceSparseImageFormatProperties.Tested
Arch Linux (kernel 7.2.11), AMD Radeon RX 9070 XT (RADV GFX1201, Mesa 26.2.6), Release. Head
6a3769c50fis this branch rebased onto maina4eca2a056plus the cleared-texture fix; the results below up to the paired validation are from earlier heads, and the last paragraph of this section is the rerun on6a3769c50f.agc_driver_texture_sparse_levels(new):VK_SPARSE_MEMORY_BIND_METADATA_BITbind, a per-layer one adds one per layer at the stride; levels past the tail bind the tail alone; a depth aspect, or requirements without color, give no plan.MIN_LOD2.0, linear, with levels 0 and 1 in uncommitted pages, against the same texture with every level committed:image_sample_d_cl,image_sample_cland the two offset variants on 32 threads give the level the hardware selects (max(LOD, clamp operand, MIN_LOD)) and the same results for both textures, and the sparse one holds 196,608 bytes against 2,818,048.MIN_LOD2 the texture samples as before; withMIN_LODlowered to 1 it samples as the fully committed texture atMIN_LOD1, and holds 720,896 bytes (level 1 is bound now) against 2,818,048.MIN_LOD2, levels 0 and 1 in uncommitted pages, must hold as many bytes as the same cleared texture atMIN_LOD0, sincevkCmdClearColorImageclears every level. With the old condition (noclear != nullptr) it fails:a cleared texture with levels 0 and 1 unmapped holds 1441792 bytes at MIN_LOD 2 and 22413312 at MIN_LOD 0.APS5_NO_SPARSE_TEXTURE_LEVELS=1the sampling checks pass and the memory check fails:the texture with unmapped levels above its minimum LOD holds 2818048 bytes, the one with every level mapped 2818048.Paired validation, same machine and session,
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1,ctest -Von main809c7fa2dfand on head8029cae292(this branch merged with that main):agc_driver_bc_block_copy,_bindless_images,_image_sample_bias_a16,_image_sample_lod_clamp,_image_sample_unnormalized,_image_table,_image_table_cache,_image_table_cache_bounds,_image_table_reuseand_sampled_cache_budgetpass on both (100% tests passed out of 10), and withagc_driver_texture_sparse_levelson the head (100% tests passed out of 11). No "was not found but was requested" line and noVUID-line on either side. Layer insertion, fromVK_LOADER_DEBUG=layeron each side:On head
6a3769c50f, same machine, same validation environment:agc_driver_texture_sparse_levels,agc_driver_sampled_clear_keys,agc_driver_idle_store_yieldsand the ten tests of the paired run above pass (100% tests passed out of 13), with noVUID-line and no "was not found but was requested" line.agc_driver_idle_store_yieldsalone: 8 of 8 runs pass on RADV. Lavapipe is not installed here, so I could not run it there; #14066 describes two races in that test's fixture that make it fail intermittently onmain.On head
17770dd69f(the review follow-up:SparseLevelsSupportedalso requiresimageViewMinLod, and the repack loop starts at the first resident level), same machine and validation environment:agc_driver_texture_sparse_levels,agc_driver_sampled_clear_keysandagc_driver_image_sample_lod_clamppass (100% tests passed out of 3), with noVUID-line, and the validation layer is inserted in all three. WithAPS5_NO_SPARSE_TEXTURE_LEVELS=1,agc_driver_texture_sparse_levelsfails on the memory check again (2818048bytes on both sides). No test covers a repacked format with skipped levels.Performance
Spider-Man 2, with #9790 (
24ff84dd34) on both sides for the earlier shader stop: mainb8f0a6b202+ #9790 (4c68ffe73d) and this head879779949a(the branch merged with that main) + #9790 (8a57e4064d), headless 1920x1080 output (the title renders 3840x2160), Cross every 30 s, warm shader caches (each build ran the scene once before its capture). The base build cannot reach a scene after the table dispatch, so the capture window is the logo sequence both reach,APS5_TRACE_SECONDS=55:10, where frame time is expected to be equal.tools/trace_digest.py:The p99 and max are the logo sequence's loading stalls (frames of 0.4 to 2.3 s in the window). Interval summaries of the warm-up runs (
APS5_TRACE_SUMMARY_EVERY=10) give the same picture: frame p50 68.7 / 63.8 ms on main in the 53-63 s and 63-73 s intervals, 62.3 / 62.1 ms on the head in the 48-58 s and 58-72 s intervals.Memory at the table dispatch (per-process
drm-total-vramfrom fdinfo every 10 s, and the system's free VRAM/GTT from our memory guard):ReadConstBuffer@pc=0x00009a2c)The main + #9790 row is its warm-up run: its capture run stopped making progress at about 140 s, before the dispatch (VRAM flat at 2,694 MiB until the 280 s timeout,
storage image 0xb27fc90000+0x870000: memory no longer registered; 1 pending ranges droppedamong the last lines), after the capture window.Trace files: main + #9790 (
aps5-trace-4c68ffe73d02-949919), this head + #9790 (aps5-trace-8a57e4064de8-1006991).Game runs on this head + #9790 in this session: the warm-up run aborted at 186 s on the same
ReadConstBuffer@pc=0x00009a2crefusal (shader0x11e2b47900), before the table dispatch (5,046 MiB of VRAM at 170 s, free VRAM never below 5,462 MiB); the capture run above. The stall in the main capture run is the one described for earlier heads, and it is not specific to this change: with these runs it has been seen in 1 of 17 runs with this change and 2 of 13 without it.Checklist
main; no other open PR implements the same functions (#12746 drops top levels on request and is lossy; this keeps the image whole)NotImplemented_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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T21:51:42Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The
perfreport still lacks the required matched capture summaries, and the paired AGC validation evidence does not identify results for this exact head.What I ran
Reviewed head
7dfff6a6391bbc0826009e81e8cc8c455c137854against PR basee584b5a7ebe7cad2a2fd7df44243352f623f957a; a merge preview against currentmainf1e340be4a6e67440f1d2b2574ede902140cbed4was clean. Environment: Debian 12 x86-64, Python 3.11.2, GCC 12.2.0; no project build or C++ test was run locally.Results
f1e340be4a6e67440f1d2b2574ede902140cbed4; no declared dependency.tests/execution/*.cppglob includes it.perf numbers missing; the description contains no matchedaps5-summary.jsonlpair, attached traces, ortrace_digest.pyoutput.b0da41e81f; the latest head is7dfff6a6391b.Unedited output from focused checks
Findings
Blocking
perf(agc), and the repository requires a valid summary line formainand for the change from the same title, scene, and machine, plus both traces. The current description has memory-use measurements, but noaps5-summary.jsonllines, trace attachments, ortools/trace_digest.pyoutput; GitHub still appliesperf numbers missing. Please attach the matched captures and digest output, with the changed capture built from the reviewed head.mainand the change with the validation layer and required Vulkan environment, and comparison for new VUIDs. The description identifies main21a556f567and says the test passed “on this branch,” without naming the tested PR SHA or supplying the exact logs. It also says the game runs usedb0da41e81f, not current head7dfff6a6391b. Please provide the exactmainand PR SHAs and paired logs for the current target and reviewed head, including the required environment, layer-insertion confirmation, and VUID comparison. If those results were not run on7dfff6a6391b, rerun the focused suite there.Non-blocking
The test-quality warning is a heuristic false positive:
CMakeLists.txtuses aCONFIGURE_DEPENDSglob overtests/execution/*.cpp, so this test is discovered. I found no additional source-level blocker in the inspected test and sparse-binding paths.Sources
Not verified
I did not build or run C++ tests locally, or run Linux, console, macOS, NVIDIA, or other GPU behavior. The reported RX 9070 XT results are author-provided; I did not independently reproduce the game or validation runs. Hosted Windows passed, but it does not supply the missing performance captures or exact-head hardware evidence.
To get this to a good state
Attach the required performance captures and exact-head paired Vulkan validation evidence, or rerun those checks on current
mainand7dfff6a6391bbc0826009e81e8cc8c455c137854. I will rerun the same relevant no-build checks and reassess the evidence on the new head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T08:05:50Z.
Review: CHANGES_REQUESTED
Re-checked — new head, changes requested
The update adds performance summaries and exact-head test results, but the traces are not attached and the paired validation uses an outdated
mainrevision.What I ran
Reviewed head
068304dd6fff9dcd3d7b8ee2379ec4535228322dagainst PR basee584b5a7ebe7cad2a2fd7df44243352f623f957a. The merge preview against currentmaine8c25dd3baa6e78531d5eee067fec5cbe8af3dcfis clean. Environment: Debian 12 x86_64, Python 3.11.2, GCC 12.2.0. I did not build or run GPU tests locally.Results
main21a556f567; 11/11 on PR head068304dd6f; no reported missing-layer or VUID lines21a556f567; current main ise8c25dd3baa6e78531d5eee067fec5cbe8af3dcf. Main changedVulkanDevice.cppbetween those revisions, and this PR also changes that fileUnedited local check output
Findings
Blocking
The PR description names
aps5-trace-e201f2641bfe-3022567.json.gzandaps5-trace-b01b0e895c6a-3449435.json.gz, but neither is linked or attached. The performance report form requires both trace files to be attached. Please attach them. Performance-report rule · Performance report formThe paired validation run compares the PR head with
main21a556f567, while currentmainise8c25dd3baa6e78531d5eee067fec5cbe8af3dcf. BecauseVulkanDevice.cppchanged between those revisions and is also changed by this PR, the old baseline does not verify the current-base behavior. Please rerun the same focused validation tests on currentmainand this exact PR head, with the required environment, layer confirmation, and VUID comparison. PR's changed file at reviewed head · current main fileNon-blocking
The static precheck could not run its ABI and test-quality helpers because those workspace-only scripts are not present in its isolated checkout. I found no additional blocker in the inspected sparse-level planning and streaming changes.
Sources
Not verified
I did not independently reproduce the author's GPU test or performance runs. The PR's hardware results are author-reported; hosted Windows passed, while Linux and specialized GPU jobs were skipped.
To get this to a good state
Attach both traces and rerun the paired focused validation tests against current
mainand head068304dd6fff9dcd3d7b8ee2379ec4535228322d. I will rerun the same relevant checks on the new head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T12:25:02Z.
Review: CHANGES_REQUESTED
Re-checked — new head, changes requested
The trace report still compares head
068304dd6fff9dcd3d7b8ee2379ec4535228322dwithmain21a556f567, while the submitted head is now879779949a32e9cfff72307317893c9b1e121563and livemainis60bdb061356db736928eee431cd8bd4c9ba68036; livemainhas since changed three paths touched by this PR.What I ran
Reviewed the exact submitted head
879779949a32e9cfff72307317893c9b1e121563against PR baseb8f0a6b2025605b78eb70646bda79f458a577c82and livemain60bdb061356db736928eee431cd8bd4c9ba68036. The current-main merge preview is clean (4a5fd54d0a0d250bdcf2c9abb2b687fca9d2b255). Environment: Linux x86-64, GCC 12.2.0, Python 3.11.2. I did not build or run GPU tests locally.Results
All conventions checks passed.4a5fd54d0a0d250bdcf2c9abb2b687fca9d2b255068304dand baseline21a556; it does not cover the current submitted head and livemainVulkanDevice.cpp,Texture.hpp, andTexture.cppchanged between21a556f567and currentmain; these paths overlap the PR’s implementation068304d; no current-head run was independently performed hereUnedited local output
git diff --checkproduced no output and exited 0.git merge-tree --write-treeprinted:Negative control
Findings
Blocking
21a556f567, livemainchangedVulkanDevice.cpp,Texture.hpp, andTexture.cpp, all in the sparse-texture implementation area touched by this PR. The submitted head also advanced from068304dto8797799. Please provide pairedaps5-summary.jsonllines for livemain60bdb061356db736928eee431cd8bd4c9ba68036and the current PR head, from the same title, scene, and machine; attach both traces and includetools/trace_digest.pyoutput. Keep the report’s memory comparison, since frame-time improvement is not claimed.Non-blocking
None.
Sources
mainsince the reported baselineNot verified
I did not run a local build, capture GPU traces, or rerun the tests. The current Windows product job was in progress; Linux product checks were skipped.
To get this to a good state
Provide the paired current-main/current-head trace evidence requested above. I will re-run the same static checks and review the report on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-31T12:50:34Z.
Review: CHANGES_REQUESTED
Checked the level selection, the sparse bind plan with metadata tails and the skipped uploads for unbound levels. One point before this can go in:
Texture.cpp:501: a texture created with aclearvalue (the constructor parameter that landed onmainafter this branch started) still goes throughUnmappedLevelsBelowMinLod, so it can be created as a sparse image.vkCmdClearColorImageatTexture.cpp:574then clears every level, and the levels aboveMIN_LODhave no memory bound on the sparse path. A cleared texture has no guest memory to skip, so it should be made whole:depthCompare || srgbExpand || clear != nullptr ? 0u : UnmappedLevelsBelowMinLod(...). A test case with a clear value andMIN_LOD> 0 would pin it.Merge main ...commits (8029cae292,879779949a); a rebase ontomaindrops them. It conflicts only in theTextureconstructor signature, where both theclearparameter and the new helpers stay.Our rebase with the fix above built, but
agc_driver_idle_store_yieldsfailed on lavapipe in two runs and passed 16/16 on RADV and 48/48 under load, with and withoutAPS5_NO_SPARSE_TEXTURE_LEVELS, so I could not tie it to this change. Please check it on the rebased head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T18:32:01Z.
Review: DISMISSED
Re-checked — new head, changes requested
The sparse-image guard still permits a cleared texture with
MIN_LODabove zero, although the clear path writes every mip level and the sparse path leaves upper levels unbound.What I ran
Reviewed submitted head
879779949a32e9cfff72307317893c9b1e121563against PR baseb8f0a6b2025605b78eb70646bda79f458a577c82; the independent merge preview against currentmainca073ec3ad0d766ea9f4658e418a5c977001a353was clean. Environment: Linux x86-64, Python 3.11.2, GCC 12.2.0.Results
mainagc_driver_idle_store_yieldsfailed twice on lavapipe and passed on RADV. The comment does not identify that rebased tree as this submitted head.Unedited local check output
git diff --checkexited 0 with no output. The stack report says the individual preview againstca073ec3ad0d766ea9f4658e418a5c977001a353was clean.Negative control
MIN_LOD > 0avoids clearing unbound mip levelsFindings
Blocking
At
Texture.cpp,unmappedis computed without consideringclear, so a cleared texture may setskipand create a sparse image. The clear branch then passes a range covering every mip level tovkCmdClearColorImageat the same head. WithMIN_LOD > 0, the sparse plan leaves the skipped levels unbound, yet the clear covers them. Please make cleared textures use the whole-image path (for example, includeclear != nullptrin the condition that disablesunmapped) and add a regression case with a clear value andMIN_LOD > 0.Non-blocking
None.
Sources
Not verified
I did not build or run the C++ tests, Vulkan validation, GPU captures, or console behavior. I did not reproduce the reported lavapipe failure or RADV passes. The helper failures are tooling limitations caused by scripts absent from the isolated PR snapshot.
To get this to a good state
Disable sparse mip omission for cleared textures and add the
clear != nullptrplusMIN_LOD > 0regression. Please rerun the affected focused test on the exact rebased head, including the lavapipe case that failed in Adria's report. I will rerun the same no-build checks and review the new head.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T09:09:37Z.
Review: COMMENTED
Reviewed — comments
The PR merges cleanly, builds, and passes the conventions check, the tests and the validation comparison here. The sparse-plan cases that need no device fail when I break the metadata bind. I found nothing blocking. I'm leaving a comment instead of an approval because lavapipe skips the sparse device path, so I could not run it on this machine.
What I ran
Head
6a3769c50f13b44639b1c00d6b07c165f181f515, merged with--no-ffintomain4f41f4c375f5abb487dbd184fbc150f31994d762(merged tree427e56d1861b6f8bfc639d29b0434adab4620e8e), in a clean worktree. Machine: Debian 13 VM, 32 vCPU (2× Xeon Gold 6136), GCC 14.2.0, Release, Ninja. Vulkan was lavapipe (Mesa 26.1.6, LLVM 19); there was no GPU.Results
git diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)check_skips.py). No new failures and no timeouts. The 7 known failures also fail onmain.agc_driver_alpha_to_coverage_sample_mask_exportpassed on rerun.agc_driver_texture_sparse_levels(lavapipe, validation layer)the device has no BC texture compression or VK_EXT_image_view_min_lod. The device-freeCheckPlans()runs before this skip and passed.agc_driver_sampled_clear_keys(validation layer)VUID-linesagc_driver_image_sample_lod_clampVK_EXT_image_view_min_lodInsert instance layer "VK_LAYER_KHRONOS_validation"andInserted device layerappear in every log. No "was not found but was requested" line.VUID-vkCmdDispatch-groupCountX-00386inagc_driver_native_depth_uniform_planesmain, not this PR (details below)The new VUID comes from main
The script's validation baseline is
d1ae628bc2. That revision does not have theagc_driver_native_depth_uniform_planestest, which was added tomainlater.8 VUID-vkCmdDispatch-groupCountX-00386.VulkanDevice.cpp,Context.hpp,Texture.hppandTexture.cppfrommain4f41f4c375and rebuiltagc_driver_native_multisample_depth_tests. The result was identical:8 VUID-vkCmdDispatch-groupCountX-00386, and the test passed.The PR's change does not cause this VUID, so I don't count it as a finding.
Negative control
The new test calls
PlanSparseLevels, which does not exist onmain, so the test can't be built againstmain's driver. Because lavapipe skips the device part, I ran a mutation control on the part that does run:PlanSparseLevels, the metadata mip-tail binds got flag0instead ofVK_SPARSE_MEMORY_BIND_METADATA_BIT. I rebuilt and ran the test.sparse level plan: the metadata bind does not carry VK_SPARSE_MEMORY_BIND_METADATA_BIT at the metadata tail.Texture.cppand rebuilt. The test skipped (77) again, andgit status --porcelainwas empty.The negative control for the device path (
APS5_NO_SPARSE_TEXTURE_LEVELS=1makes the memory check fail) comes from the author on RADV and from jacknieland on a GTX 1650. I could not reproduce it here.Earlier findings
Texture.cpp:533now excludesclear != nullptr, and the test has a regression case for it. I could not run that case here: it sits after the lavapipe skip.PlanSparseLevelsbinds single and per-layer metadata tails withVK_SPARSE_MEMORY_BIND_METADATA_BITand refuses other aspects. The test returns 77 when sparse BC1 is not supported. The mutation above shows the plan cases check the metadata flag.perfevidence is now complete: two summary lines with different commits, thetrace_digest.pyoutput, and linked traces. The captures are from the pre-rebase head879779949a. The only later production change is the cleared-texture exclusion, which leaves more textures whole, so the memory numbers are an upper bound on the savings. I'm not treating this as blocking.Findings
Blocking
None.
Non-blocking
VK_EXT_image_view_min_lod.core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:378-382(SparseLevelsSupported).shaderImageMinLod), the view still covers level 0.SpirvImageEmitter.cpp:1666-1684clamps sample operations, including explicit LOD. Anything that reaches a level without going through that clamp would read the unbound levels, for example a fetch with an explicit mip. Before this PR those levels held data uploaded from unmapped guest pages; now they are non-resident memory, which is undefined unlessresidencyNonResidentStrictis set.MIN_LOD". That holds only when the view actually carries the clamp.context.imageViewMinLodto the conditions inSparseLevelsSupported. Every device the PR reports results for has the extension, so this guarantees the claim by construction and costs nothing there.Texture.cpp:677, the repacked-format loop, which still runs from level 0.skip, the same as the detile loop at 668 and the copy loop at 719.Not verified
VK_EXT_image_view_min_lod, so the test skips before any of it runs. What I know about this path comes from the author (RADV RX 9070 XT, on this head), jacknieland (GTX 1650 on Windows, on879779949a) and the NVIDIA CI comment for this head (RTX 2000 Ada, no new validation IDs compared withmain).mainand the change foragc_driver_texture_sparse_levelsmeaningfully, for the same reason.To get this to a good state
imageViewMinLodinSparseLevelsSupportedso that no access can reach the unbound levels.skip.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T10:22:11Z.
Review: APPROVED
Re-checked — approved
Commit
17770dd69fadds two things.SparseLevelsSupportednow requiresimageViewMinLod, and the repack loop starts atskip. Both of my earlier non-blocking findings are resolved, and the checks and the focused tests pass here.What changed since my last review
17770dd69f. The four earlier commits are unchanged (the range-diff shows them as=). It changes two lines ofcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:!context.imageViewMinLodis added to the early return inSparseLevelsSupported;IsRepackedTextureFormatloop now starts atskip.17770dd69frun. It also says that no test covers a repacked format with skipped levels.What I ran
Head
17770dd69feb7a32677d8dbd5cb95ae12a2827b9, merged with--no-ffintomain4f41f4c375f5abb487dbd184fbc150f31994d762(merged tree552e399cb6568801446ae3b7c1cce013d7b34752), in a clean worktree.Machine: Debian 13 VM, 32 vCPU (2× Xeon Gold 6136), GCC 14.2.0, Release, Ninja. Vulkan was lavapipe (Mesa 26.1.6, LLVM 19); there was no GPU.
git diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)check_skips.py). No new failures and no timeouts. The 7 known failures also fail onmain.agc_driver_alpha_to_coverage_sample_mask_exportpassed on rerun.100% tests passed, 0 tests failed out of 3. 0VUID-lines. The layer was inserted in all 3 logs, with no "was not found but was requested" line.agc_driver_texture_sparse_levelsthe device has no BC texture compression or VK_EXT_image_view_min_lod. The device-free plan checks run before the skip.agc_driver_image_sample_lod_clampthe device has no VK_EXT_image_view_min_lod, and graphics pipeline libraries keep T# minimum LODs out of the shaderVUID-vkCmdDispatch-groupCountX-00386inagc_driver_native_depth_uniform_planesas last time. Last time I traced it tomainby restoring the PR's production files frommain. This push changes onlyTexture.cpp, so that result still holds.Negative control
This push does not change the test. Lavapipe has no
VK_EXT_image_view_min_lod, so on this machine the test skips before the device path, and neither new condition can run here. The mutation control on the plan checks from my previous review still applies:PlanSparseLevelshas not changed since. The negative control for the device path on this head is author-reported: on RADV, withAPS5_NO_SPARSE_TEXTURE_LEVELS=1, the memory check fails with2818048bytes on both sides.git status --porcelainwas empty after the run.Previous findings
VK_EXT_image_view_min_lod. Resolved.Texture.cpp:378now returns false when!context.imageViewMinLod.ChainMinLodalready requires the extension for a non-zeroEffectiveMinLod, the base-level views without the clamp are only used for unnormalized sampling, andShaderResources.cpprefuses that sampling whenMIN_LODis non-zero. That is plausible. The skip message ofagc_driver_image_sample_lod_clamphere also shows that, without the extension, the T# minimum LOD stays out of the shader.Texture.cpp:677starts atskip, like the detile loop (668) and the copy loop (719).layerRowspath still copies level 0 frommips[0](707-716). It cannot haveskip > 0:layerRowsis only set for 1D arrays, andUnmappedLevelsBelowMinLodreturns 0 for anything other than 2D and 2D arrays.New findings
Blocking
None.
Non-blocking
None.
Not verified
879779949a;6a3769c50f.skip > 0: no test covers them on any device.