Skip to content

feat(agc): sample the stencil plane of a native multisampled D32S8 target - #9717

Merged
oneandonlydean merged 52 commits into
boykopovar:mainfrom
EagleBearerYS:feat/agc-msaa-d32s8-stencil-view
Nov 2, 2026
Merged

oneandonlydean merged 52 commits into
boykopovar:mainfrom
EagleBearerYS:feat/agc-msaa-d32s8-stencil-view

Conversation

@EagleBearerYS

@EagleBearerYS EagleBearerYS commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

This is stacked on #9533 (5388641).

PPSA03208 reads the stencil plane of a native multisampled D32S8 target per sample, through a plain R8_UINT 2D 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, in CheckResource: native multisample depth sampled identity or format mismatch (oneandonlydean's run).

  • The descriptor: 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 target: 1920x2160, D32S8, with a depth-only HTILE.

The change:

  • What CheckResource accepts: a T# at the target's stencilAddress, when all of these hold:

    • format 5 (R8_UINT);
    • the surface's extent and sample count;
    • 2D MSAA, the target's tile mode (kZ64KBX), and one slice and level;
    • the target's pipe/bank XOR;
    • no metadata;
    • a target with a separate stencil plane (a depth-only HTILE with no HTILE stencil).

    Other stencil descriptors refuse with the existing texts.

  • The view: Sampled makes a VK_IMAGE_ASPECT_STENCIL_BIT view 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's sampledImageStencilSampleCounts has to cover the sample count.

  • The binding: an R8_UINT T# 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-tree against every open PR touching these files, on main 7e2ba73.

Tested

Checklist

Gashrod1 and others added 15 commits October 15, 2026 15:22
…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.
@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 22, 2026
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@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: CheckResource now accepts an R8_UINT 2D MSAA T# with no metadata at the target's separate stencil plane, at the surface's extent, sample count, tile mode and XOR, and Sampled binds it through a stencil-aspect view of the native image, or of its sample shadow, which then copies stencil too. If you can run it on PPSA03208 as you offered, the log would show whether that compute program gets past CheckResource, and the next stop if there is one. A plane that #9533 leaves unproven, because a colour target drew over it, still refuses with #9533's text.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6987 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L157, L370
PR 6989 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L157, L370
PR 6995 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L157, L370
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L157, L370
PR 10049 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L857-871
PR 10469 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L8, L1124-1131
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp L1057-1087
docs/dev/debt/libSceAgcDriver.md L63
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L8, L1124-1131
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake L8-10, L12-13
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp L51-53, L1057-1087
docs/dev/debt/libSceAgcDriver.md L63
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L8, L1124-1131
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake L8-10, L12-13
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp L51-53, L1057-1087
docs/dev/debt/libSceAgcDriver.md L63
PR 11998 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L342, L2337-2338
PR 13021 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp L50, L58
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L8, L100-101, L107, L115, L123, L127-128, L130, L135, L137, L147, L149, L342, L359, L363, L365-366, L369, L371, L373, L377-379, L383-385, L395, L1048, L1113, L1124-1125, L2286, L2337, L2346, L2675, L2678, L2682, L2790, L2905, L2911, L2928
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L3068-3069, L3815-3816
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L22, L135, L157, L356, L370, L420, L559, L858-871, L1278-1279, L1284-1285, L1291-1292, L1640
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake L10, L13
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp L9, L12, L22-24, L33, L49-53, L359, L583, L586, L588, L639-640, L702, L862, L911, L1033-1036, L1038-1049, L1051-1053, L1057-1087, L1089-1097, L1120, L1301, L1341, L1392, L1394, L1545, L1552, L1575-1576, L1578, L1586, L1588, L1592, L1594, L1596, L1600, L1602, L1623
docs/dev/debt/libSceAgcDriver.md L63
PR 13023 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp L50, L58
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L8, L100-101, L107, L115, L123, L127-128, L130, L135, L137, L147, L149, L342, L359, L363, L365-366, L369, L371, L373, L377-379, L383-385, L395, L1048, L1113, L1124-1125, L2286, L2337, L2346, L2675, L2678, L2682, L2790, L2905, L2911, L2928
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L3068-3069, L3815-3816
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L22, L135, L157, L356, L370, L420, L559, L858-871, L1278-1279, L1284-1285, L1291-1292, L1640
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake L10, L13
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp L9, L12, L22-24, L33, L49-53, L359, L583, L586, L588, L639-640, L702, L862, L911, L1033-1036, L1038-1049, L1051-1053, L1057-1087, L1089-1097, L1120, L1301, L1341, L1392, L1394, L1545, L1552, L1575-1576, L1578, L1586, L1588, L1592, L1594, L1596, L1600, L1602, L1623
docs/dev/debt/libSceAgcDriver.md L63
PR 13963 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp L858-871
PR 14005 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp L8, L100-101, L115, L122-123, L342, L393, L395, L467, L1113, L1135
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake L10, L13
docs/dev/debt/libSceAgcDriver.md L63

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.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6501 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7048 docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7369 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7963 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
PR 7978 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 docs/dev/debt/libSceAgcDriver.md
PR 9020 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9432 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9489 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9915 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10233 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 10920 core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cpp
PR 11452 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12120 core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 14212 docs/dev/debt/libSceAgcDriver.md

EagleBearerYS and others added 2 commits October 22, 2026 10:58
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>
@MarcZX10

Copy link
Copy Markdown
Contributor

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 jotitadev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_depth pass 3 of 3 on both drivers. agc_driver_native_depth_stencil_view prints cases 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_view fails on both drivers with native 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 ^agc suite 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), except agc_driver_uint8x4_color_target once 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.

