AGC: an RGBA8 texture over a depth surface's stencil plane stops FPV Simulator ("sampling the stencil plane ... is not implemented") #2994
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T20:05:07Z.
FPV Simulator (PPSA10698 v01.006.000, Unity 2021.3 URP) ends on Windows when it presents a frame:
Cause
Unity reuses the memory of transient render targets. The T# base, 0x231590000, is the stencil plane of the D32S8 surface at 0x230cd0000, and the first line shows the title binding that address as a color target. The texture is a 1920x1080 RGBA8 sRGB view of the same extent, so it reads the color data, not an 8-bit stencil plane.
Since
9d65003c(#1495),DepthSurfaceTexturetreats a depth-plane view in a format that cannot hold the plane as reused memory and falls through to the ordinary texture path. Stencil-plane views kept the old handling: every same-extent view of the stencil plane goes to the depth surface, andSampledthrows for any format other than R8 uint.Fix
AlxcBTW/AnyPS5#26 (
a1827af1, onmain57f96fd2). A stencil-plane view whose texels are not one byte wide now falls through to the ordinary texture path, like 9d65003c's rule for the depth plane. 8-bit views keep their current handling. Full CI, with the change merged intomain3cb317fc, passed on Linux, macOS and Windows. I can't open it as a PR while intake is limited, so it's here if a collaborator wants to cherry-pick it.#454 (open) is broader: it retires a depth surface once another writer covers its depth or stencil plane. Both change the same lines in
DepthSurfaceTexture.Tested
Windows 11, WinLibs GCC 15.2.0 r7, RTX 5070 Laptop.
DepthSurfaceReuse.cpp(agc_driver_graphics): an R8 uint view of a D32S8 surface's stencil plane still samples the plane; RGBA8 and R32F views of the same extent are read as reused memory. Without the source change the RGBA8 case throws the samesampling the stencil plane ... is not implementederror.agc_driveron NVIDIA 253/253,check_conventions.pypasses.mainwith other patches.AI-assisted: yes (Claude Code).