tests: bind Hi-Stencil explicitly in the stencil discovery case #446
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!446
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/446/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@MehmetCambaz on GitHub · 2026-09-01 21:14 UTC · original
MehmetCambaz:ai/work/depth-identity-test→main· +8 −0 · 1 files · 1 commits · closed without mergingProblem
RenderExecutorStencilBindingDiscoveryfails onmain, which fails bothshader_recompiler_computeandtexture_cache_image_overlap. It fails during the hostphase, so the binary never reaches its compute cases: 56 of 343 cases run before the
abort, and all 272 compute cases are skipped.
Seven open PRs currently have to explain this failure in their test plans, and no issue
tracks it.
Root cause
The assertion names twelve conditions and reports one message. Instrumenting them
individually shows exactly one is false:
So the logical depth image identity the case is named for is intact. What is false is
metadata.stencil_compressed, whichResolveRenderDepthTargetderives from:The case builds an
HW::DepthRenderTargetdirectly and sets format, texture compatibility,HTile acceleration, the addresses and the extent, but never sets
htile_stencil_disabled,so it takes the member default.
1df06e2("guest_gpu: remove stale PS4/GCN era gpuregisters") flipped that default from
falsetotrue. It updated other cases in this filefor its register changes but not this one, so the setup silently came to describe a target
with Hi-Stencil disabled while the assertion still required stencil compression.
Confirmed by building and running the case either side of it:
39a34fa(parent): passes1df06e2: fails with this assertionFix
The default is not observable in production.
stencil_infois only ever populated byDepthStencilInfo::Decode, at both of its call sites inpm4Handlers.cpp, andDecodeassigns every member including
htile_stencil_disabledfrom bit0x20000000. Before anyDB_STENCIL_INFOwrite the format iskInvalid, sohas_stencilis false andstencil_compressedis false whichever default is in place. Only a directly constructedregister, which is to say a test, can depend on it.
So the derivation is right and the setup was stale. This states the field instead of
inheriting it, the way the same case already states
z_compare_base— which is why theother default
1df06e2changed did not break it.The assertion is unchanged, and the diff touches no file under
src/.Test plan
Windows 11, clang-cl 20.1.8, RTX 2060, Release, built on
8022501.ctest: 34/36 to 36/36.shader_recompiler_computeandtexture_cache_image_overlapboth pass.(272 compute, 9 graphics, 6 gpu, 56 host), exit 0, "all cases passed".
the abort.
PPSA25646: 60 fps, checked against a screenshot, rendering correct.No runtime behaviour can change here — the diff contains no production file.
Not addressed: whether
htile_stencil_disableddefaulting totrueis the right resetvalue for the register is a separate question. It is inert in production either way, so I
left the deliberate change from
1df06e2alone rather than revert it to make a test pass.AI use
Developed with AI assistance (Claude). It instrumented the twelve conditions to find which
one failed, bisected the default change to
1df06e2by building and running the case eitherside of it, checked that
Decodemakes the default unobservable in production, and ran thebuilds, ctest runs and the game check above on my machine. I reviewed the diff and confirmed
it changes no production code.
@francoisatt on GitHub · 2026-09-03 20:27 UTC · original
Confirmed on a different configuration.
Before this PR, on
mainatb3c8f91with a full clean rebuild: 34/36,shader_recompiler_computeandtexture_cache_image_overlapboth aborting with0xc0000409atRenderExecutorStencilBindingDiscovery.With this PR applied: 36/36, both tests pass.
@Nmzik on GitHub · 2026-09-12 13:38 UTC · original · edited 2026-09-12 13:39 UTC
obsolete
Pull request closed