@oneandonlydean
oneandonlydean merged commit a4b76b2 into boykopovar:main Nov 2, 2026
12 of 13 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 2, 2026
@ryanc2112

Copy link
Copy Markdown
Contributor

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.

  • Tests: agc_driver_native_depth_{stencil,separate_stencil,aliased_stencil,expand_gate,stencil_view,driver_path,driver_queued_fill}.
  • Bisect: I ran git bisect --first-parent from ed8a82b3cd (all pass) to main 92d2fdc343 (all fail). It lands on this merge, a4b76b2c0a.
  • Clean builds: fresh build directories, GCC 16.2.1, Release, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Each test ran 3 times on each side.
    • c84005ee40 (the first parent): 7/7 pass, 3/3 runs each.
    • a4b76b2c0a: 7/7 fail, 3/3 runs each. There are no VUID- errors and no missing-layer message.
  • Messages:
    • The stencil tests print native depth-stencil sampled fetch lost a depth sample or a stencil test outcome, and the same wording for the separate and aliased stencil planes.
    • expand_gate prints native depth sampled without metadata after an in-place expand lost a depth sample.
    • driver_path and driver_queued_fill print a sampled depth on the driver's device is not 0.000000.
  • Import path: the log shows dma-buf imports keep write protection: yes, so the run takes the dma-buf import path. agc_driver_native_multisample_depth still passes.

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)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@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.

@XatiX

XatiX commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@ryanc2112 The bisect can't separate these failures from the merge, because this merge is where the seven tests were added. At c84005ee40, agc_driver_native_multisample_depth_tests.cmake registers only retirement, clears, clear_refusals and buffer_clear. None of the seven exist there. So the 7/7 passes at c84005ee40 were most likely ctest -R matching no tests: it prints No tests were found!!! and still exits 0 unless --no-tests=error is set. What the runs do show is that these new tests fail on RADV from the commit that introduced them. They don't show a regression from a passing state.

I don't have an AMD GPU, so I checked whether RX 570 capabilities alone explain it. Both runs were at a4b76b2c0a on Windows 11, RTX 5080, driver 617.42, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation.

Run Result
Plain 6 pass; driver_queued_fill skips (it always skips on Windows)
With VK_LAYER_KHRONOS_profiles simulating your device's API version, features, properties and formats Same: 6 pass, driver_queued_fill skips

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 VK_KHR_external_memory_win32, which the Windows build needs for its imports. The layer was active: it logged its format-simulation warnings. Its 24 VUID-VkDeviceCreateInfo-pProperties-04451 errors come from the layer advertising VK_KHR_portability_subset, not from AnyPS5.

The Linux job on lavapipe also passes all seven, on main a4eca2a056.

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:

  • The seven tests on the Steam Deck (VANGOGH, RDNA2). If they pass there, it points at GFX8.
  • On the RX 570, one of the stencil tests with RADV_DEBUG=nohiz and once more with RADV_DEBUG=nofastclears. If either passes, it points at RADV's depth metadata or fast clears. This is a guess from the message text (lost a depth sample after an expand), not a measured cause.

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@ryanc2112 here's the branch we mentioned: diag/native-depth-radv-9717 on our fork (73dd5e5, which is main 8b7d6c1 plus one commit). It only adds [native-depth-diag] lines. Each check that fails now prints the values it actually read, and each native depth surface prints which path it takes. None of the checks or the driver's behaviour change.

