Repository navigation
feat(agc): sample the stencil plane of a native multisampled D32S8 target - #9717
oneandonlydean merged 52 commits into
Conversation
…HTILE fills A 2, 4 or 8 sample D32_SFLOAT_S8_UINT target with its stencil in HTILE is imported natively when every HTILE word proves both planes cleared: the depth range as before, and SMem 0 for the stencil. The stencil plane joins the watched, guarded and generation-checked ranges. A depth-only HTILE, an unaligned stencil plane, or a word failing either proof is refused with its own reason. A fill covering the whole HTILE of a sampled native target is a clear transition, proven at the next sample like the HTILE mask clear: complete tracked stores since the fill, no CPU or queued writes, and every word proving the depth and, with a stencil plane, the stencil clear value. A partial fill and an HTILE mask clear of a stencil target stay refused.
…attern A whole HTILE fill recorded on the GPU is still pending when the title binds or samples the depth in the same frame, so the HTILE words in guest memory are not the fill's yet and the queued write was refused as an external GPU write. The fill's write note is kept with its pattern: while it is still the newest queued write over the HTILE, the clear is proven from the pattern, and the completed tracked store check is not needed for a GPU fill. A later queued write, a CPU write or a pattern that does not prove the clear is refused as before. AI-assisted: yes
Brings upstream main a6dcea9 under boykopovar#6300's two commits. Conflicts: - DepthSurface.cpp prepareDepthSampling: boykopovar#6300's stencil checks are kept and main's 752cca1 drops the ITERATE_256 requirement, so the HTILE check is main's line ("requires pipe-aligned HTILE without VRS"). - DepthSurface.cpp NoteHtileDepthClear and NoteDepthMetadataFill: boykopovar#6300's clear and fill proofs are kept, written with main's first-refusal-wins DepthSamplingState::Refuse. After the proven whole-fill branch, the remaining fills take main's ForgetClear/NoteHtileClear and single-sample plane-fill paths. - NativeMultisampleDepth.cpp CheckDepthTarget takes both boykopovar#6300's ClearSource and main's iterate256, in that order; main's ITERATE_256 call passes ClearSource::HtileDispatch. - docs/dev/debt/libSceAgcDriver.md: one entry with boykopovar#6300's stencil and fill text and main's ITERATE_256 text. Adapted to main: main samples a native multisampled depth target through a shadow copy that is refreshed when the sampled view is looked up (1912045, 5a0a00f). CheckStencilTarget recorded its raster and the fetch in one batch, so the fetch read the shadow from before the raster ("native depth-stencil sampled fetch lost a depth sample or a stencil test outcome"). It now submits the raster, looks the view up again and syncs before the fetch, as main's CheckDepthTarget does.
…ared stencil plane
The Grinch: Christmas Adventures (PPSA07656) binds a two-sample
D32_SFLOAT_S8_UINT target whose stencil is a plane of its own and whose
HTILE is depth-only (DB_STENCIL_INFO.TILE_STENCIL_DISABLE), so HTILE
holds no stencil state. Every byte of that plane is the clear stencil
when the target is first bound. The import refused it ("native
multisample stencil import requires HTILE stencil metadata") and the
title stopped before its first present.
With a depth-only HTILE the stencil is uncompressed in its plane, so the
plane is its own proof: the import scans it once and accepts the target
when every byte equals DB_STENCIL_CLEAR. The depth keeps its HTILE clear
proof. The plane is already one of the import's ranges, accessible,
watched, generation-checked, guarded from guest publication and kept
apart from the depth and HTILE ranges, so a later CPU or GPU write to it
refuses sampling like a write to the depth. The host image is created
cleared to the clear stencil. The plane's base keeps the 64 KiB
alignment of the depth plane: both use SW_64KB_Z_X, the decode takes
the pipe/bank XOR from the depth base's low 16 bits and masks both bases.
A whole HTILE fill of such a target is proven for the depth only and
clears only the host depth: the stencil plane is untouched by the fill
and still proven unchanged since the import.
A stencil plane that is not all clear, a stencil in neither HTILE nor
its own plane, D16S8 and HTILE words that do not prove a clear keep
their refusals.
Tested: agc_driver_native_depth_separate_stencil imports a four-sample
target (two and eight where the device has them), samples the clear
depth, stencil-tests the clear stencil, and refills a depth-only HTILE
keeping a replaced stencil; one stencil byte not clear, a later stencil
write and an unwatched plane are refused. Without the import change the
target refuses "native multisample stencil import requires HTILE
stencil metadata"; without the fill change the refilled target loses
its stencil.
…or without HTILE Once its D32S8 target imports, The Grinch: Christmas Adventures (PPSA07656) samples the depth plane through a T# with no metadata (META_DATA_ADDRESS 0, not pipe-aligned) while the target has its HTILE. The pipe/bank XOR and ITERATE_256 match. CheckResource required the descriptor's metadata to be the target's HTILE and stopped the title with "native multisample depth sampled metadata or XOR mismatch". The host image keeps the depth decompressed, so a descriptor that reads the plane without metadata reads the values a metadata-aware one does. CheckResource now accepts a descriptor with no metadata at all beside one naming the target's HTILE, when its address, format, XOR and ITERATE_256 match. A descriptor with any other metadata keeps refusing. Assumption: on hardware such a read returns the decompressed depth only once the guest has expanded the plane (an in-place expand with compression disabled). Main draws an in-place expand as an ordinary draw that writes the depth attachment (DB_RENDER_CONTROL compress-disable bits are not refused), over a host image that already holds the decompressed depth, and has no out-of-place expand for multisampled planes. Nothing here observes whether the guest expanded first; a title that samples the plane unexpanded gets the decompressed values instead of the raw plane. Tested: agc_driver_native_depth_separate_stencil samples the separate stencil target through a descriptor without metadata, before and after raster writes and after a depth-only HTILE fill, and gets the depth. The same descriptor with another XOR and one naming other metadata are refused. Without the change the first sample refuses "native multisample depth sampled metadata or XOR mismatch".
…th-only HTILE when every word proves the same clear
Ghost of Tsushima (PPSA02225) samples a two-sample D32S8 1920x2160
target with a separate stencil plane and a depth-only HTILE that is
neither pipe-aligned nor ITERATE_256. The import required a pipe-aligned
HTILE.
Pipe alignment only decides where each tile's word sits in the HTILE.
When every word is the same and proves the clear, their order cannot
change what they prove, so a depth-only HTILE that is not pipe-aligned
is imported when all its words are one word proving the clear value.
A non-pipe-aligned HTILE whose words differ is refused ("native
multisample depth HTILE that is not pipe-aligned holds more than one
word"), and one that holds stencil state keeps the alignment refusal.
The range stays HtileMetadataBytes(extent): Ghost's whole-HTILE fill
covers exactly that, 0x50000 bytes for 1920x2160. ITERATE_256 is
already independent of the import (752cca1).
Tested: agc_driver_native_depth_separate_stencil runs every separate
stencil case on a depth-only HTILE that is not pipe-aligned or
ITERATE_256 too, sampled through a descriptor naming that HTILE and one
without metadata; one differing word is refused. Without the change the
target refuses "native multisample depth initial import requires
pipe-aligned HTILE without VRS".
…encil clear
Ghost of Tsushima (PPSA02225) fills the separate stencil plane of its
two-sample D32S8 target with pattern 0 (0x870000) before it samples the
target. Any write over the plane was refused ("guest writes over native
multisample depth are not implemented").
A DMA or compute fill that covers the whole plane of a target whose
depth-only HTILE leaves the stencil in the plane is now recorded like a
whole-HTILE fill. At the next sample it is proven the way a whole-HTILE
fill is: no CPU write since the fill, complete tracked stores since the
fill unless the fill is the plane's newest queued GPU write, and every
plane byte equal to the fill byte once it has landed. The host image's
stencil aspect is then cleared to that byte. A fill that covers part of
the plane is refused ("native multisample stencil plane partial fill
transition is not implemented"), and so is a pattern that is not one
byte, a fill over unwatched memory and a second fill before the plane
was proven.
Tested: agc_driver_native_depth_separate_stencil fills the HTILE, the
stencil plane, or both, after a draw replaced the stencil, on pipe-aligned
and non-pipe-aligned depth-only HTILE, and checks the sampled depth and
which stencil reference the next draw passes. Partial, two-byte-pattern,
unstored and CPU-raced plane fills are refused. Without the change the
first plane fill refuses "guest writes over native multisample depth are
not implemented", and the partial fill refuses with that text instead of
the partial fill one.
…te is recorded after the fill is noted Ghost of Tsushima (PPSA02225) fills the HTILE (0x50000 bytes) and the separate stencil plane (0x870000 bytes) of its two-sample D32S8 target with pattern 0 before it samples the target. Both are DMA_DATA fills larger than 64 KiB. PacketMemory notes a DMA_DATA fill before storeBufferFill records it, so when the range has a host import the fill's GPU write is recorded after NoteDepthMetadataFill took LastWriteNote. The note was then 0, the fill did not count as the queued fill, and the sample that followed in the same batch refused "external GPU writes over native multisample depth are not implemented". A compute fill is noted after its write is recorded and was not affected. When the noted fill had no write note yet, the sample now looks at the writes recorded over the HTILE or the stencil plane since the fill was noted. It takes the one write as the fill's note when that write is the only one, covers the whole range, and is a word fill of the noted pattern. A second write since, a different word or a fill of part of the range keeps the refusal. Everything else is proven as before: complete tracked stores, no CPU write since the fill, and the plane or HTILE words holding the fill once it has landed. The "native multisample depth metadata fill transition is not implemented" stop reported on boykopovar#6300 is set by a fill over the HTILE that does not cover all of it, or by any HTILE fill when the target's sampling never activated. Ghost's fill covers the whole HTILE, so its target was most likely refused at creation, and on boykopovar#6300 the fill's message replaced that refusal. Refusals now keep the first one, so a target refused at creation reports its creation reason after the fills. Tested: agc_driver_native_depth_separate_stencil runs Ghost's sequence (creation of a depth-only HTILE that is neither pipe-aligned nor ITERATE_256 with a separate stencil plane, clear 0 and stencil 0, a whole-HTILE fill of 0, a whole stencil plane fill of 0, then the first sample) with the fill stored, queued after it is noted, and queued before it is noted. Each one samples the cleared depth and passes only the stencil reference 0. A later queued stencil write, a queued HTILE fill of another word and a queued fill of part of the HTILE are refused, and a target refused at creation keeps its refusal after the fills. Without the change the fill queued after it is noted refuses "external GPU writes over native multisample depth are not implemented".
…nce its GPU write is recorded A compute dispatch of the memory-value fill kernel is noted twice: the dispatch path notes it from MatchMemoryValueFill before the fill runs (Dispatch.cpp), and storeBufferFill notes it again after FillBuffer has recorded its GPU write. On a native multisample depth target the second note refused "overlapping native multisample depth clear transitions are not implemented" for the HTILE, and the same refusal for the separate stencil plane, so a compute fill of either one never reached the sample. A second note of a pending fill is now taken as the same fill when it has the same pattern, the first note had no write note, and the one write recorded over the range since the first note is a word fill of the whole range with that pattern. That write's note becomes the fill's note, and the first note's write generation is kept, so CPU writes between the two notes are still refused. Two notes without that write between them still refuse as overlapping (agc_driver_native_depth_stencil's FillOverlap case, and a new stencil plane case). A memory-value fill that falls back to CPU stores, with no host import of the range, is still refused as overlapping. Tested: agc_driver_native_depth_separate_stencil runs Ghost's sequence with each fill noted, queued on the GPU and noted again, and samples the cleared depth and stencil 0. A stencil plane fill noted twice without a write between is refused. Without the change the second note refuses "overlapping native multisample depth clear transitions are not implemented".
…rom that target
Ghost of Tsushima Director's Cut (PPSA02225) renders a 2-sample R8
colour target over the memory of a D32S8 target's separate stencil
plane. The native import proved the plane by reading it, and that read
hit the colour target's guard: "a CPU read of ... overlaps multisampled
color target ..., whose samples are only on the host".
MultisampleTarget gains a query that does not throw: the active colour
target whose guarded range overlaps a range, with its format, samples,
footprint and newest content. A pending fill the target absorbed, a
CMASK fast clear, or a clear it recorded with no draw since is a known
uniform value; a draw, a storage write or any refused metadata is not.
The target records its clears and whether it was drawn since.
prepareDepthSampling asks it for the depth, HTILE and stencil plane
ranges before reading guest memory. An R8 UNORM or UINT target with the
depth's sample count over exactly the plane, holding a known value,
gives the plane's initial stencil, which the first host clear uses. Any
other overlap refuses sampling ("native multisample stencil plane
aliases a multisampled colour target whose samples are only on the
host", or the depth or HTILE form) and prints the colour target's
address, format, samples and newest operation, at most eight times.
CheckCurrent runs the same query: a plane fill over an aliased plane is
proven from the colour target's value, not by reading the plane, and a
colour target that drew, changed value or appeared since the last proof
refuses sampling.
Tested: agc_driver_native_depth_aliased_stencil. A 4-sample R8 target
over the plane with an absorbed fill imports and the next stencil test
passes the fill value and not another; a second absorbed fill is proven
and taken; a colour draw after it refuses. The target drawn after its
fill, and an R8G8 target over the plane, refuse with the new reason. The
guest plane keeps its 0xa5 bytes throughout. Two and eight samples, and
another colour sample count, are not available on lavapipe. With the
product change reverted the cleared case throws the guard text above
(1 of 1); with it the mode passes 5 of 5.
… an in-place expand 5be005e let a descriptor with no metadata (META_DATA_ADDRESS 0, not pipe-aligned) sample a native multisample depth target from its decompressed host image, assuming the guest had expanded the plane. On hardware such a read sees decompressed depth only after an in-place expand, a draw with DB_RENDER_CONTROL DEPTH_COMPRESS_DISABLE (bit 6) and STENCIL_COMPRESS_DISABLE (bit 5) set, as radeonsi's in-place decompress sets them. DecodeDepthRenderControl reads DB_RENDER_CONTROL, DB_Z_INFO's format and sample count and DB_Z_READ_BASE for a draw with clear or compress-disable bits. The draw precheck hands it to NoteDepthRenderControl before the draw is dropped as drawing nothing (an expand draw has no depth test and no colour writes), draining the draw pipeline first for an expand, or for a clear over an existing depth surface. A draw over the target with the depth bit, and the stencil bit when the target has a stencil plane, marks the surface expanded; a clear draw, an HTILE clear or fill (NoteHtileDepthClear, NoteDepthMetadataFill, a cleared HTILE at DepthSurfaceView) and a plane fill clear the mark. CheckResource takes a descriptor without metadata only while the surface is marked, and otherwise refuses with "native multisample depth sampled metadata or XOR mismatch", printing the last DB_RENDER_CONTROL seen at most eight times. Tested: agc_driver_native_depth_expand_gate, for D32 and D32S8 with a separate stencil plane: a bare sample before any expand is refused, and after only the depth bit on D32S8; after the expand draw it gets the cleared and then the drawn depth; an HTILE fill, a clear draw and a plane fill (an HTILE mask clear on D32) each refuse it again until the next expand. The separate-stencil test now draws an expand before its bare sample. With the gate reverted the first bare sample is accepted (1 of 1); with it the mode passes 5 of 5.
A native D32S8 target whose separate stencil plane a multisampled R8 colour target covers is refused for sampling once that colour target has drawn. Taking it would need a GPU copy of the colour target's R8 samples into the depth image's stencil aspect; the debt file now names that gap and that the console's stencil reads of such a plane are not measured.
…plane fill A native D32S8 target whose separate stencil plane a multisampled colour target covers with a draw, unknown content, or another format or sample count was refused at import, so sampling its depth failed as well. The plane is now imported unproven: its host stencil is not taken from it, depth sampling and depth-only draws continue, and a draw with a stencil test or a sample of the plane refuses with the stencil alias text and a line naming the colour target's state. A later whole-plane fill proves the plane from the fill byte without reading guest memory and clears the host stencil to it, provided a colour target still over the plane absorbed that fill as the same R8 byte at the same sample count; otherwise the fill is refused.
The sample shadow of a native multisampled depth target was moved from UNDEFINED to GENERAL with only the depth aspect. For a host format with stencil and without separateDepthStencilLayouts that breaks VUID-VkImageMemoryBarrier-image-03320, which the validation layer reported for every D32S8 shadow. The transition now names the stencil aspect too when the host format has one; the shadow still copies only the depth aspect.
…rget An R8_UINT 2D MSAA descriptor at the separate stencil plane of a native multisampled D32S8 target was refused with "native multisample depth sampled identity or format mismatch". Such a descriptor with the target's extent, samples, tile mode and pipe/bank XOR and no metadata now gets a stencil-aspect view of the host depth image, or of its sample shadow, which then copies the stencil aspect along with the depth. The recompiler gives an R8_UINT image the uint numeric class, so the shader declares a uint multisampled sampled image, which a stencil-aspect view satisfies. A plane left unproven by a colour alias still refuses, and so does a stencil kept in HTILE.
|
@oneandonlydean this draft is the stencil-plane follow-up from your PPSA03208 run on #9533 (comment), stacked on #9533's 514643a. It takes your third read: |
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
The native depth fixture builds its targets on its own Vulkan device, so the driver's DMA_DATA fills, which are recorded on the driver's private device, never reach them: the pending-write and queued-fill checks only see the active recorder when it belongs to the target's device. Driver gains a DriverTestAccess friend, as VulkanDevice already has VulkanDeviceTestAccess for tests, so a test can hand the driver a VulkanDevice of its own. The new --driver-path mode builds a D32S8 target with a separate stencil plane and a depth-only HTILE on that device's context, with the HTILE in a GPU-visible guest allocation, draws it, clears it with a whole-HTILE DMA_DATA fill of 64 KiB or less submitted through sceAgcDriverSubmitDcb with pipelined draws and DMA, and samples DB_DEPTH_CLEAR in every sample at 2, 4 and 8 samples where the device has them. A fill over half the HTILE refuses with the metadata fill transition text. On Linux the host imports stay write-watched, as the DCC key tests set them, since lavapipe's device stores would otherwise make the import compared rather than watched. DriverDepthTarget keeps the target, its sampling and its fills together for later cases. The approach, putting the target on the driver's own device, is JJenkx's from boykopovar#9533. Co-authored-by: JJenkx <31495916+JJenkx@users.noreply.github.com>
With pipelined draws and DMA, enqueueDmaPacket queues a DMA_DATA data fill of more than 64 KiB as a buffer fill on the draw pipeline and skips preparePacketMemory, which notes the fill for the synchronous path. The queued store passed noteMetadata as false, so nothing noted it. A whole-HTILE fill over a live native multisample depth target was then only a pending GPU write over its HTILE, and the next sample refused with "external GPU writes over native multisample depth are not implemented" instead of taking the fill as the target's fast clear. The queued store now notes depth and colour metadata after the fill, as the queued stores of 64 KiB or less already do. The new --driver-queued-fill mode queues a 128 KiB DMA_DATA fill of the clear word from a live D32S8 target's HTILE through sceAgcDriverSubmitDcb, checks that dmaFills counted it, and samples DB_DEPTH_CLEAR in every sample for clears of 0 and 1. JJenkx found the missing note on boykopovar#9533. Co-authored-by: JJenkx <31495916+JJenkx@users.noreply.github.com>
|
The stencil-view diff is scoped to the R8_UINT descriptor path at the declared stencil plane, with a corresponding multi-sample test and an explicit refusal for color-drawn/unproven aliases. The reported RTX 3070 and llvmpipe red/green and validation-layer runs are useful; I have not independently rerun them. Before marking this ready, please rebase/update the 123-commit-behind stack to current main and rerun the focused native-depth suite plus the same main-vs-change validation-layer comparison on that merged base. The checklist currently says “Unblocks ... once a run confirms it” and the body says the title has not yet been tested; please update #4461 with the result and only describe PPSA03208 as unblocked if the title run confirms the next stop. Existing dependency #9533 and the overlap with #8999 should remain coordinated as the stack is updated. |
jotitadev
left a comment
There was a problem hiding this comment.
Apple GPU / MoltenVK run, as a third device next to the RTX 3070 Laptop and llvmpipe. The stencil-aspect view of the multisampled D32S8 image works on MoltenVK at 2 and 4 samples, and the new test fails without the DepthSurface.cpp change.
Machine: Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. Release, BUILD_TESTING=ON.
Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704.
Base/method: PR #8658 feat/macos-port @ 1688e5abb8 (current main plus the macOS port), not main, which does not build on macOS. This head's diff from its merge base a6dcea9279 (so #9533 included, without docs/) applies to it with no conflicts. Full rebuild before each run.
- With the PR: the nine native depth tests and
agc_driver_native_multisample_depthpass 3 of 3 on both drivers.agc_driver_native_depth_stencil_viewprintscases checked=2 unavailable=1: 2 and 4 samples run, 8 is not offered by this device. - #9533's head with this PR's tests (your red):
agc_driver_native_depth_stencil_viewfails on both drivers withnative multisample depth sampled identity or format mismatch. The other nine pass. - #9533 alone: its eight native depth tests pass 2 of 2 on both drivers.
- Full
^agcsuite with the PR:-j1 --timeout 30, 861 tests, no timeouts. Same failures as the base on both drivers (18 with MoltenVK 1.4.2, 17 with main + #2704), exceptagc_driver_uint8x4_color_targetonce on main + #2704. That test is intermittent on this machine without the PR too, and it passed on 1.4.2.
GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
Since this merged, 7 native depth tests fail on an RX 570 (RADV POLARIS10, Mesa 26.2.5). NVIDIA CI passed them on this PR's head, so this may only show up on RADV.
I haven't looked into the cause. I can run any of these again with extra logging, or on a Steam Deck (VANGOGH), if that would help. AI-assisted: yes (Claude Code) |
|
@ryanc2112 thank you for the bisect, and for running both sides three times on clean builds. That puts it squarely on this merge, which also carried #9533, and we're looking into it now. All seven tests go through the native D32S8 depth-stencil path that #9533 and this PR changed. Neither NVIDIA nor lavapipe shows it, so we can't see it here. If it comes to that, we'll send a branch that only adds log lines, for you to run on the RX 570. If a run of the same seven tests on the Steam Deck is easy for you, it would tell us whether it's Polaris-only or RADV-wide. |
|
@ryanc2112 The bisect can't separate these failures from the merge, because this merge is where the seven tests were added. At I don't have an AMD GPU, so I checked whether RX 570 capabilities alone explain it. Both runs were at
The simulated device comes from gpuinfo report 52997: RX 570, RADV POLARIS10, Mesa 26.2.5. Extensions were not simulated, because that profile has no The Linux job on lavapipe also passes all seven, on So a missing feature, format or limit on Polaris does not explain it, and it is not Mesa in general. That leaves RADV's handling on GFX8 or the dma-buf import path your log shows. I could not tell which import path lavapipe takes, so that one is still open. Two runs from you would separate those:
AI-assisted: yes (Claude Code) |
|
@ryanc2112 here's the branch we mentioned: The first 60 or so of those lines are enough. If you have a few more minutes, run the same two tests once with On an AMD Renoir iGPU with AMD's Windows driver, and on NVIDIA, all seven pass, so RADV is where it shows. A note on the bisect, so nobody looks for a second change: these seven tests came in with #9533 and this PR. On |
|
@XatiX you're right, and thanks for catching it. None of the seven tests exist at @EagleBearerYS I ran your diag branch at
RX 570, default mode: all 27
|
|
@ryanc2112 thank you for running both machines in all three modes. It's exactly what we needed, and thanks for the correction too. Tests that have failed on the RX 570 from the start are a clearer place to work from. With the Deck clean, and |
|
@ryanc2112 RADV's source (26.2.5) points at one branch that only GFX6-8 take. There, a D32S8 image without depth-attachment usage isn't renderable ( To tell whether the copy skips those samples or reads them from the wrong place, could you run the seven tests once more on the RX 570? The branch is
All we need per mode is the pass/fail count and the |
|
@EagleBearerYS here's v2 at
There are no
|
|
@ryanc2112 thanks, that settles it. On GFX8, RADV's copy into a sample shadow that isn't renderable leaves most samples unwritten and writes a wrong value into a few. With depth-attachment usage the copy takes RADV's graphics path, and every fetch matches. The fix is on
Could you run the seven tests once at each of those two commits on the RX 570, with no switches? Pass/fail counts are all we need. The first should fail and the second should pass. If the Deck is handy, one run at |
… whose HTILE carries stencil Dave the Diver (PPSA19115) stops at the first sample of its two-sample D32S8 target on the #9717 + #9742 test branch: an R32F colour target of the same sample count, newest a clear to zero, covers the depth plane, and the target's HTILE carries its stencil (not depth-only, DB_DEPTH_CLEAR 0.0). #9742 accepts such an alias only with a depth-only HTILE, so prepareDepthSampling refuses with the depth alias refusal. The proof does not depend on the HTILE layout. prepareDepthSampling already admits an HTILE that is not depth-only only when it is pipe-aligned and without VRS, and htileProvesClear decodes both layouts: in the depth and stencil layout every word, masked to its Z range and ZMask (0xfffff00f), must equal 0 for a clear of 0.0 or 0xfffc0000 for 1.0, the words Mesa's radv_get_htile_fast_clear_value writes. Every depth sample then reads DB_DEPTH_CLEAR, and none of the plane's bytes or the colour target's host-only samples. The depth-only condition is dropped from the alias gate, and the alias is recorded and checked again at each sample as with a depth-only HTILE. A D32 target whose HTILE is in the depth and stencil layout without stencil passes the same proof and is accepted too. The stencil is still proven only by HTILE: every word must hold SMem 0 at import and in a completed HTILE clear, and any colour target over the stencil plane of a target whose stencil is in HTILE still refuses with the stencil plane refusal. Unchanged: a colour target over the HTILE, one of another sample count, two or more over the depth plane, an alias over tiles the HTILE does not prove, and a draw into the alias after eligibility is recorded. agc_driver_native_depth_aliased_depth runs every alias case with the stencil in HTILE (words 0xf0 and 0 for 0.0, 0xfffc00f0 for 1.0) and with a D32 target in the depth and stencil layout, and adds a word with SMem 1 and a colour target over the stencil plane, which refuse.
|
@EagleBearerYS confirmed on both machines, with no switches and
Thanks for tracking it down. AI-assisted: yes (Claude Code) |
|
@EagleBearerYS one more data point: the fix also covers the native depth tests added since On current Same setup as before: clean build, GCC 16.2.1, Release, AI-assisted: yes (Claude Code) |
|
@ryanc2112 thanks for both runs, on the two machines and on today's |
What
This is stacked on #9533 (5388641).
PPSA03208 reads the stencil plane of a native multisampled D32S8 target per sample, through a plain
R8_UINT2D MSAA descriptor, right after reading its depth the same way. On #9533 that read is the next stop, at the first dispatch of a compute program, inCheckResource:native multisample depth sampled identity or format mismatch(oneandonlydean's run).1546eb00 c0500000 021bc1df e1810924 00000000 00700010 00000000 00000000. Its base is the separate stencil plane, at format 5 (R8_UINT), 2 samples, 2D MSAA, tile mode 4 and no metadata.The change:
What
CheckResourceaccepts: a T# at the target'sstencilAddress, when all of these hold:R8_UINT);kZ64KBX), and one slice and level;Other stencil descriptors refuse with the existing texts.
The view:
Sampledmakes aVK_IMAGE_ASPECT_STENCIL_BITview of the host D32S8 image, with the T#'s component mapping. Where the device samples through the sample shadow, the view is of the shadow. The device'ssampledImageStencilSampleCountshas to cover the sample count.The binding: an
R8_UINTT# binds as an unsigned-integer sampled image, and a stencil-aspect view returns the stencil as an unsigned integer in R, so the view matches the shader's binding.The shadow: once a stencil read has used the sample shadow, each refresh copies depth and stencil in one
vkCmdCopyImage.Unproven planes: a stencil plane fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 leaves unproven, because an aliasing colour target drew over it, still refuses with fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's text.
Debt: a new entry, "Native multisample stencil plane sampling", lists the accepted descriptor, the shadow copy and the refusals. It also says console equivalence isn't measured.
Overlap: checked with
git merge-treeagainst every open PR touching these files, onmain7e2ba73.Sampled's signature andCheckResourcecalls composes with this PR's hunks: this PR takes it in through fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge ofmain(74594d4) without a conflict, andSampledcarries both sides' parameters.DepthSurfaceTextureand the surface class, away from this PR's functions. Neither merges withmainyet.mainwith fix(agc): retire an unwritten native multisample depth surface on guest access #6727, again needed only fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's debt entry, where both sides' edits are kept. Merging 1582cf6 (e5a24cd), fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's queued-fill skip, needed only that entry once more, and both sides' words are kept.CMakeLists.txt,NativeMultisampleDepth.cppand the debt file. Keeping both sides resolves them, as on the combined test branch below. Merge order: fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 first, then this PR, as both PRs' Depends on lines say.git merge-treeof this head and feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021's24869a37eaconflicts in five files:DepthSurface.cpp(refreshSampleShadow's second parameter),MultisampleTarget.cpp,CMakeLists.txt,NativeMultisampleDepth.cppand the debt file. feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021 and fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head already conflict in two of them.mainand takes this PR'srefreshSampleShadowform (thestencilReadsignature, without its second stencil copy), as XatiX's resolution there describes.add_library_testand moves test files. The order is proposed in its thread (comment): this PR first; if test: organize library tests and label CTest suites #6044 lands first,agc_driver_native_depth_stencil_viewis registered withadd_library_test(graphics ...)at this PR's next merge ofmain.PS_ITER_SAMPLEprogram into a one-sample target. Each merges cleanly with this head and with fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 (git merge-treeagainst 2620f8d and c974601), so no order is needed between them.CMakeLists.txtand the AGC debt file are shared with many PRs, by neighbouring lines only.Tested
RTX 3070 Laptop GPU (NVIDIA 617.42, Windows 11,
VK_LOADER_DRIVERS_SELECT='*nv*'; clocks weren't held, so these are pass/fail only):agc_driver_native_depth_stencil_viewpass five times each.Linux, Mesa llvmpipe (which runs the 4-sample case):
R8_UINT2D MSAA T# at the stencil address, and checks every sample's depth bits, stencil value and component mapping.DepthSurface.cppat fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head, the test fails withnative multisample depth sampled identity or format mismatch.--parallel 4:agc_driver_pipelined_fill,agc_driver_sgpr_pattern_fill_keysandagc_driver_pipelined_indirect_draw. The same tests fail on fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head and pass when run alone.Validation layer, fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 (514643a) against this PR (CONTRIBUTING's AGC rule), on one GitHub Linux runner (run).
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V, withVK_LOADER_DEBUG=layerto show the layer loading. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5, Khronos validation layers 1.3.275.VK_LAYER_KHRONOS_validation16 times on fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's tree and 54 with this PR. Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS.VUID-VkDeviceCreateInfo-pNext-pNext, for a device-creation structure newer than that layer version. This PR adds noVUID-message.Apple M2 Max with MoltenVK, by @jotitadev (review): macOS 27.2, x86_64 under Rosetta 2, Release. They used MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross Ratchet & Clank: Rift Apart: SIGSEGV since #861, an address-less 64 GiB reservation now takes the addresses the title hints next #2704, on feat: macOS host support (Apple Silicon via Rosetta 2, Vulkan on MoltenVK) #8658's macOS port (1688e5a), since
maindoesn't build on macOS; this head's diff applied with no conflicts.agc_driver_native_multisample_depthpass 3 of 3 on both drivers.agc_driver_native_depth_stencil_viewruns 2 and 4 samples; this device doesn't offer 8.agc_driver_native_depth_stencil_viewfails on both drivers withnative multisample depth sampled identity or format mismatch.^agcsuite with this PR (861 tests): the same failures as on the base on both drivers, exceptagc_driver_uint8x4_color_targetonce on main + Ratchet & Clank: Rift Apart: SIGSEGV since #861, an address-less 64 GiB reservation now takes the addresses the title hints next #2704, which they say is intermittent on that machine without this PR too.Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, a pair that differs only by this PR's commit: Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries.
native multisample depth sampled identity or format mismatch. The cold run ended in a SIGSEGV at 16 s with no message before it, which didn't come back on the branch below.test/ghost-9742-9717(3ec696f: 219e925 and this PR's 7673740; comment), warm at 16 GB and cold at 20 GB: warm reaches 246 s and cold 254 s, with no native multisample depth or stencil refusal. Both stop ata color target's sample count differs from the rasterizer's, which milescoviello's feat(agc): draw one-sample color targets beside a multisampled depth target with sample 0's coverage #8115 handles.CheckResource's identity check, and the only clause this PR changes there accepts a T# at the target's stencil plane with format 5 (R8_UINT). So the shader that stopped there without this PR reads the D32S8 target's stencil plane that way, and gets past with it.920e436, fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head 1d16d50 merged in (only fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's debt entry needed resolving, and both sides' edits are kept there; outside it, this PR's own changes are the same by
git diff -U0patch-id), on GitHub's runners (run):agc_driver_native_depth_stencil_viewpass 10 of 10, none skipped. The run was in validation mode, whose base arm builds fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's own tree and runs only the 13 tests it has, so the red foragc_driver_native_depth_stencil_viewis the one in the Red line above.VK_LAYER_KHRONOS_validation21 times on fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's tree and 230 with this PR, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Validation,
mainb7d1d47 against 920e436 (run), the same 14 tests once on one GitHub Linux runner.main's tree ran the 7 of them it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 23 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so the stack adds noVUID-message againstmain.Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742, feat(agc): draw one-sample color targets beside a multisampled depth target with sample 0's coverage #8115 and fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target #8121 (comment): the test branch
test/ghost-9742-9717(3ec696f) with milescoviello's feat(agc): draw one-sample color targets beside a multisampled depth target with sample 0's coverage #8115 and fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target #8121 merged on top, both clean; Linux, RTX 4070 Ti, NVIDIA 615.71.09, release libraries, 20 GiB cap, warm and cold.a one-sample color target under a multisampled rasterizer without MSAA_ENABLE is unsupported with PS_ITER_SAMPLE, a sample index or coverage input, or a sample-mask export, which fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target #8121 handles.Ghost of Tsushima Director's Cut (PPSA02225), by @xXPBSXx (comment): Windows 10 Pro, WinLibs GCC 15.2.0, Release, NVIDIA GeForce RTX 4080 SUPER, runs of up to 600 s with no input, all libraries rebuilt for each tree (pass/stop only).
main1e20650, both runs stop in compute shader0x20001ef700onnative multisample stencil or depth format import is not implemented.native multisample depth or HTILE aliases a multisampled colour target whose samples are only on the host: the depth-plane alias fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 addresses. These runs didn't include fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742.dea8f8d, fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head 9afaa90 merged in (
main11f976b; clean, and this PR's own changes are the same bygit diff -U0patch-id), on GitHub's runners (run):agc_driver_native_depth_stencil_viewpass 10 of 10, none skipped.mainagainst this head, in the same run:main's tree ran the 7 of these tests it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 230 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ec384dd, fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head a45dff8 merged in (
maind6e7ab4, which brings fix(agc): retire an unwritten native multisample depth surface on guest access #6727; this PR's own changes are the same bygit diff -U0), on GitHub's runners (run):agc_driver_native_depth_stencil_viewpass 10 of 10, none skipped. fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533'sagc_driver_native_depth_stencilfixture now notes a host write before its refusal checks, as fix(agc): retire an unwritten native multisample depth surface on guest access #6727's own fixtures do, because fix(agc): retire an unwritten native multisample depth surface on guest access #6727 retires an unwritten native multisample depth surface on a guest read instead of refusing it (#6727). That line is in fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge.mainagainst this head, in the same run:main's tree ran the 7 of these tests it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 230 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.check_conventions.py: no errors and no comment lines added. One existing warning,debt-length, on the native multisampled depth entry.NVIDIA GeForce RTX 3070 Laptop GPU at 082ef25, the fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533, fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 and feat(agc): sample the stencil plane of a native multisampled D32S8 target #9717 stack before the fix(agc): retire an unwritten native multisample depth surface on guest access #6727 merge (driver 617.42, Windows 11, WinLibs GCC 15.2.0, Release,
ANYPS5_REQUIRE_VULKAN=1; GPU clocks weren't held, pass/fail only):agc_driver_native_depth_stencil_viewpasses 5 of 5 (3 cases checked per run, none unavailable). fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's own native depth tests pass there too, exceptagc_driver_native_depth_driver_queued_fill: on Windows that queued fill refuses, as onmain, and fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 now skips the case there with the reason (1582cf6; see fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533).e5a24cd, fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head 1582cf6 merged in (fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's queued-fill skip; this PR's own changes outside fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's debt entry are the same by
git diff -U0, and that entry keeps every word of both sides), on GitHub's runners (run):agc_driver_native_depth_stencil_viewpass 10 of 10, none skipped.mainagainst this head, in the same run:main's tree ran the 7 of these tests it has. The loader insertedVK_LAYER_KHRONOS_validation11 times onmainand 230 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ff06dc3, fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head 5388641 merged in (fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's test-only fix for jotitadev's macOS abort at exit; a clean merge, and this PR's own diff is unchanged by patch-id), on GitHub's runners (run):
agc_driver_native_depth_stencil_viewfails with fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's code. With this PR it and the other native depth and native multisample depth tests pass 10 of 10, withagc_driver_native_depth_bda_clearskipping on llvmpipe, as onmain.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Not yet tested on PPSA03208. oneandonlydean has offered to run it.
24fe4ea, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's de4cee5, which merges
main0db47b2. No conflicts. On GitHub's runners (run), of theagc_driver_native_depth*andagc_driver_native_multisample_depth*tests (12 tests), 11 pass 10 runs in a row on Linux and 1 skips:agc_driver_native_depth_bda_clear,main's test, because the device doesn't keep guest write watching for its native clear imports. On Windows all 12 build and skip, as the runner has no Vulkan device. The libc and libkernel suites pass on both, run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. An earlier run linked here didn't run this set, so it's replaced.74594d4, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 55b0a5f, which merges
main3fcb5e4 and with it feat(agc): draw DB depth copies with a driver pixel program #8999. No conflicts. On GitHub's runners (run), the native, depth and multisample tests (^agc_driver_native_,^agc_driver_depth_,^agc_driver_msaa_) pass 10 runs in a row on Linux: 43 run, 39 pass, 4 skip (agc_driver_native_fmask,agc_driver_msaa_dcc_clear_2and_8, andagc_driver_native_depth_bda_clear), 0 fail. On Windows 43 run, 3 pass 10 runs in a row and 40 skip without a Vulkan device, 0 fail. The libc and libkernel suites pass on both (142 and 204 tests on Linux, 169 and 217 on Windows), run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.74594d4 on GitHub's runners, red/green against fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head 55b0a5f (run),
^agc_driver_native_: on Linux, with fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's implementation of the changed files,agc_driver_native_depth_stencil_viewfails withnative multisample depth sampled identity or format mismatch(1 of 14). With this PR, 14 run, 12 pass, 2 skip (agc_driver_native_depth_bda_clearandagc_driver_native_fmask, which skip on both trees), 0 fail, 10 runs in a row. On Windows all 14 build and skip, as the runner has no Vulkan device. The libc and libkernel suites pass on both (142 and 204 tests on Linux, 169 and 217 on Windows), run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Validation layer,
main3fcb5e4 against 74594d4 (CONTRIBUTING's AGC rule; run), on GitHub's Linux runner (llvmpipe, LLVM 20.1.2), withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V,^agc_driver_native_once:main's tree ran the 7 of these tests it has (5 pass, 2 skip) and this head all 14 (12 pass, 2 skip). The layer was inserted 12 times onmainand 24 with this PR, neither log haswas not found but was requested, and both report onlyVUID-VkDeviceCreateInfo-pNext-pNext, so this PR adds noVUID-message.AMD GPUs on RADV, per tablefrogpillow's report (comment): on a test branch with this PR and fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 (e2eb3ff), Mesa 25.2.8, the Khronos validation layer on,
agc_driver_depth_surface_from_storage,agc_driver_depth_surface_last_writerandagc_driver_native_multisample_depthpass on an RX Vega 56 (VEGA10, GCN5), an RX 7900 GRE (NAVI31, RDNA3) and a Ryzen 7 7800X3D's integrated GPU (RAPHAEL, RDNA2): 3 run, 3 pass, 0 skip, 0 fail on each, withagc_driver_native_multisample_depthchecking all 24 of its cases.f63435d, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's head 078e6a6 (run). It takes fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's two merges of
mainsince this PR last took it: fix(agc): retire native depth before binding an overlapping layout #10375'sCheckDepthAttachmentAliasand fix(agc): retire an undrawn filled multisampled color target that a guest access overlaps #9186's host-only flag forguard(). No conflict here. Theagc_driver_native_,agc_driver_depth_,agc_driver_msaa_andagc_driver_sampletests pass 10 runs in a row. Linux: 56 run, 50 pass, 6 skip (agc_driver_msaa_dcc_clear_2,agc_driver_msaa_dcc_clear_8,agc_driver_native_depth_bda_clear,agc_driver_native_fmask,agc_driver_sample_order_grid_reference,agc_driver_sample_order_recipe_depth_locations), 0 fail. Windows: 56 run, 5 pass, 51 skip (no Vulkan device), 0 fail. The before arm,mainwith this PR's tests, doesn't build. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Assassin's Creed Shadows (PPSA20397), by akkadbakkad89, RTX 3070, Windows 11, driver 617.42, ran this PR on its stack (fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533, which carries feat(agc): import cleared native multisample D32S8 targets and whole HTILE fills #6300), per their report (comment): the title gets past fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's format refusal at about +848 s and into pixel shading it hadn't reached before. Its next stop, a stencil-reference-export pixel shader (detail on AGC: pixel shaders that export a stencil reference value abort on devices without VK_EXT_shader_stencil_export (NVIDIA; Demon's Souls, 1080p renderconfig) #4276), is outside this PR, and the report doesn't single out this PR's stencil reads.
VK_LAYER_KHRONOS_validation(SDK 1.4.363.0),ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1, akkadbakkad89 reports noVUID-delta.e9c5d95, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's f39599c, which merges
main19af7f4 (run). No conflict here: fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge carries fix(agc): check whole storage views for native surface overlap #10368'sCheckStorageAliasRetirementbeside theClearFaultandClearSourceenums, and this PR's changed lines are the same. Theagc_driver_native_,agc_driver_depth_,agc_driver_msaa_andagc_driver_sampletests, with the other tests built from the files the merge changes, pass 10 runs in a row. Linux: 303 run, 287 pass, 16 skip, 0 fail. Windows: 322 run, 184 pass, 138 skip (no Vulkan device), 0 fail. WithVK_LAYER_KHRONOS_validationloaded on both arms on Linux, the only VUID isVUID-VkDeviceCreateInfo-pNext-pNext, on both. Suites: libc and libkernel pass on Linux (145 and 210) and on Windows (172 and 231). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.9846498, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's a769794, which merges
mainccfb967 (run). No conflict here, and this PR's changed lines over fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 are the same. The native depth, stencil-view, depth-surface anduint8x4colour target tests ran 10 times with no failure. Linux: 10 run, 7 pass, 3 skip (agc_driver_native_depth_bda_clear,agc_driver_native_fmask,agc_driver_sample_order_grid_reference, as in earlier runs), 0 fail. Windows: 10 run, 0 pass, 10 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286:exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), and pass inmain's own Windows job at 1829def (job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.41e4c2e, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 5343d0a (run). It's fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's fix for a whole HTILE or stencil-plane fill whose stores landed before its note (
Co-authored-by: Tharun Balaji K, from sktharunbalaji13-cmd's finding on Ghost of Tsushima Director's Cut; see fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533).DepthSurface.cppandNativeMultisampleDepth.cpp.agc_driver_native_depth_bda_clear, which skips on lavapipe), 0 fail. On Windows all 12 skip, because the runner has no Vulkan device, so they ran on Linux only.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. On Linux, libc and libkernel ran 166 and 264 tests with 0 failed. On Windows libc ran 194 with 0 failed, and libkernel failed one of 286:[exception] guest context signal=0x1e, each further down the stack) before the process stopped.guest_raise_in_host_codeis a libkernel signal test that the merge doesn't touch.guest_raise_in_host_coderan 20 times in a row on Windows with no failure: 1 run, 1 pass, 0 skip, 0 fail. In the same run, libc and libkernel ran 194 and 286 tests with 0 failed. The test is registered on Windows only.defd410, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 6eb141c, which merges
main102b7a5 and with it Jamie's fix(agc): write host-only multisample memory as zeros in a capture snapshot #12566 (×10 run, ×20 run). It merged cleanly, and this PR's own diff is unchanged. The native depth and multisample tests (^agc_driver_native_) andagc_frame_captureran 10 times with no failure. Linux: 15 run, 13 pass, 2 skip, 0 fail. Windows: 15 run, 1 pass, 14 skip, 0 fail; the 14 skip because the runner has no Vulkan device.guest_raise_in_host_code, which is registered on Windows only, ran 20 times there with no failure. The libc and libkernel suites run 193 and 294 tests on Linux and 223 and 317 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Validation comparison at defd410 (CONTRIBUTING's AGC rule):
main102b7a5, this head's base. Since thenmainhas changed onlylibSceAgcDriver/CMakeLists.txtand the debt file among this PR's paths. On GitHub's Linux runner (llvmpipe (LLVM 20.1.2), Mesa 25.2.8, Ubuntu 24.04.5), withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V:^agc_driver_native_. This head: 14 run, 12 pass, 2 skip (as in this PR's earlier runs on that runner), 0 fail.main's arm ran the ones it has, and they pass.VK_LAYER_KHRONOS_validation15 times onmainand 27 with this head, and neither log haswas not found. Both logs report onlyVUID-VkDeviceCreateInfo-pNext-pNext, and the change adds none.agc_driver_sample_multisample_target, the drawn 4x target's sample-0 guest reads included: passes on both arms with no new VUIDs (run). ×10 on this head (run): Linux 10 of 10; Windows skips, since the runner has no Vulkan device.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Ghost of Tsushima Director's Cut (PPSA02225), by @milescoviello, with this PR's
DepthSurface.cppchange (comment):main98ddd9c + fix(agc): write back BDA stores into writable heap mirrors #12840 425cd9d + fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 1c904e2 (fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 6eb141c inside), merged cleanly; Linux, RTX 4070 Ti (NVIDIA 615.71.09), release libraries, 21 GiB cap, booting from a settings save, plus defd410'sDepthSurface.cppchange (his local 6be6c22f23, with this PR's test-registration and debt-entry conflicts against fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 taken from the combination's side). Without it, the run stops 33 s in onnative multisample depth sampled identity or format mismatchin compute shader 0x20001ef700 (comment). With it, that stop is gone, and the run stops 21 s in on the same shader atvkAllocateMemory sampled depth shadow: Vulkan result -2, out of device memory with device-local heap 0 at 10,625 of 10,654 MiB, on a base before fix(agc): release texture cache entries before a budget-full allocation goes to host memory #13064. That allocation isn't in this PR's path.8fe640e, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's dcf420e, which brings fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge of
main2b1ae87 and savvaniss's fix(agc): retire a multisampled color target the title wrote over #8223 (run). Clean; this PR's own diff changes only in fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533'sguardedColorBytesposition.^agc_driver_native_,^agc_driver_msaa_and^agc_driver_depth_tests.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ctest -R '^(agc|shader)'1,162 passed, 0 failed.a90d0b7, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 071ca5b, which merges
main6a691f6 and with it Celegans12's perf(agc): expand an HTILE on the GPU behind a pending mask clear kernel #8105 (run, validation run). fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's resolution, with its two test-file adaptations, is kept as is. This branch carries fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533 but not fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742, so it takes fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge directly.CMakeLists.txt, whereagc_driver_native_depth_buffer_clearjoins this PR'sset_tests_propertieslists, which also carryagc_driver_native_depth_stencil_view. Those two lines are the only change to this PR's own lines over fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533.agc_driver_native_multisample_depth,agc_driver_sample_multisample_targetand every^agc_driver_native_depthor^agc_driver_depth_planetest,agc_driver_native_depth_stencil_viewandagc_driver_native_depth_buffer_clearincluded.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.VERIFY_VALIDATION=1on GitHub's Linux runner),main6a691f6 against this head, the same tests:main's arm ran the ones it has, and both pass. The loader insertedVK_LAYER_KHRONOS_validation28 times onmainand 40 with this head, and neither log haswas not found. Both report the same three IDs,VUID-VkDeviceCreateInfo-pNext-pNext,VUID-vkCmdCopyImage-srcImage-01548andVUID-vkCmdCopyImage-srcImage-01551, so the merge adds none.agc_driver_native_multisample_depth_testspass 120 of 120 runs;ctest -R '^(agc|shader)'1,091 passed, 75 skipped, 0 failed.Divinity: Original Sin II Definitive Edition (PPSA06866, 01.007.000), by @XatiX, at this head (comment, bring-up #13726).
main73f4f7e + this PR + feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021 + fix(libSceHttp2): accept SSL options on a context #13734 + XatiX's local commits ontest/dos2-retest.R8_UINT2D MSAA descriptor with no metadata, in a draw withDB_RENDER_CONTROL0x88.native multisample depth sampled identity or format mismatch.e1b9e7ee9e, which extendsDecodeDepthCopyPassto bit 3 ofDB_RENDER_CONTROLwith a driver pixel program.a63bd14, a merge of fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge of
main0836dfd (run, on 6f9dd9f, which has the same tree). build(agc): register each AGC test executable in its own CMake fragment #12862 movedlibSceAgcDriver's test registrations intotests/cmake/; the conflict inCMakeLists.txtis resolved withtools/agc_test_split.py resolve, which moves this PR's registration intotests/cmake/agc_driver_native_multisample_depth_tests.cmake(+3 −2 against fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's merge). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With-DBUILD_TESTING=ON,ctest -Ngives 3082 tests:main's 3075 plus this PR's and fix(agc): import native multisample D32S8 targets with a separate stencil plane and a depth-only HTILE #9533's 7 tests, each listed once. The 25 tests of this PR's verify set pass 10 runs in a row. Linux: 25 run, 24 pass, 1 skip, 0 fail. Windows: 25 run, 0 pass, 25 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.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)tests/execution/NativeMultisampleDepth.cppand lines to the AGCCMakeLists.txtand the debt file; this PR goes after it and keeps both when it mergesmain); fix(agc): drop stale depth planes a uniform fill overwrites #10882 (orezraey) goes after this PR (merge order only, on fix(agc): drop stale depth planes a uniform fill overwrites #10882); feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021 (JAB-dev) goes after this PR (merge order only, agreed on feat(agc): publish a written native multisample D32S8 surface to its guest planes on a guest read #13021)native multisample depth sampled identity or format mismatch, with fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742 (see Tested). With fix(agc): accept a colour alias over a native multisample depth plane when HTILE proves its clear #9742, feat(agc): draw one-sample color targets beside a multisampled depth target with sample 0's coverage #8115 and fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target #8121 as well, Ghost of Tsushima Director's Cut reaches its brightness calibration screen and intro, with no refusal or crash through the 600 s limit, warm and cold (milescoviello's run above). Later runs on that host ended at the 20 GiB memory cap (see Tested).