git fetch https://github.com/EagleBearerYS/AnyPS5 diag/native-depth-radv-9717
git checkout FETCH_HEAD
cmake --build build --target agc_driver_native_multisample_depth_tests
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R '^agc_driver_native_depth_(stencil|driver_path)$' -V > diag.log 2>&1
grep native-depth-diag diag.log | head -60

The first 60 or so of those lines are enough. If you have a few more minutes, run the same two tests once with RADV_DEBUG=nohiz and once with RADV_DEBUG=nofastclears. That would tell us whether it depends on RADV's HTILE or on its fast clears, and whether each passes is plenty.

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 c84005ee40 ctest has none of them to run, so they have most likely failed on RADV since they came in. The new path still needs fixing there, and that's what we're after.

@ryanc2112

Copy link
Copy Markdown
Contributor

@XatiX you're right, and thanks for catching it. None of the seven tests exist at c84005ee40, so those "passes" were ctest finding no tests and exiting 0. My runs only show that the tests fail on the RX 570 from the commit that added them. They don't show a regression. Sorry for the noise. I've added --no-tests=error to my scripts.

@EagleBearerYS I ran your diag branch at 73dd5e5926 with --no-tests=error this time. I built the same tree on both machines (GCC 16.2.1, Release), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.

Device Default RADV_DEBUG=nohiz RADV_DEBUG=nofastclears
RX 570 (RADV POLARIS10, Mesa 26.2.5) 7/7 fail 7/7 fail 7/7 fail
Steam Deck (RADV VANGOGH, Mesa 26.2.5) 7/7 pass 7/7 pass 7/7 pass
  • Where it shows: only on GFX8 so far. The Deck runs the same Mesa version, and on it every [native-depth-diag] fetch line says 0 of N fetches differ.
  • RADV switches: neither nohiz nor nofastclears changes anything on the RX 570, and the failure messages are identical in all three modes. There are no VUID- errors in any mode.
  • What fails: on the RX 570, stencil and driver_path fail at the same place. It's the 2-sample D32S8 surface (format 130), with 6 of 30 fetches wrong.
    • In both tests it's the same pixel and sample pairs: pixel 0 sample 1, 1/0, 4/1, 5/1, 6/0 and 12/1.
    • Each of those reads 05050505 in the first component where 00000000 is expected. The other three components match.
    • The 4-sample D32 surfaces in stencil get no mismatch lines.
RX 570, default mode: all 27 [native-depth-diag] lines from stencil (1666) and driver_path (1672)
1666: [native-depth-diag] depth surface 0x7f9e210a0000 (stencil 0x0): guest vk format 126, host 126, 4 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0x1de01
1666: [native-depth-diag] depth surface 0x7f9e210a0000: initial clear depth 0.000000 stencil 0x00, aspects 0x2, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f9e210a0000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f9e21060000 (stencil 0x0): guest vk format 126, host 126, 4 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0x1de01
1666: [native-depth-diag] depth surface 0x7f9e21060000: initial clear depth 0.000000 stencil 0x00, aspects 0x2, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f9e22110000 (stencil 0x7f9e220f0000): guest vk format 130, host 130, 2 samples, 5x3, flags 0x0, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0xd601
1666: [native-depth-diag] depth surface 0x7f9e22110000: initial clear depth 0.000000 stencil 0x5a, aspects 0x6, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f9e22110000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f9e22110000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 0 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 1 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 4 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 5 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 6 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 12 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: 6 of 30 fetches differ
1672: [native-depth-diag] depth surface 0x7ff64cbe0000 (stencil 0x7ff64cbc0000): guest vk format 130, host 130, 2 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0xd601
1672: [native-depth-diag] depth surface 0x7ff64cbe0000: initial clear depth 0.000000 stencil 0x00, aspects 0x6, sampleable 1, refusal "", recorded in the recorder
1672: [native-depth-diag] depth surface 0x7ff64cbe0000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1672: [native-depth-diag] depth surface 0x7ff64cbe0000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: pixel 0 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: pixel 1 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: pixel 4 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: pixel 5 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: pixel 6 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: pixel 12 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1672: [native-depth-diag] native depth imported on the driver's device, samples 2, clear depth 0.0 stencil 0x00, raster no at 0.0000, drawn none: 6 of 30 fetches differ

I have the full -V logs from both machines for all three modes, so I can attach any of them.

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@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 nohiz and nofastclears making no difference, it points at how the 2-sample D32S8 shadow copy comes out on GCN4. The next step is a fix branch for you to try on the RX 570. The logs aren't needed for now.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@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 (radv_image.c, the gfx_level <= GFX8 check that sets RADEON_SURF_NO_RENDER_TARGET). Our sample shadow has only sampled and transfer-dst usage, so vkCmdCopyImage into it runs on RADV's compute path, a per-sample fetch and image store, instead of the graphics one. On the Deck the same shadow is renderable. On the RX 570 the 4-sample D32 surfaces have no stencil, so they're renderable too. That matches where it fails.

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 diag/native-depth-radv-9717-v2 (23b2e76a9e, on top of the last diag commit). Please run it in these four modes, each switch off unless set:

Mode What it changes
(none) Same as last time
APS5_DEPTH_SHADOW_SENTINEL=1 Clears the shadow to depth 0.5 and stencil 0x77 before the first copy
APS5_DEPTH_SHADOW_ATTACHMENT=1 Creates the shadow with depth-attachment usage
APS5_DEPTH_DIRECT=1 Samples the attachment directly, with no shadow

All we need per mode is the pass/fail count and the [native-depth-diag] lines, including the new shadow created line. The Deck isn't needed this time. On an RTX 3070 and a Radeon iGPU on AMD's Windows driver, all four modes pass with no differing fetches.

@ryanc2112

Copy link
Copy Markdown
Contributor

@EagleBearerYS here's v2 at 23b2e76a9e on the RX 570 (RADV POLARIS10, Mesa 26.2.5). It's the same build setup as last time, with ctest --no-tests=error. I ran all seven tests once in each mode.

Mode Result [native-depth-diag] fetch lines
(none) 0/7 pass 2-sample D32S8 checks: 2–10 of 30 differ
APS5_DEPTH_SHADOW_SENTINEL=1 0/7 pass 2-sample D32S8 checks: 20–27 of 30 differ
APS5_DEPTH_SHADOW_ATTACHMENT=1 7/7 pass all 0 of N fetches differ
APS5_DEPTH_DIRECT=1 7/7 pass all 0 of N fetches differ

There are no VUID- errors in any mode.

  • shadow created: it reports usage 0x6 (transfer dst + sampled) with no switch and with SENTINEL, and usage 0x26 with ATTACHMENT. With DIRECT there's no shadow created line.
  • With SENTINEL: most of the new mismatches read 3f000000 (0.5), so the sentinel survived there and the copy never wrote those samples. The pairs that read 05050505 with no switch still read 05050505, for example pixel 0 sample 1 and pixel 1 sample 0 in stencil. So it looks like both things happen: the copy skips most samples and writes the wrong value into a few.
  • D32 without stencil: the expand gate D32 checks are 0 of 30 in both failing modes. Only the D32S8 ones differ.
  • Other values: some tests' mismatches read 02020202 instead of 05050505.
stencil (1666), no switch: all [native-depth-diag] lines
1666: [native-depth-diag] depth surface 0x7f2ded2a0000 (stencil 0x0): guest vk format 126, host 126, 4 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0x1de01
1666: [native-depth-diag] depth surface 0x7f2ded2a0000: initial clear depth 0.000000 stencil 0x00, aspects 0x2, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f2ded2a0000: shadow created, usage 0x6, sentinel 0
1666: [native-depth-diag] depth surface 0x7f2ded2a0000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f2ded260000 (stencil 0x0): guest vk format 126, host 126, 4 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0x1de01
1666: [native-depth-diag] depth surface 0x7f2ded260000: initial clear depth 0.000000 stencil 0x00, aspects 0x2, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f2dee310000 (stencil 0x7f2dee2f0000): guest vk format 130, host 130, 2 samples, 5x3, flags 0x0, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0xd601
1666: [native-depth-diag] depth surface 0x7f2dee310000: initial clear depth 0.000000 stencil 0x5a, aspects 0x6, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f2dee310000: shadow created, usage 0x6, sentinel 0
1666: [native-depth-diag] depth surface 0x7f2dee310000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] depth surface 0x7f2dee310000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 0 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 1 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 4 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 5 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 6 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 12 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: 6 of 30 fetches differ
stencil (1666), APS5_DEPTH_SHADOW_SENTINEL=1: all [native-depth-diag] lines
1666: [native-depth-diag] depth surface 0x7ff66b2a0000 (stencil 0x0): guest vk format 126, host 126, 4 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0x1de01
1666: [native-depth-diag] depth surface 0x7ff66b2a0000: initial clear depth 0.000000 stencil 0x00, aspects 0x2, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7ff66b2a0000: shadow created, usage 0x6, sentinel 1
1666: [native-depth-diag] depth surface 0x7ff66b2a0000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] depth surface 0x7ff66b260000 (stencil 0x0): guest vk format 126, host 126, 4 samples, 5x3, flags 0x1000, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0x1de01
1666: [native-depth-diag] depth surface 0x7ff66b260000: initial clear depth 0.000000 stencil 0x00, aspects 0x2, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7ff66c310000 (stencil 0x7ff66c2f0000): guest vk format 130, host 130, 2 samples, 5x3, flags 0x0, shadow 1 (0, counts 0xf), direct 1 (0, counts 0xf), features 0xd601
1666: [native-depth-diag] depth surface 0x7ff66c310000: initial clear depth 0.000000 stencil 0x5a, aspects 0x6, sampleable 1, refusal "", recorded in the recorder
1666: [native-depth-diag] depth surface 0x7ff66c310000: shadow created, usage 0x6, sentinel 1
1666: [native-depth-diag] depth surface 0x7ff66c310000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] depth surface 0x7ff66c310000: shadow refresh, drawn 1, stencil read 0, copied aspects 0x2, recorded in the recorder
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 0 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 1 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 2 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 2 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 3 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 3 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 4 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 5 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 6 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 05050505 00000000 00000000 3f800000 (6.25455189e-36 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 7 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 7 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 8 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 8 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 9 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 9 sample 1 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: pixel 10 sample 0 of 2: expected 00000000 00000000 00000000 3f800000 (0), read 3f000000 00000000 00000000 3f800000 (0.5 0 0 1)
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: 24 of 30 fetches differ
stencil (1666), APS5_DEPTH_SHADOW_ATTACHMENT=1: shadow created and summary lines
1666: [native-depth-diag] depth surface 0x7f625a5f0000: shadow created, usage 0x26, sentinel 0
1666: [native-depth-diag] depth surface 0x7f625b660000: shadow created, usage 0x26, sentinel 0
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x33, raster no at 0.0000, drawn none: 0 of 30 fetches differ
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x33, raster yes at 0.1250, drawn 0.125000: 0 of 30 fetches differ
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x33, raster yes at 0.2500, drawn 0.250000: 0 of 30 fetches differ
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x33, raster yes at 0.3750, drawn 0.125000: 0 of 30 fetches differ
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x33, raster yes at 0.3750, drawn none: 0 of 30 fetches differ
1666: [native-depth-diag] stencil, samples 2, clear depth 0.0 stencil 0x5a, raster no at 0.0000, drawn none: 0 of 30 fetches differ

I have the full -V logs for all four modes, and I can try a fix branch whenever it's ready.

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@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 fix/agc-native-depth-shadow-attachment, on top of main at 9090972b7e. It has two commits:

  • 0605086887 adds a 64x32 case to the driver-path test, with no fix.
  • 5537967776 gives every multisampled depth-stencil sample shadow depth-attachment usage. It doesn't check the driver.

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 5537967776 there would help too, but it's optional.

oneandonlydean pushed a commit that referenced this pull request Nov 4, 2026
… 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.
@ryanc2112

Copy link
Copy Markdown
Contributor

@EagleBearerYS confirmed on both machines, with no switches and ctest --no-tests=error. I ran the seven tests 3 times at each commit.

Commit RX 570 (RADV POLARIS10, Mesa 26.2.5) Steam Deck (RADV VANGOGH, Mesa 26.2.5)
0605086887 (test only) 0/7 pass, 3/3 runs not run
5537967776 (fix) 7/7 pass, 3/3 runs 7/7 pass, 3/3 runs
  • Failure at 0605086887: driver_path fails with a sampled depth on the driver's device is not 0.000000, as before.
  • Validation: a verbose driver_path run at each commit shows no VUID- errors, with VK_LAYER_KHRONOS_validation loaded.
  • Build: GCC 16.2.1, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.

Thanks for tracking it down.

AI-assisted: yes (Claude Code)

@ryanc2112

Copy link
Copy Markdown
Contributor

@EagleBearerYS one more data point: the fix also covers the native depth tests added since 9090972b7e.

On current main b11c7bf84f, the RX 570 (RADV POLARIS10, Mesa 26.2.5) fails 11 agc_driver_native_depth_* tests: the original seven plus aliased_depth_depth_only, aliased_depth_stencil, uniform_planes and publication. With 0605086887 and 5537967776 cherry-picked on top (no conflicts), all 17 agc_driver_native_depth_* tests pass, 3 of 3 runs, with no VUID- errors.

Same setup as before: clean build, GCC 16.2.1, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, VK_LAYER_KHRONOS_validation, ctest --no-tests=error.

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@ryanc2112 thanks for both runs, on the two machines and on today's main. The fix is up as #15750, with your results in its Tested section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.