feat(agc): test the depth bounds in the pixel program when the device lacks the depthBounds feature #11551

Open
imellag wants to merge 15 commits from upstream-pr/11551 into main
imellag commented 2026-10-26 18:28:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by imellag on 2026-10-26T18:28:11Z.


What

#9737 emulates the depth bounds test on a device without the depthBounds feature (MoltenVK has none) only when one bound is at 0 or 1 and the draw neither tests nor writes depth. Every other depth bounds draw still stops with needs the depthBounds feature. UE4 deferred lights are such draws: both bounds inside (0, 1) and a GREATER_OR_EQUAL depth test without depth writes. A local counter in Stray (PPSA02100) on macOS, on a tree with unmerged PRs, counted 54 to 417 of them per 10 s in the intro (3840x2160 D32, one sample, no stencil) and 6 to 24 per 10 s in gameplay (no depth test, both bounds inside (0, 1)).

This change tests the bounds in the pixel program for those draws. The depth bounds test passes a pixel when its stored depth Zs is within [min, max]. When the draw writes neither depth nor stencil, Zs does not change during the draw, so the pixel program can read it and do the compare itself:

  • ApplyDepthBoundsEmulation (Graphics/src/State.cpp) still prefers the one-sided depth test of #9737. Otherwise it clears depthBoundsTest and sets depthBoundsDiscard.
  • decodeDraw passes pixel.depthBoundsDiscard to the recompiler: a flag and the T# words of a sampled view of the depth target (DepthBoundsSourceWords, the depth copy view with an identity swizzle).
  • The recompiler adds that image to the pixel program, like the color target merge image, and two fragment push dwords after the stencil reference dword (specialization constant DepthBoundsOffset). Its prologue fetches Zs at FragCoord.xy, and demotes the fragment to a helper invocation, or kills it where demote is not available, when Zs < min or Zs > max. This runs before the rest of the program, so a fragment outside the bounds has no side effects.
  • The driver writes {min, max} as floats into those dwords for every draw, next to the depth remap push.
  • When the pixel program's shader data fills its push range, so the two bounds dwords (and the stencil reference, if any) do not fit beside it, the shader data goes to its storage buffer and the driver dwords start at the stage start. A stencil replay without the depth bounds test keeps main's rule.
  • The flag is part of the shader cache key, and the flag and the T# are part of the draw lookup key and of the serialized request (version 63: main is at 62 and refuses 58 to 61). The disk cache format goes to 91 (main is at 90), since the compiled result and the image records gain a field. The depth bounds offset is specialization constant 8239 (main took 8237 and 8238 for mesh layers).

It throws, with its own message, when this would not be exact:

  • a normalized depth target: only the 32-bit float target is checked here;
  • a multisampled depth target: one fetch per pixel cannot test each sample;
  • a draw that writes depth, since the program would read the target it writes;
  • a draw that writes stencil on a pass or a failed test, since with early fragment tests the stencil operations would run before the program discards;
  • a draw without a pixel program;
  • a pixel program that also merges into a color target: the color target merge images and the depth image are not combined in one program yet;
  • a pixel program that reads neighbouring lanes on a device without demote, since a killed lane would change what they read.

Devices with depthBounds are unchanged, and so is the one-sided path. The debt entry in docs/dev/debt/libSceAgcDriver.md now describes both paths.

Tested

Current head 4d93f2de0c: main 6db6a3e927 merged in. main took disk cache format 90, so this PR moves to 91; that line was the only conflict. main did not change the request serializer, which stays at 63.

  • macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, 3 runs of the 7 focused tests with VK_LOADER_DEBUG=layer: the loader inserts the layer, no VUID- and no was not found but was requested. agc_driver_depth_bounds_emulation_draw reports 20 cases, 12 by a depth test, all in the pixel program. 7 of 7 pass in 2 runs; in the other, agc_driver_graphics stops at two ranges under a budget for two were not imported, the host import budget case that also fails intermittently on main (see below).

Previous head 275b14edd9: main 7ecbdbab07 merged in. main took request serialization 62 (a trailing spannedAnySubgroup byte, versions 58 to 61 refused) and disk cache format 88, and now keeps one push constant dword free for the stencil reference when it places shader data in the push range.

  • The depth bounds discard moves to request serialization 63 and follows main's version 62 byte (39 bytes after main's version 56 tail). The disk cache format is 89.
  • The push data check in BindingAllocator and MatchesPreparedShader now counts both driver dwords: one for the stencil reference (main's rule) and two for the depth bounds, so shader data uses the push range only when data + stencil + depth bounds fit.
  • request_serializer: the depth bounds case now reads a version 62 request; main's spannedAnySubgroup check takes its version 62 bytes by dropping the depth bounds tail; version 64 is refused.
  • macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, validation layer inserted, no VUID-: request_serializer, shader_memory_decoder_tolerance, agc_driver_depth_bounds_emulation_draw (20 cases, all in the pixel program), agc_driver_depth_bounds_state, agc_shader_disk_cache*, agc_shader_memory and agc_shader_memory_coherent_atomic_loads pass. agc_driver_graphics passed 2 of 3 runs; the failing run stops in main's host import budget case (two ranges under a budget for two were not imported, BdaResources.cpp), which this PR does not touch. python3 tools/check_conventions.py --base upstream/main passes.

Previous head cf35581b47: main 80b0bdf264 merged in (on top of a6f86702f6, which merged 5af5d8905a). main took request serialization 57 (two trailing target fields, maxImageArrayLayers and fixedPushSlots) and disk cache format 69, the numbers this PR used, and #18937 added a read-only depth bounds comparison beside the emulation in DrawDecode.cpp.

  • The depth bounds discard moves to request serialization 58 and is now written at the end of the request (33 bytes after main's version 57 tail) instead of inside the pixel info, so main's legacy fixtures keep their offsets; a discard without pixel info is refused. The disk cache format is 70. 80b0bdf264 added ImageResource::gathered and a stencil flag to DepthCopySourceWords; the field count check is 52 and DepthBoundsSourceWords keeps the depth words.
  • request_serializer has a new case for it: round trip, a version 57 request reads without a discard and re-serializes to the plain version 58 bytes, and the unowned discard throws. main's test files are taken as they are, with the tail dropped in the helpers that build older versions.
  • macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, validation layer inserted, no VUID-: request_serializer, shader_memory_decoder_tolerance, agc_driver_depth_bounds_emulation_draw (20 cases, all in the pixel program), agc_driver_depth_bounds_state, agc_driver_graphics, agc_shader_disk_cache, agc_shader_memory and agc_shader_memory_coherent_atomic_loads pass. python3 tools/check_conventions.py --base upstream/main passes.

Previous head fb1d6f40a3: main 949ac1ffbf merged in. main took request serialization 55 (the color target merge grows from 40 to 55 bytes, read from 55) and 56 (two compute VGPR fields), and disk cache format 68. This PR now writes request 57, reads the depth bounds discard from 57, and writes disk cache 69. The serializer tests take a current request down in main's steps: below 57 they drop the depth bounds bytes, which now follow the 55-byte merge, and below 55 main's merge fields; the depth export checks in ShaderMemory.cpp find the depth bounds bytes from the end of the request, so the order of the two erasures does not matter. The ImageResource count (51) and the guarded RecompileResult and CompiledShaderArtifact sizes (560, 296) are unchanged against main.

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2, now on plain main (its AGC test targets build on macOS). ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -R '^(request_serializer|agc_driver_depth_bounds_emulation_draw|agc_driver_depth_bounds_state|agc_driver_graphics|agc_shader_disk_cache.*|agc_shader_memory)$' -V:

  • main 949ac1ffbf: 8 of 8, agc_driver_depth_bounds_emulation_draw with 12 cases, 0 compared with the native test;
  • this head: 8 of 8, with 20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test;
  • no VUID- line and no was not found but was requested by env var VK_INSTANCE_LAYERS in either log.
  • Negative control: reading the depth bounds discard from 56 instead of 57 makes request_serializer abort.

tools/check_conventions.py --base upstream/main passes.

Previous head 1d0c7b6904: main 6ed10ccd1f merged in. #11351 took request serialization 54 on main (two trailing f16 NaN flags, read from 54), the number this PR used for the depth bounds discard, with a different layout (found by @Amoenus). Git merged the serializer without a conflict, so this PR now writes request 55: main's f16 flags stay where main reads them from 54, and the depth bounds discard in the pixel section is read from 55. The disk cache format stays 57 (main is still at 56). In the serializer tests a request below 55 drops the depth bounds bytes, then follows main's steps below 54. New checks read a version 54 request with both f16 flags set and no depth bounds bytes: the flags survive, the discard is off, and it is written back as the same version 55 bytes. With the decode gate put back at 54, request_serializer and agc_shader_memory fail (RequestSerializer: unexpected trailing data).

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Base (local): support/macos-boot-1103 merged with main 6ed10ccd1f, plus two local fixes for code on main that does not build on macOS with libc++ (std::thread without <thread> in RunReport.cpp, which #15973 adds to RunReport.hpp; ::environ in VulkanDevice.cpp). The change side is that tree + this head. With ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, the same 7 focused tests pass 7 of 7 on both sides; agc_driver_depth_bounds_emulation_draw runs 12 cases on the base and 20 with this PR. Neither log has a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS.

Previous head 0baa4668cb: main b11c7bf84f merged in. Since b2cf782aa4, main took request serialization 53 (a trailing shaderImageMinLod byte) and disk cache format 56, and added a field to ImageResource (50 fields), which conflicted with this PR's format lines. This PR now writes request 54 (the depth bounds discard in the pixel section, read from 54) and disk cache 57, and its ImageResource count is 51. In the serializer tests, a request taken below 54 drops the depth bounds bytes and below 53 the trailing minimum LOD byte, following main's new steps; that adds one pop_back to the merged-hull chain and to the version 52 checks, and main's new minimum LOD check now starts from 54. #10351's head still writes disk cache 53 and #7085's 56; whichever lands after this one takes the next number, as agreed.

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Base: support/macos-boot-1103 merged with main b11c7bf84f, plus #15700 (tests on macOS) and two local fixes for code that reached main today and does not build on macOS (libSceAppContent quota type, a const vtable cast in GuestNpCommonRuntime.cpp; I'm opening both as PRs). The change side is that tree + this head. With ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, the 7 focused tests (request_serializer, agc_shader_memory, agc_shader_disk_cache, agc_driver_depth_bounds_state, agc_driver_depth_bounds_emulation_draw, agc_driver_graphics, agc_driver_pixel_barycentric_emulation) pass 7 of 7 on both sides; agc_driver_depth_bounds_emulation_draw runs 12 cases on the base and 20 with this PR. Neither log has a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS.

Previous head b2cf782aa4: main b28bb77217 merged in. Since cb3e417e4e, #10547 took request serialization 52 (a trailing hostInterpolationFirst byte), #12662 (open, ahead in the queue) writes 53, #10351 (open, agreed to go first) takes disk cache 52, and #12246 put the RecompileResult size check under __cpp_lib_atomic_shared_ptr and raised the ImageResource field count to 49. So this head writes request 54 and reads the depth bounds discard from 54. Disk cache format is 53. fieldCount<ImageResource>() is 50, and the guarded RecompileResult check is 560. The specialization constant stays 8239. The serializer tests replay a version 52 request without the discard, and main's hostInterpolationFirst step drops the discard bytes before going to 51. @B-Howell worked out the resolution on Linux (comment); this head follows it with 54 in place of 53, as @oneandonlydean pointed out.

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, x86-64 Release under Rosetta 2. Local support branch (not pushed): main b28bb77217 + #11554, #7631, #7804, #4630, #14883, #15002, plus two local build fixes for code that reached main today (atomic_ref<const std::uint32_t> in SyncOnAddress.cpp; a const void* to function pointer cast in GuestBadOptionalAccess.cpp). The change side is that branch + this head. Same 7 focused tests and environment as below (VK_LOADER_DEBUG=layer added):

  • base: 7 of 7, agc_driver_depth_bounds_emulation_draw with 12 cases, 0 compared with the native test;
  • change: 7 of 7, with 20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test;
  • the validation layer is inserted in both logs, neither has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line.

Previous head cb3e417e4e (main 88e804b0a7): request 52, disk cache 52, spec constant 8239. The same 7 tests passed on both sides, with no VUID-.

Previous head e8871dc8c6: main 21a556f567 merged in, disk cache format 51. #12561 merged with disk cache format 50 and a new ImageResource field (adjustedSample). Git merged the previous head onto main without a conflict, because both sides changed 45 to 46 and 49 to 50, but the merged tree stopped at fieldCount<ImageResource>() == 46 (found by @jotitadev; the Windows build here failed the same way). This head merges main into the branch, with no conflict, and the last commit sets the field count to 47 and the disk cache format to 51, so caches written by main at 50 are not read with this layout. The request format stays 50: main is still at 49. The tree is the same as the three commits rebased onto 21a556f567.

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Support branch, not main: support/macos-boot-1030b (d90dad6690) = the support branch described below merged with main 21a556f567, the DirectMemory.cpp conflict with main's Emscripten branches resolved, plus one local line that keeps its unsupported-host #else after that merge. Change: support/macos-boot-1030b-pr11551 (967890c4e0) = that branch + this head. The same 7 focused tests and environment as below: base 7 of 7 (12 cases, 0 compared with the native test), change 7 of 7 (20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test). The loader adds VK_LAYER_KHRONOS_validation from VK_INSTANCE_LAYERS in both logs, neither has was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line.

Previous head cce9f5c317. Stray (PPSA02100) on macOS loads a level with a pixel program whose shader data fills its 128-byte push range, so the previous head threw the depth bounds test in the pixel program requires two unused push constant dwords there. The third commit moves the shader data to its storage buffer in that case (above); MatchesPreparedShader uses the same rule. agc_driver_graphics gains the case with and without stencil replay, the prepared-artifact match and a range that is still too small: it fails on the previous head with that message and passes on this one. On the same support branch as below, now support/macos-boot-1030-pr11551 (f37b423626, the support branch + the three commits), the same 7 focused tests pass with the validation layer loaded and no VUID-. With this commit Stray gets past the level load into gameplay on a bench tree (that support branch + this PR + #9356), where the previous head stopped.

Head 47e4256594, rebased onto main 98ddd9c179. main still uses request format 49 and disk cache format 49, so this PR keeps request 50 and disk cache 50 (the next free ones; whichever of the open claims lands second takes the next number). The conflicts came from #11684, which turned the single color target merge into targetMerges with blend state. Resolved by keeping all of main's merge and blend fields, key hashes, emitter helpers and tests and adding the depth bounds parts next to them:

  • DrawLookup.cpp and DrawRegisterKey.cpp: both draw keys hash and compare every targetMerges entry as on main, then depthBoundsDiscard;
  • Recompiler.cpp: the variant key mixes main's merges and then the depth bounds flag and T#; mergeTargetImage returns main's merge path unchanged and handles the depth bounds image first, in its own branch;
  • ShaderInfoCollector.cpp: AddTargetMerge for main's merges, then AddDepthBoundsSource;
  • SpirvModuleEmitter.cpp: main's blend helpers and the depth bounds prologue helpers both kept;
  • ShaderMemory.cpp: main's blend and two-target serialization checks kept; the version 43 replay fixture still strips the 40 merge bytes and this PR's 33 depth bounds bytes. The version 49 depth export clamp and version 48 barycentric replay checks are unchanged.

ShaderStageInputInfo keeps main's merge fields and adds depthBoundsDiscard. The Linux-only size checks stay at 296 and 560 (main's 288 and 552 plus 8): measured on macOS with libc++, CompiledShaderArtifact goes 288 to 296 and RecompileResult 616 to 624 with this PR. The only change besides the conflict resolution is one more refusal in the debt entry: a pixel program that has both a color target merge and the depth bounds image throws (the depth bounds source image cannot join the prepared images), as it did with the single merge before.

With #10351 (head 760860ecc4) the only conflict is one line in Recompiler.cpp: #10351's stencilMode lines stay, and bindingAllocator.Allocate takes this PR's depthBounds argument after its stencilReplay. #10351 also takes disk cache format 50, which main now uses too (pointed out on #10351); in the agreed order it takes 51 and this PR moves to 52.

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Support branch, not main: fork branch support/macos-boot-1030 (6747733e89) = main 98ddd9c179 + only the open macOS PRs #11447 #11554 #10552 #7631 #7804 #4630 and #13220 (the duplicate write_watch test registration that stops main's CMake on macOS), plus one local line that reads environ through _NSGetEnviron() in HostReportSources.cpp (main doesn't compile it on macOS; no open PR covers it yet). The conflicts of #11554, #10552, #7631, #7804 and #4630 with main are resolved in the merge commits. Change: that branch + the two commits of this PR (eca8ce338a, now replaced on the fork by the three-commit branch above). The tests ran on 7290fdb49d, which differs from it only by the debt entry line above.

With ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest -R '^(request_serializer|agc_shader_memory|agc_shader_disk_cache|agc_driver_depth_bounds_state|agc_driver_depth_bounds_emulation_draw|agc_driver_graphics|agc_driver_pixel_barycentric_emulation)$' -V:

  • base: 6 of 7 pass; agc_driver_graphics failed at two ranges under a budget for two were not imported. agc_driver_depth_bounds_emulation_draw passes with 12 cases, 0 compared with the native test;
  • change: 7 of 7 pass; agc_driver_depth_bounds_emulation_draw passes with 20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test;
  • agc_driver_graphics 3 more runs on each: base 3 of 3 pass, change 2 of 3 (the failed run stops at the same two ranges under a budget for two were not imported). So 3 of 4 on each side; the message comes from the host import budget test, outside this PR's paths;
  • in every log the loader lists VK_LAYER_KHRONOS_validation as enabled by VK_INSTANCE_LAYERS, there is no was not found but was requested by env var VK_INSTANCE_LAYERS, and no VUID- line.

Logs attached.

Previous head 5a15547d39, rebased onto main 750cf6cf48. Request format 50 and disk cache format 50 after main took 49 for both. On support branch support/macos-boot-1028 (eca446163e) and support/macos-boot-1028-pr11551 (4e4aade74a), the same 7 tests passed on both, no VUID-; agc_driver_graphics failed once in the first change run at the same two ranges under a budget for two were not imported and passed in the 3 runs after.

Previous head 39d5e816b1, rebased onto main e0cd1259a9 after #9193 merged with request format 48. This PR now uses request format 49 and keeps #9193's barycentric flag at the end of the request; the disk cache format stays 49. On macOS (main e0cd1259a9 with the open macOS boot PRs), request_serializer, agc_shader_memory, agc_shader_disk_cache, agc_driver_depth_bounds_state, agc_driver_depth_bounds_emulation_draw, agc_driver_graphics and #9193's agc_driver_pixel_barycentric_emulation pass with the validation layer loaded and no VUID- lines.

Previous head b7acb0da81, rebased onto main fe2b52c7e4. main meanwhile took request format 47 (#10515) and disk cache format 48 (#8077, which also adds a field to CompiledShaderArtifact and RecompileResult). So this PR now uses request format 48 and disk cache format 49, and the Linux-only size checks in ShaderDiskCache.cpp are 296 and 560: main's 288 and 552 plus this PR's 8 bytes. @jotitadev found the missing size update on the previous head. macOS doesn't compile those checks, so I checked the difference there: both structs grow by 8 bytes. On macOS, on current main with the macOS PRs listed below merged in, request_serializer, agc_shader_memory, agc_shader_disk_cache, agc_driver_depth_bounds_state and agc_driver_depth_bounds_emulation_draw (20 cases, 12 by a depth test, all in the pixel program) pass at this head with the validation layer loaded and no VUID- lines.

Linux (@jotitadev, previous head 1e2ff2603 on main cb45ae2dd with the size checks fixed, Ubuntu 26.04, GCC 15.2): the focused tests pass 3 of 3 on an NVIDIA RTX 3070 and on lavapipe, and agc_driver_depth_bounds_emulation_draw compares all 20 cases with the native depth bounds test on both. ^agc gives no new failures on either device.

The runs below are on the first head:

macOS (Apple M4 Pro, macOS 27.0.1, MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0, x86-64 Release under Rosetta 2). main does not build and run on macOS, so this ran on main 035ac96edd + #10366 #10552 #7631 #7804 #11249 #10669 #10540 #11447 #11047 #11048 #10876 #9263 and a local patch that loads libvulkan.1.dylib, without and with this commit. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and neither log contains was not found but was requested:

  • agc_driver_depth_bounds_emulation_draw passes with 20 cases, 12 by a depth test, all in the pixel program. The 8 new cases have both bounds inside (0, 1), around the stored depth and one float step past it, two of them under a GREATER_OR_EQUAL depth test. Every case also runs through the pixel program, and the 12 one-sided ones through the depth test as well. MoltenVK has no depthBounds, so none was compared with the native test; on a device with the feature the test compares every case.
  • request_serializer, agc_shader_memory, agc_shader_replay_requests, agc_shader_disk_cache, agc_shader_disk_cache_large_file, agc_driver_depth_bounds_state, agc_driver_stencil_replay, agc_driver_stencil_replay_no_gpl and agc_driver_quad_pixel_mask pass, with no validation errors.
  • DepthBoundsEmulationTests in agc_driver_graphics pass: which draws take the pixel program, which keep the depth test and each refusal. The test binary then hangs in RunBdaResourceTests (releaseParkedImports), on the base without this commit too.
  • ^agc_ without agc_driver_graphics, 1025 tests on each side: the same results apart from 9 tests (agc_driver_prepared_shaders_*deferred*, agc_driver_prepared_shaders_lazy, agc_driver_layered_volume_submit, agc_driver_linear_target_completion_points_sync_flip). They stop with deferred destruction found two different device resolvers on both sides and change from run to run: in three reruns each, they failed every time on the base and failed or passed on this commit. The same 11 validation error kinds appear on both sides, all on the base. The count differences are in those tests and in agc_driver_color1555_target, which logs 2 or 4 between reruns on the base alone.
  • Not run in a title.

tools/check_conventions.py --base upstream/main (21a556f567) passes. tools/pr_overlap.py finds no shared exports and none of the overlapping pull requests implements the depth bounds test. Its conflicting lines are the format version lines that many open pull requests raise (disk cache format in ShaderDiskCache.hpp, request format in RequestSerializer.cpp and the serializer tests: #10359, #10846, #11483, #12662, #12980 and others), the size checks (#9852, #12250: B-Howell proposed this PR first, then #12250 keeps its guard around the new numbers), the stencilReplay line of #10351 (above), and #9508 in Draw.cpp and ShaderResources.cpp. Whichever lands second takes the next format number.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #10351 (agreed order #10351 → this PR for the disk cache format; whichever lands second takes the next number)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: Apple M4 Pro, MoltenVK 1.4.2, macOS 27.2; by @domx4q: NVIDIA GeForce RTX 4090 (620.70.06), Arch Linux, on 275b14edd9 (20 cases compared with the native depth bounds test); by @jotitadev: lavapipe (Mesa 26.0.3), Ubuntu 26.04, on cce9f5c317 with the field count and disk cache format changed to 47 and 51 as in this head, and NVIDIA GeForce RTX 3070 (595.99.02) on an earlier head (1e2ff2603); by @bunbeans2-arch on cce9f5c317: AMD Radeon RX 9070 XT (amdvlk), Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5022625780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551). Originally posted by [imellag](https://github.com/imellag) on 2026-10-26T18:28:11Z. --- ### What #9737 emulates the depth bounds test on a device without the `depthBounds` feature (MoltenVK has none) only when one bound is at 0 or 1 and the draw neither tests nor writes depth. Every other depth bounds draw still stops with `needs the depthBounds feature`. UE4 deferred lights are such draws: both bounds inside `(0, 1)` and a `GREATER_OR_EQUAL` depth test without depth writes. A local counter in Stray (PPSA02100) on macOS, on a tree with unmerged PRs, counted 54 to 417 of them per 10 s in the intro (3840x2160 D32, one sample, no stencil) and 6 to 24 per 10 s in gameplay (no depth test, both bounds inside `(0, 1)`). This change tests the bounds in the pixel program for those draws. The depth bounds test passes a pixel when its **stored** depth `Zs` is within `[min, max]`. When the draw writes neither depth nor stencil, `Zs` does not change during the draw, so the pixel program can read it and do the compare itself: - `ApplyDepthBoundsEmulation` (Graphics/src/State.cpp) still prefers the one-sided depth test of #9737. Otherwise it clears `depthBoundsTest` and sets `depthBoundsDiscard`. - `decodeDraw` passes `pixel.depthBoundsDiscard` to the recompiler: a flag and the T# words of a sampled view of the depth target (`DepthBoundsSourceWords`, the depth copy view with an identity swizzle). - The recompiler adds that image to the pixel program, like the color target merge image, and two fragment push dwords after the stencil reference dword (specialization constant `DepthBoundsOffset`). Its prologue fetches `Zs` at `FragCoord.xy`, and demotes the fragment to a helper invocation, or kills it where demote is not available, when `Zs < min` or `Zs > max`. This runs before the rest of the program, so a fragment outside the bounds has no side effects. - The driver writes `{min, max}` as floats into those dwords for every draw, next to the depth remap push. - When the pixel program's shader data fills its push range, so the two bounds dwords (and the stencil reference, if any) do not fit beside it, the shader data goes to its storage buffer and the driver dwords start at the stage start. A stencil replay without the depth bounds test keeps `main`'s rule. - The flag is part of the shader cache key, and the flag and the T# are part of the draw lookup key and of the serialized request (version 63: `main` is at 62 and refuses 58 to 61). The disk cache format goes to 91 (`main` is at 90), since the compiled result and the image records gain a field. The depth bounds offset is specialization constant 8239 (`main` took 8237 and 8238 for mesh layers). It throws, with its own message, when this would not be exact: - a normalized depth target: only the 32-bit float target is checked here; - a multisampled depth target: one fetch per pixel cannot test each sample; - a draw that writes depth, since the program would read the target it writes; - a draw that writes stencil on a pass or a failed test, since with early fragment tests the stencil operations would run before the program discards; - a draw without a pixel program; - a pixel program that also merges into a color target: the color target merge images and the depth image are not combined in one program yet; - a pixel program that reads neighbouring lanes on a device without demote, since a killed lane would change what they read. Devices with `depthBounds` are unchanged, and so is the one-sided path. The debt entry in `docs/dev/debt/libSceAgcDriver.md` now describes both paths. ### Tested **Current head `4d93f2de0c`: `main` `6db6a3e927` merged in.** `main` took disk cache format 90, so this PR moves to 91; that line was the only conflict. `main` did not change the request serializer, which stays at 63. - macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, 3 runs of the 7 focused tests with `VK_LOADER_DEBUG=layer`: the loader inserts the layer, no `VUID-` and no `was not found but was requested`. `agc_driver_depth_bounds_emulation_draw` reports `20 cases, 12 by a depth test, all in the pixel program`. 7 of 7 pass in 2 runs; in the other, `agc_driver_graphics` stops at `two ranges under a budget for two were not imported`, the host import budget case that also fails intermittently on `main` (see below). **Previous head `275b14edd9`: `main` `7ecbdbab07` merged in.** `main` took request serialization 62 (a trailing `spannedAnySubgroup` byte, versions 58 to 61 refused) and disk cache format 88, and now keeps one push constant dword free for the stencil reference when it places shader data in the push range. - The depth bounds discard moves to request serialization 63 and follows `main`'s version 62 byte (39 bytes after `main`'s version 56 tail). The disk cache format is 89. - The push data check in `BindingAllocator` and `MatchesPreparedShader` now counts both driver dwords: one for the stencil reference (`main`'s rule) and two for the depth bounds, so shader data uses the push range only when `data + stencil + depth bounds` fit. - `request_serializer`: the depth bounds case now reads a version 62 request; `main`'s `spannedAnySubgroup` check takes its version 62 bytes by dropping the depth bounds tail; version 64 is refused. - macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, validation layer inserted, no `VUID-`: `request_serializer`, `shader_memory_decoder_tolerance`, `agc_driver_depth_bounds_emulation_draw` (20 cases, all in the pixel program), `agc_driver_depth_bounds_state`, `agc_shader_disk_cache*`, `agc_shader_memory` and `agc_shader_memory_coherent_atomic_loads` pass. `agc_driver_graphics` passed 2 of 3 runs; the failing run stops in `main`'s host import budget case (`two ranges under a budget for two were not imported`, `BdaResources.cpp`), which this PR does not touch. `python3 tools/check_conventions.py --base upstream/main` passes. **Previous head `cf35581b47`: `main` `80b0bdf264` merged in** (on top of `a6f86702f6`, which merged `5af5d8905a`). `main` took request serialization 57 (two trailing target fields, `maxImageArrayLayers` and `fixedPushSlots`) and disk cache format 69, the numbers this PR used, and #18937 added a read-only depth bounds comparison beside the emulation in `DrawDecode.cpp`. - The depth bounds discard moves to request serialization 58 and is now written at the end of the request (33 bytes after `main`'s version 57 tail) instead of inside the pixel info, so `main`'s legacy fixtures keep their offsets; a discard without pixel info is refused. The disk cache format is 70. `80b0bdf264` added `ImageResource::gathered` and a stencil flag to `DepthCopySourceWords`; the field count check is 52 and `DepthBoundsSourceWords` keeps the depth words. - `request_serializer` has a new case for it: round trip, a version 57 request reads without a discard and re-serializes to the plain version 58 bytes, and the unowned discard throws. `main`'s test files are taken as they are, with the tail dropped in the helpers that build older versions. - macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, validation layer inserted, no `VUID-`: `request_serializer`, `shader_memory_decoder_tolerance`, `agc_driver_depth_bounds_emulation_draw` (20 cases, all in the pixel program), `agc_driver_depth_bounds_state`, `agc_driver_graphics`, `agc_shader_disk_cache`, `agc_shader_memory` and `agc_shader_memory_coherent_atomic_loads` pass. `python3 tools/check_conventions.py --base upstream/main` passes. **Previous head `fb1d6f40a3`: `main` `949ac1ffbf` merged in.** `main` took request serialization 55 (the color target merge grows from 40 to 55 bytes, read from 55) and 56 (two compute VGPR fields), and disk cache format 68. This PR now writes request 57, reads the depth bounds discard from 57, and writes disk cache 69. The serializer tests take a current request down in `main`'s steps: below 57 they drop the depth bounds bytes, which now follow the 55-byte merge, and below 55 `main`'s merge fields; the depth export checks in `ShaderMemory.cpp` find the depth bounds bytes from the end of the request, so the order of the two erasures does not matter. The `ImageResource` count (51) and the guarded `RecompileResult` and `CompiledShaderArtifact` sizes (560, 296) are unchanged against `main`. macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2, now on plain `main` (its AGC test targets build on macOS). `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ctest -R '^(request_serializer|agc_driver_depth_bounds_emulation_draw|agc_driver_depth_bounds_state|agc_driver_graphics|agc_shader_disk_cache.*|agc_shader_memory)$' -V`: - `main` `949ac1ffbf`: 8 of 8, `agc_driver_depth_bounds_emulation_draw` with `12 cases, 0 compared with the native test`; - this head: 8 of 8, with `20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test`; - no `VUID-` line and no `was not found but was requested by env var VK_INSTANCE_LAYERS` in either log. - Negative control: reading the depth bounds discard from 56 instead of 57 makes `request_serializer` abort. `tools/check_conventions.py --base upstream/main` passes. **Previous head `1d0c7b6904`: `main` `6ed10ccd1f` merged in.** #11351 took request serialization 54 on `main` (two trailing f16 NaN flags, read from 54), the number this PR used for the depth bounds discard, with a different layout (found by @Amoenus). Git merged the serializer without a conflict, so this PR now writes request 55: `main`'s f16 flags stay where `main` reads them from 54, and the depth bounds discard in the pixel section is read from 55. The disk cache format stays 57 (`main` is still at 56). In the serializer tests a request below 55 drops the depth bounds bytes, then follows `main`'s steps below 54. New checks read a version 54 request with both f16 flags set and no depth bounds bytes: the flags survive, the discard is off, and it is written back as the same version 55 bytes. With the decode gate put back at 54, `request_serializer` and `agc_shader_memory` fail (`RequestSerializer: unexpected trailing data`). macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Base (local): [`support/macos-boot-1103`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1103) merged with `main` `6ed10ccd1f`, plus two local fixes for code on `main` that does not build on macOS with libc++ (`std::thread` without `<thread>` in `RunReport.cpp`, which #15973 adds to `RunReport.hpp`; `::environ` in `VulkanDevice.cpp`). The change side is that tree + this head. With `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, the same 7 focused tests pass 7 of 7 on both sides; `agc_driver_depth_bounds_emulation_draw` runs 12 cases on the base and 20 with this PR. Neither log has a `VUID-` line or `was not found but was requested by env var VK_INSTANCE_LAYERS`. **Previous head `0baa4668cb`: `main` `b11c7bf84f` merged in.** Since `b2cf782aa4`, `main` took request serialization 53 (a trailing `shaderImageMinLod` byte) and disk cache format 56, and added a field to `ImageResource` (50 fields), which conflicted with this PR's format lines. This PR now writes request 54 (the depth bounds discard in the pixel section, read from 54) and disk cache 57, and its `ImageResource` count is 51. In the serializer tests, a request taken below 54 drops the depth bounds bytes and below 53 the trailing minimum LOD byte, following `main`'s new steps; that adds one `pop_back` to the merged-hull chain and to the version 52 checks, and `main`'s new minimum LOD check now starts from 54. #10351's head still writes disk cache 53 and #7085's 56; whichever lands after this one takes the next number, as agreed. macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Base: [`support/macos-boot-1103`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1103) merged with `main` `b11c7bf84f`, plus #15700 (tests on macOS) and two local fixes for code that reached `main` today and does not build on macOS (`libSceAppContent` quota type, a `const` vtable cast in `GuestNpCommonRuntime.cpp`; I'm opening both as PRs). The change side is that tree + this head. With `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, the 7 focused tests (`request_serializer`, `agc_shader_memory`, `agc_shader_disk_cache`, `agc_driver_depth_bounds_state`, `agc_driver_depth_bounds_emulation_draw`, `agc_driver_graphics`, `agc_driver_pixel_barycentric_emulation`) pass 7 of 7 on both sides; `agc_driver_depth_bounds_emulation_draw` runs 12 cases on the base and 20 with this PR. Neither log has a `VUID-` line or `was not found but was requested by env var VK_INSTANCE_LAYERS`. **Previous head `b2cf782aa4`: `main` `b28bb77217` merged in.** Since `cb3e417e4e`, #10547 took request serialization 52 (a trailing `hostInterpolationFirst` byte), #12662 (open, ahead in the queue) writes 53, #10351 (open, agreed to go first) takes disk cache 52, and #12246 put the `RecompileResult` size check under `__cpp_lib_atomic_shared_ptr` and raised the `ImageResource` field count to 49. So this head writes request 54 and reads the depth bounds discard from 54. Disk cache format is 53. `fieldCount<ImageResource>()` is 50, and the guarded `RecompileResult` check is 560. The specialization constant stays 8239. The serializer tests replay a version 52 request without the discard, and `main`'s `hostInterpolationFirst` step drops the discard bytes before going to 51. @B-Howell worked out the resolution on Linux ([comment](https://github.com/boykopovar/AnyPS5/pull/11551#issuecomment-6579846708)); this head follows it with 54 in place of 53, as @oneandonlydean pointed out. macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2, x86-64 Release under Rosetta 2. Local support branch (not pushed): `main` `b28bb77217` + #11554, #7631, #7804, #4630, #14883, #15002, plus two local build fixes for code that reached `main` today (`atomic_ref<const std::uint32_t>` in `SyncOnAddress.cpp`; a const `void*` to function pointer cast in `GuestBadOptionalAccess.cpp`). The change side is that branch + this head. Same 7 focused tests and environment as below (`VK_LOADER_DEBUG=layer` added): - base: 7 of 7, `agc_driver_depth_bounds_emulation_draw` with `12 cases, 0 compared with the native test`; - change: 7 of 7, with `20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test`; - the validation layer is inserted in both logs, neither has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` line. **Previous head `cb3e417e4e`** (`main` `88e804b0a7`): request 52, disk cache 52, spec constant 8239. The same 7 tests passed on both sides, with no `VUID-`. **Previous head `e8871dc8c6`: `main` `21a556f567` merged in, disk cache format 51.** #12561 merged with disk cache format 50 and a new `ImageResource` field (`adjustedSample`). Git merged the previous head onto `main` without a conflict, because both sides changed 45 to 46 and 49 to 50, but the merged tree stopped at `fieldCount<ImageResource>() == 46` (found by @jotitadev; the Windows build here failed the same way). This head merges `main` into the branch, with no conflict, and the last commit sets the field count to 47 and the disk cache format to 51, so caches written by `main` at 50 are not read with this layout. The request format stays 50: `main` is still at 49. The tree is the same as the three commits rebased onto `21a556f567`. macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Support branch, not `main`: [`support/macos-boot-1030b`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1030b) (`d90dad6690`) = the support branch described below merged with `main` `21a556f567`, the `DirectMemory.cpp` conflict with `main`'s Emscripten branches resolved, plus one local line that keeps its unsupported-host `#else` after that merge. Change: [`support/macos-boot-1030b-pr11551`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1030b-pr11551) (`967890c4e0`) = that branch + this head. The same 7 focused tests and environment as below: base 7 of 7 (`12 cases, 0 compared with the native test`), change 7 of 7 (`20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test`). The loader adds `VK_LAYER_KHRONOS_validation` from `VK_INSTANCE_LAYERS` in both logs, neither has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` line. **Previous head `cce9f5c317`.** Stray (PPSA02100) on macOS loads a level with a pixel program whose shader data fills its 128-byte push range, so the previous head threw `the depth bounds test in the pixel program requires two unused push constant dwords` there. The third commit moves the shader data to its storage buffer in that case (above); `MatchesPreparedShader` uses the same rule. `agc_driver_graphics` gains the case with and without stencil replay, the prepared-artifact match and a range that is still too small: it fails on the previous head with that message and passes on this one. On the same support branch as below, now [`support/macos-boot-1030-pr11551`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1030-pr11551) (`f37b423626`, the support branch + the three commits), the same 7 focused tests pass with the validation layer loaded and no `VUID-`. With this commit Stray gets past the level load into gameplay on a bench tree (that support branch + this PR + #9356), where the previous head stopped. **Head `47e4256594`, rebased onto `main` `98ddd9c179`.** `main` still uses request format 49 and disk cache format 49, so this PR keeps request 50 and disk cache 50 (the next free ones; whichever of the open claims lands second takes the next number). The conflicts came from #11684, which turned the single color target merge into `targetMerges` with blend state. Resolved by keeping all of `main`'s merge and blend fields, key hashes, emitter helpers and tests and adding the depth bounds parts next to them: - `DrawLookup.cpp` and `DrawRegisterKey.cpp`: both draw keys hash and compare every `targetMerges` entry as on `main`, then `depthBoundsDiscard`; - `Recompiler.cpp`: the variant key mixes `main`'s merges and then the depth bounds flag and T#; `mergeTargetImage` returns `main`'s merge path unchanged and handles the depth bounds image first, in its own branch; - `ShaderInfoCollector.cpp`: `AddTargetMerge` for `main`'s `merges`, then `AddDepthBoundsSource`; - `SpirvModuleEmitter.cpp`: `main`'s blend helpers and the depth bounds prologue helpers both kept; - `ShaderMemory.cpp`: `main`'s blend and two-target serialization checks kept; the version 43 replay fixture still strips the 40 merge bytes and this PR's 33 depth bounds bytes. The version 49 depth export clamp and version 48 barycentric replay checks are unchanged. `ShaderStageInputInfo` keeps `main`'s merge fields and adds `depthBoundsDiscard`. The Linux-only size checks stay at 296 and 560 (`main`'s 288 and 552 plus 8): measured on macOS with libc++, `CompiledShaderArtifact` goes 288 to 296 and `RecompileResult` 616 to 624 with this PR. The only change besides the conflict resolution is one more refusal in the debt entry: a pixel program that has both a color target merge and the depth bounds image throws (`the depth bounds source image cannot join the prepared images`), as it did with the single merge before. With #10351 (head `760860ecc4`) the only conflict is one line in `Recompiler.cpp`: #10351's `stencilMode` lines stay, and `bindingAllocator.Allocate` takes this PR's `depthBounds` argument after its `stencilReplay`. #10351 also takes disk cache format 50, which `main` now uses too (pointed out on #10351); in the agreed order it takes 51 and this PR moves to 52. macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. Support branch, not `main`: fork branch [`support/macos-boot-1030`](https://github.com/imellag/AnyPS5/commits/support/macos-boot-1030) (`6747733e89`) = `main` `98ddd9c179` + only the open macOS PRs #11447 #11554 #10552 #7631 #7804 #4630 and #13220 (the duplicate `write_watch` test registration that stops `main`'s CMake on macOS), plus one local line that reads `environ` through `_NSGetEnviron()` in `HostReportSources.cpp` (`main` doesn't compile it on macOS; no open PR covers it yet). The conflicts of #11554, #10552, #7631, #7804 and #4630 with `main` are resolved in the merge commits. Change: that branch + the two commits of this PR (`eca8ce338a`, now replaced on the fork by the three-commit branch above). The tests ran on `7290fdb49d`, which differs from it only by the debt entry line above. With `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer`, `ctest -R '^(request_serializer|agc_shader_memory|agc_shader_disk_cache|agc_driver_depth_bounds_state|agc_driver_depth_bounds_emulation_draw|agc_driver_graphics|agc_driver_pixel_barycentric_emulation)$' -V`: - base: 6 of 7 pass; `agc_driver_graphics` failed at `two ranges under a budget for two were not imported`. `agc_driver_depth_bounds_emulation_draw` passes with `12 cases, 0 compared with the native test`; - change: 7 of 7 pass; `agc_driver_depth_bounds_emulation_draw` passes with `20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test`; - `agc_driver_graphics` 3 more runs on each: base 3 of 3 pass, change 2 of 3 (the failed run stops at the same `two ranges under a budget for two were not imported`). So 3 of 4 on each side; the message comes from the host import budget test, outside this PR's paths; - in every log the loader lists `VK_LAYER_KHRONOS_validation` as enabled by `VK_INSTANCE_LAYERS`, there is no `was not found but was requested by env var VK_INSTANCE_LAYERS`, and no `VUID-` line. Logs attached. **Previous head `5a15547d39`, rebased onto `main` `750cf6cf48`.** Request format 50 and disk cache format 50 after `main` took 49 for both. On support branch `support/macos-boot-1028` (`eca446163e`) and `support/macos-boot-1028-pr11551` (`4e4aade74a`), the same 7 tests passed on both, no `VUID-`; `agc_driver_graphics` failed once in the first change run at the same `two ranges under a budget for two were not imported` and passed in the 3 runs after. **Previous head `39d5e816b1`, rebased onto `main` `e0cd1259a9` after #9193 merged with request format 48.** This PR now uses request format 49 and keeps #9193's barycentric flag at the end of the request; the disk cache format stays 49. On macOS (`main` `e0cd1259a9` with the open macOS boot PRs), `request_serializer`, `agc_shader_memory`, `agc_shader_disk_cache`, `agc_driver_depth_bounds_state`, `agc_driver_depth_bounds_emulation_draw`, `agc_driver_graphics` and #9193's `agc_driver_pixel_barycentric_emulation` pass with the validation layer loaded and no `VUID-` lines. **Previous head `b7acb0da81`, rebased onto `main` `fe2b52c7e4`.** `main` meanwhile took request format 47 (#10515) and disk cache format 48 (#8077, which also adds a field to `CompiledShaderArtifact` and `RecompileResult`). So this PR now uses request format 48 and disk cache format 49, and the Linux-only size checks in `ShaderDiskCache.cpp` are 296 and 560: `main`'s 288 and 552 plus this PR's 8 bytes. @jotitadev found the missing size update on the previous head. macOS doesn't compile those checks, so I checked the difference there: both structs grow by 8 bytes. On macOS, on current `main` with the macOS PRs listed below merged in, `request_serializer`, `agc_shader_memory`, `agc_shader_disk_cache`, `agc_driver_depth_bounds_state` and `agc_driver_depth_bounds_emulation_draw` (`20 cases, 12 by a depth test, all in the pixel program`) pass at this head with the validation layer loaded and no `VUID-` lines. **Linux** (@jotitadev, previous head `1e2ff2603` on `main` `cb45ae2dd` with the size checks fixed, Ubuntu 26.04, GCC 15.2): the focused tests pass 3 of 3 on an NVIDIA RTX 3070 and on lavapipe, and `agc_driver_depth_bounds_emulation_draw` compares all 20 cases with the native depth bounds test on both. `^agc` gives no new failures on either device. The runs below are on the first head: **macOS** (Apple M4 Pro, macOS 27.0.1, MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0, x86-64 Release under Rosetta 2). `main` does not build and run on macOS, so this ran on `main` `035ac96edd` + #10366 #10552 #7631 #7804 #11249 #10669 #10540 #11447 #11047 #11048 #10876 #9263 and a local patch that loads `libvulkan.1.dylib`, without and with this commit. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, and neither log contains `was not found but was requested`: - `agc_driver_depth_bounds_emulation_draw` passes with `20 cases, 12 by a depth test, all in the pixel program`. The 8 new cases have both bounds inside `(0, 1)`, around the stored depth and one float step past it, two of them under a `GREATER_OR_EQUAL` depth test. Every case also runs through the pixel program, and the 12 one-sided ones through the depth test as well. MoltenVK has no `depthBounds`, so none was compared with the native test; on a device with the feature the test compares every case. - `request_serializer`, `agc_shader_memory`, `agc_shader_replay_requests`, `agc_shader_disk_cache`, `agc_shader_disk_cache_large_file`, `agc_driver_depth_bounds_state`, `agc_driver_stencil_replay`, `agc_driver_stencil_replay_no_gpl` and `agc_driver_quad_pixel_mask` pass, with no validation errors. - `DepthBoundsEmulationTests` in `agc_driver_graphics` pass: which draws take the pixel program, which keep the depth test and each refusal. The test binary then hangs in `RunBdaResourceTests` (`releaseParkedImports`), on the base without this commit too. - `^agc_` without `agc_driver_graphics`, 1025 tests on each side: the same results apart from 9 tests (`agc_driver_prepared_shaders_*deferred*`, `agc_driver_prepared_shaders_lazy`, `agc_driver_layered_volume_submit`, `agc_driver_linear_target_completion_points_sync_flip`). They stop with `deferred destruction found two different device resolvers` on both sides and change from run to run: in three reruns each, they failed every time on the base and failed or passed on this commit. The same 11 validation error kinds appear on both sides, all on the base. The count differences are in those tests and in `agc_driver_color1555_target`, which logs 2 or 4 between reruns on the base alone. - Not run in a title. `tools/check_conventions.py --base upstream/main` (`21a556f567`) passes. `tools/pr_overlap.py` finds no shared exports and none of the overlapping pull requests implements the depth bounds test. Its conflicting lines are the format version lines that many open pull requests raise (disk cache format in `ShaderDiskCache.hpp`, request format in `RequestSerializer.cpp` and the serializer tests: #10359, #10846, #11483, #12662, #12980 and others), the size checks (#9852, #12250: B-Howell proposed this PR first, then #12250 keeps its guard around the new numbers), the `stencilReplay` line of #10351 (above), and #9508 in `Draw.cpp` and `ShaderResources.cpp`. Whichever lands second takes the next format number. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #10351 (agreed order #10351 → this PR for the disk cache format; whichever lands second takes the next number) - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: Apple M4 Pro, MoltenVK 1.4.2, macOS 27.2; by @domx4q: NVIDIA GeForce RTX 4090 (620.70.06), Arch Linux, on `275b14edd9` (20 cases compared with the native depth bounds test); by @jotitadev: lavapipe (Mesa 26.0.3), Ubuntu 26.04, on `cce9f5c317` with the field count and disk cache format changed to 47 and 51 as in this head, and NVIDIA GeForce RTX 3070 (595.99.02) on an earlier head (`1e2ff2603`); by @bunbeans2-arch on `cce9f5c317`: AMD Radeon RX 9070 XT (amdvlk), Windows 11 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-26 18:47:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T18:47:57Z.

Review: CHANGES_REQUESTED


The reported functional and platform evidence is unusually thorough, and the new guard/refusal cases plus cache/serializer updates are well covered. One repository merge-order requirement remains unresolved: this PR explicitly says it shares the Recompiler.cpp stencil-replay hunk and disk-cache version with still-open #10351, and that whichever lands second must advance the format to 49. CONTRIBUTING.md requires authors to agree on the order for overlapping PRs and declare it with Depends on; this checklist currently says none. Please coordinate with #10351’s author, record which PR goes first in the dependency field, and keep the second format bump in the merge/rebase plan before approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5657309039 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5657309039). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T18:47:57Z. **Review:** CHANGES_REQUESTED --- The reported functional and platform evidence is unusually thorough, and the new guard/refusal cases plus cache/serializer updates are well covered. One repository merge-order requirement remains unresolved: this PR explicitly says it shares the `Recompiler.cpp` stencil-replay hunk and disk-cache version with still-open #10351, and that whichever lands second must advance the format to 49. `CONTRIBUTING.md` requires authors to agree on the order for overlapping PRs and declare it with `Depends on`; this checklist currently says `none`. Please coordinate with #10351’s author, record which PR goes first in the dependency field, and keep the second format bump in the merge/rebase plan before approval.
jotitadev commented 2026-10-27 03:54:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T03:54:46Z.

Review: COMMENTED


Linux run of head 1e2ff2603: the build breaks on Linux/GCC, and with that fixed the emulation matches the native depth bounds test on NVIDIA and lavapipe.

Linux build

Merged onto main cb45ae2dd (no conflicts), the shader recompiler stops compiling:

core/shader/recompiler/ShaderDiskCache.cpp:88:46: error: static assertion failed: CompiledShaderArtifact changed: update the artifact encoder
note: the comparison reduces to '(288 == 280)'
core/shader/recompiler/ShaderDiskCache.cpp:90:39: error: static assertion failed: RecompileResult changed: update EncodeResult and DecodeResult
note: the comparison reduces to '(552 == 544)'

These size checks sit under #if defined(__linux__) && defined(__x86_64__) && defined(__GLIBCXX__), so a macOS build doesn't see them, and the linux CI job is skipped on this PR. The new CompiledShaderArtifact::depthBoundsDword adds 8 bytes to both structs. The encoder and decoder already write and read it, so only the two numbers need to change: 280 to 288 and 544 to 552. I changed them locally for the runs below.

Tested

Ubuntu 26.04, GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, device chosen with VK_ICD_FILENAMES, -j1. This PR merged onto main cb45ae2dd, plus the two static_assert sizes above.

Focused tests (agc_driver_depth_bounds_emulation_draw, agc_driver_depth_bounds_state, agc_driver_graphics, agc_shader_disk_cache), --repeat until-fail:3: all pass 3/3 on both devices. The draw test forces context.depthBounds = false, so it takes the new pixel-program path here too. Both devices also have the native depthBounds feature, so every case is compared against the hardware test, which MoltenVK can't do:

device agc_driver_depth_bounds_emulation_draw
NVIDIA RTX 3070 (595.99.02) 20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test
lavapipe (Mesa 26.0.3, LLVM 21.1.8) 20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test

ctest -R "^agc" without display/flip/lds_atomics64, --timeout 30:

NVIDIA RTX 3070 lavapipe
main cb45ae2dd 1029/1030 1028/1030
this PR (+ size fix) 1030/1030 1029/1030

No new failures. On main, NVIDIA's only failure is agc_driver_sgpr_pattern_fill_keys, which passed on the later runs, so it looks flaky here. lavapipe's are agc_driver_multisample_retirement, which fails on main and with this PR, and a single agc_driver_pipeline_journal timeout on main.

I didn't run a negative control. The updated draw test uses the new depthBoundsDiscard fields, so it doesn't build against main's sources.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5662027725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5662027725). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T03:54:46Z. **Review:** COMMENTED --- Linux run of head `1e2ff2603`: the build breaks on Linux/GCC, and with that fixed the emulation matches the native depth bounds test on NVIDIA and lavapipe. ### Linux build Merged onto `main` `cb45ae2dd` (no conflicts), the shader recompiler stops compiling: ``` core/shader/recompiler/ShaderDiskCache.cpp:88:46: error: static assertion failed: CompiledShaderArtifact changed: update the artifact encoder note: the comparison reduces to '(288 == 280)' core/shader/recompiler/ShaderDiskCache.cpp:90:39: error: static assertion failed: RecompileResult changed: update EncodeResult and DecodeResult note: the comparison reduces to '(552 == 544)' ``` These size checks sit under `#if defined(__linux__) && defined(__x86_64__) && defined(__GLIBCXX__)`, so a macOS build doesn't see them, and the `linux` CI job is skipped on this PR. The new `CompiledShaderArtifact::depthBoundsDword` adds 8 bytes to both structs. The encoder and decoder already write and read it, so only the two numbers need to change: `280` to `288` and `544` to `552`. I changed them locally for the runs below. ### Tested Ubuntu 26.04, GCC 15.2.0, Release, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`, device chosen with `VK_ICD_FILENAMES`, `-j1`. This PR merged onto `main` `cb45ae2dd`, plus the two `static_assert` sizes above. Focused tests (`agc_driver_depth_bounds_emulation_draw`, `agc_driver_depth_bounds_state`, `agc_driver_graphics`, `agc_shader_disk_cache`), `--repeat until-fail:3`: all pass 3/3 on both devices. The draw test forces `context.depthBounds = false`, so it takes the new pixel-program path here too. Both devices also have the native `depthBounds` feature, so every case is compared against the hardware test, which MoltenVK can't do: | device | `agc_driver_depth_bounds_emulation_draw` | |---|---| | NVIDIA RTX 3070 (595.99.02) | `20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test` | | lavapipe (Mesa 26.0.3, LLVM 21.1.8) | `20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test` | `ctest -R "^agc"` without display/flip/`lds_atomics64`, `--timeout 30`: | | NVIDIA RTX 3070 | lavapipe | |---|---|---| | `main` `cb45ae2dd` | 1029/1030 | 1028/1030 | | this PR (+ size fix) | 1030/1030 | 1029/1030 | No new failures. On `main`, NVIDIA's only failure is `agc_driver_sgpr_pattern_fill_keys`, which passed on the later runs, so it looks flaky here. lavapipe's are `agc_driver_multisample_retirement`, which fails on `main` and with this PR, and a single `agc_driver_pipeline_journal` timeout on `main`. I didn't run a negative control. The updated draw test uses the new `depthBoundsDiscard` fields, so it doesn't build against `main`'s sources. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
jotitadev commented 2026-10-27 10:27:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T10:27:56Z.

Review: COMMENTED


@imellag Linux rebuild of head b7acb0da81: it compiles on GCC with the new sizes, and the results match the previous head.

Machine: Ubuntu 26.04, GCC 15.2, Release, ninja of all plus every *_tests target. Head merged onto current main 801d5b9bc with no conflicts.

  • Build: clean. The Linux-only checks in ShaderDiskCache.cpp hold at sizeof(CompiledShaderArtifact) == 296 and sizeof(RecompileResult) == 560, and fieldCount<ImageResource>() == 45 holds. PipelineJournal.cpp (State 912) compiles unchanged. public_headers passes 65 of 65.
  • Focused tests, 3 runs each, with the Khronos validation layer (1.4.341) loaded, ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. The 11 tests are request_serializer, agc_shader_memory, agc_shader_replay_requests, agc_shader_disk_cache, agc_shader_disk_cache_large_file, agc_driver_depth_bounds_state, agc_driver_depth_bounds_emulation_draw, agc_driver_stencil_replay, agc_driver_stencil_replay_no_gpl, agc_driver_quad_pixel_mask and agc_driver_graphics.
    • NVIDIA RTX 3070 (595.99.02): 33 of 33 pass, with no VUID- lines.
    • lavapipe (Mesa 26.0.3): 33 of 33 pass, with no VUID- lines.
    • On both devices, agc_driver_depth_bounds_emulation_draw reports 20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test.
  • Control: the new tests use depthBoundsDiscard and DepthBoundsSourceWords, so they don't build on main. To check that the draw test catches a broken prologue, I made the prologue drop only the Zs > max side. The test then fails on both devices with stored 0.25, upper bound one step below it (emulated in the pixel program): 2048 of 2048 pixels passed, expected none.
  • ^agc on lavapipe (without display, flip and lds_atomics64): 1053 of 1054 pass. The one failure, agc_driver_multisample_retirement, also fails on main on this machine.

On the format order: #11507 at b9f4f6590 also moves the disk cache to 49 and also adds an ImageResource field (fieldCount 45). So whichever of the two lands second needs fieldCount<ImageResource>() == 46 as well as the next format number. That fits the #11507 → #10351 → this PR order you agreed on.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5665584030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5665584030). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T10:27:56Z. **Review:** COMMENTED --- @imellag Linux rebuild of head `b7acb0da81`: it compiles on GCC with the new sizes, and the results match the previous head. Machine: Ubuntu 26.04, GCC 15.2, Release, `ninja` of `all` plus every `*_tests` target. Head merged onto current `main` `801d5b9bc` with no conflicts. - **Build:** clean. The Linux-only checks in `ShaderDiskCache.cpp` hold at `sizeof(CompiledShaderArtifact) == 296` and `sizeof(RecompileResult) == 560`, and `fieldCount<ImageResource>() == 45` holds. `PipelineJournal.cpp` (`State` 912) compiles unchanged. `public_headers` passes 65 of 65. - **Focused tests, 3 runs each,** with the Khronos validation layer (1.4.341) loaded, `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. The 11 tests are `request_serializer`, `agc_shader_memory`, `agc_shader_replay_requests`, `agc_shader_disk_cache`, `agc_shader_disk_cache_large_file`, `agc_driver_depth_bounds_state`, `agc_driver_depth_bounds_emulation_draw`, `agc_driver_stencil_replay`, `agc_driver_stencil_replay_no_gpl`, `agc_driver_quad_pixel_mask` and `agc_driver_graphics`. - NVIDIA RTX 3070 (595.99.02): 33 of 33 pass, with no `VUID-` lines. - lavapipe (Mesa 26.0.3): 33 of 33 pass, with no `VUID-` lines. - On both devices, `agc_driver_depth_bounds_emulation_draw` reports `20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test`. - **Control:** the new tests use `depthBoundsDiscard` and `DepthBoundsSourceWords`, so they don't build on `main`. To check that the draw test catches a broken prologue, I made the prologue drop only the `Zs > max` side. The test then fails on both devices with `stored 0.25, upper bound one step below it (emulated in the pixel program): 2048 of 2048 pixels passed, expected none`. - **`^agc` on lavapipe** (without display, flip and `lds_atomics64`): 1053 of 1054 pass. The one failure, `agc_driver_multisample_retirement`, also fails on `main` on this machine. On the format order: #11507 at `b9f4f6590` also moves the disk cache to 49 and also adds an `ImageResource` field (`fieldCount` 45). So whichever of the two lands second needs `fieldCount<ImageResource>() == 46` as well as the next format number. That fits the #11507 → #10351 → this PR order you agreed on. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-29 07:52:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T07:52:58Z.

Review: CHANGES_REQUESTED


Re-review — changes requested

The earlier overlap sequence is now clear: #11507 merged first, and #10351 remains the declared prerequisite. The current branch still needs integration with today's main before its GPU evidence can support approval.

What I checked

  • Reviewed exact head 5a15547d3950be8f804f0d973edaf1a7b8ab491f against current main 4c7d275bef89d309313d16bc2bc05d37a1b50be2.
  • Confirmed #11507 is merged and #10351 remains open; the checklist's direct Depends on: #10351 is consistent with the accepted order.
  • The merge preview currently conflicts in DrawLookup.cpp, ShaderMemory.cpp, ShaderStageInputInfo.hpp, Recompiler.cpp, and SpirvModuleEmitter.cpp.
  • The author addressed the earlier reviewer request by removing the three new refusals for valid multisampled targets, depth writes, and back-face stencil writes. The normalized-depth refusal predates this PR.
  • git diff --check is clean and tools/check_conventions.py passes against current main.
  • I found no maintainer design review in the current review history.

Required before approval

Please rebase or otherwise integrate current main, resolve the five conflicts, preserve #11507's merged serialization change and #10351's stencil-replay changes, and keep the cache/request format consistent with that stack. Then rerun the focused Vulkan tests on the same GPU for current main and the integrated change with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Include the logs showing the layer loaded and confirm the change adds no VUID- errors.

The existing paired GPU reports and negative controls are useful, but they predate the current main changes in the same recompiler, draw, shader-resource, test, and debt paths.

Not verified

I did not run a local build or Vulkan test: this workspace exposes no Vulkan device. I did not run Astro or another title.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694429658 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5694429658). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T07:52:58Z. **Review:** CHANGES_REQUESTED --- # Re-review — changes requested The earlier overlap sequence is now clear: #11507 merged first, and #10351 remains the declared prerequisite. The current branch still needs integration with today's `main` before its GPU evidence can support approval. ## What I checked - Reviewed exact head `5a15547d3950be8f804f0d973edaf1a7b8ab491f` against current `main` `4c7d275bef89d309313d16bc2bc05d37a1b50be2`. - Confirmed #11507 is merged and #10351 remains open; the checklist's direct `Depends on: #10351` is consistent with the accepted order. - The merge preview currently conflicts in `DrawLookup.cpp`, `ShaderMemory.cpp`, `ShaderStageInputInfo.hpp`, `Recompiler.cpp`, and `SpirvModuleEmitter.cpp`. - The author addressed the earlier reviewer request by removing the three new refusals for valid multisampled targets, depth writes, and back-face stencil writes. The normalized-depth refusal predates this PR. - `git diff --check` is clean and `tools/check_conventions.py` passes against current `main`. - I found no maintainer design review in the current review history. ## Required before approval Please rebase or otherwise integrate current `main`, resolve the five conflicts, preserve #11507's merged serialization change and #10351's stencil-replay changes, and keep the cache/request format consistent with that stack. Then rerun the focused Vulkan tests on the same GPU for current `main` and the integrated change with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. Include the logs showing the layer loaded and confirm the change adds no `VUID-` errors. The existing paired GPU reports and negative controls are useful, but they predate the current main changes in the same recompiler, draw, shader-resource, test, and debt paths. ## Not verified I did not run a local build or Vulkan test: this workspace exposes no Vulkan device. I did not run Astro or another title.
jotitadev commented 2026-10-30 14:51:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T14:51:20Z.

Review: COMMENTED


@imellag the merge skew I mentioned last time has happened, with a different PR: #12561 (merged today at 09:56 UTC) also adds an ImageResource field (adjustedSample) and also moves the disk cache to format 50. Merged onto current main (82ddc5a9e0), head cce9f5c31 stops compiling on Linux/GCC:

core/shader/recompiler/ShaderDiskCache.cpp:144:43: error: static assertion failed: ImageResource changed: update the info encoder
note: the comparison reduces to '(47 == 46)'

Git merges it without a conflict, because both sides change 45 to 46 and 49 to 50 the same way. The NVIDIA CI runs merge onto 98ddd9c, from before #12561, so they don't show it. Both fields end up in the encoder after the merge, so the checks only need the numbers: fieldCount<ImageResource>() == 47, and a disk cache format other than main's 50. Otherwise caches written by main at 50 would be read with this layout.

With those two numbers changed locally (47, and 51), on Linux (Ubuntu 26.04, GCC 15.2, Release): the same 11 focused tests as before pass 3/3 on lavapipe (Mesa 26.0.3), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. agc_driver_depth_bounds_emulation_draw still reports 20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test.

GPUs tested: lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5714051726 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5714051726). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T14:51:20Z. **Review:** COMMENTED --- @imellag the merge skew I mentioned last time has happened, with a different PR: #12561 (merged today at 09:56 UTC) also adds an `ImageResource` field (`adjustedSample`) and also moves the disk cache to format 50. Merged onto current `main` (`82ddc5a9e0`), head `cce9f5c31` stops compiling on Linux/GCC: ``` core/shader/recompiler/ShaderDiskCache.cpp:144:43: error: static assertion failed: ImageResource changed: update the info encoder note: the comparison reduces to '(47 == 46)' ``` Git merges it without a conflict, because both sides change `45` to `46` and `49` to `50` the same way. The NVIDIA CI runs merge onto `98ddd9c`, from before #12561, so they don't show it. Both fields end up in the encoder after the merge, so the checks only need the numbers: `fieldCount<ImageResource>() == 47`, and a disk cache format other than `main`'s 50. Otherwise caches written by `main` at 50 would be read with this layout. With those two numbers changed locally (47, and 51), on Linux (Ubuntu 26.04, GCC 15.2, Release): the same 11 focused tests as before pass 3/3 on lavapipe (Mesa 26.0.3), with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`. `agc_driver_depth_bounds_emulation_draw` still reports `20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test`. GPUs tested: lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
jotitadev commented 2026-10-30 22:46:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T22:46:50Z.

Review: COMMENTED


Follow-up on the fieldCount<ImageResource> skew: fixed in e8871dc8c6.

Head e8871dc8c6 merged onto current main (7fcab08f71, still at disk cache format 50), Linux (Ubuntu 26.04, GCC 15.2, Release):

  • Full build plus all agc*_tests: compiles, no errors.
  • Control: with only the assert put back to == 46, ShaderDiskCache.cpp:144 fails again with (47 == 46). So the check is live and the new number is the right one.
  • The same 11 focused tests as before pass 3/3 on lavapipe, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and the Khronos validation layer 1.4.341 loaded: 0 VUID-. agc_driver_depth_bounds_emulation_draw still reports 20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test.

GPUs tested: lavapipe (Mesa 26.0.3), Ubuntu 26.04

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719488955 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5719488955). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T22:46:50Z. **Review:** COMMENTED --- Follow-up on the `fieldCount<ImageResource>` skew: fixed in `e8871dc8c6`. Head `e8871dc8c6` merged onto current `main` (`7fcab08f71`, still at disk cache format 50), Linux (Ubuntu 26.04, GCC 15.2, Release): - Full build plus all `agc*_tests`: compiles, no errors. - Control: with only the assert put back to `== 46`, `ShaderDiskCache.cpp:144` fails again with `(47 == 46)`. So the check is live and the new number is the right one. - The same 11 focused tests as before pass 3/3 on lavapipe, with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1` and the Khronos validation layer 1.4.341 loaded: 0 `VUID-`. `agc_driver_depth_bounds_emulation_draw` still reports `20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test`. GPUs tested: lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-30 22:51:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T22:51:02Z.

Review: APPROVED


Re-checked — new head, looks good

The updated head integrates the current base, fixes the cache field-count skew, and has focused depth-bounds evidence plus successful Windows checks; the declared #10351 dependency remains in place.

What I ran

Reviewed head e8871dc8c64afe57d128cf037ff9c27cc5914678 against PR base 21a556f567abd916c0cea306347866a6cd45aac6. The stack check's preview against current main d2863131efb0e41c116e4197841b6a3086ce087a was clean. Environment: Linux x86-64, Python 3.11.2; no local build or CTest was run.

python3 /marc/AnyPS5/tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11551
git -C /marc/AnyPS5 diff --check 21a556f567abd916c0cea306347866a6cd45aac6...refs/review/pr-11551-current
git -C /marc/AnyPS5 merge-tree --write-tree upstream/main refs/review/pr-11551-current
git -C /marc/AnyPS5 grep -n -E 'DepthBoundsEmulationDraw|tests/execution' refs/review/pr-11551-current -- core/libs/prx/libSceAgcDriver/CMakeLists.txt
gh pr checks 11551 --repo boykopovar/AnyPS5

Results

Check Result
Diff, conventions, test registration Passed. CMake's tests/execution/*.cpp glob includes the new/updated depth-bounds execution test.
Merge preview Clean against current main; preview tree 33b5b93515405123229f8b86997ed7c8aea8c610.
Hosted Windows Passed. It linked the changed host-only tests and built/ran changed guest tests; the broader selected-test CTest and full libs build steps were skipped.
Other hosted checks Ubuntu and Windows relinker, relinker ASan, conventions, eligibility, portability, labels, and report passed. Linux product tests were skipped; two macOS relinker jobs remained pending.
Author-reported exact-head GPU tests The author reports 7 focused tests passing on a support branch whose merge commit 967890c4e039b4b5ab6dcc5b1717c55022b8691e has this exact PR head as a parent, with the Khronos validation layer loaded and no VUID- lines. This is author-provided evidence, not a run I reproduced. The depth-bounds execution test reports 20 cases on the change and 12 on the base.
PR precheck Diff, conventions/template, and dependency/mergeability checks passed. The isolated checkout lacked the workspace-only ABI and test-quality helper scripts, so those two checks were unavailable.
Unedited output from refreshed checks

Merge preview:

33b5b93515405123229f8b86997ed7c8aea8c610

Hosted checks:

linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299667171
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299665809
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299667150
labels	pass	8s	https://github.com/boykopovar/AnyPS5/actions/runs/41124808835/job/124301982642
relinker (ubuntu-latest, g++)	pass	3m32s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663559
relinker (windows-latest, g++)	pass	10m6s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663667
relinker-asan	pass	2m46s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663447
windows	pass	15m26s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663476
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663585
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663600
conventions	pass	18s	https://github.com/boykopovar/AnyPS5/actions/runs/41124808845/job/124300334834
eligibility	pass	7s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124298367743
library-portability	pass	1m48s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206235/job/124298366839
report	pass	1m1s	https://github.com/boykopovar/AnyPS5/actions/runs/41124206231/job/124298367272

Findings

Blocking

No blocking source defect found in this head.

Non-blocking

Depends on: #10351 remains declared. Keep the documented landing order; after #10351 lands, update the cache-format version for the integrated layout and rerun the focused serializer/depth-bounds tests on that final head.

Sources

Not verified

I did not run a local build, CTest, macOS runtime, or console test. The author's focused GPU test and negative-control report was not independently reproduced. Two hosted macOS relinker jobs were still pending.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5719517381 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5719517381). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T22:51:02Z. **Review:** APPROVED --- # Re-checked — new head, looks good The updated head integrates the current base, fixes the cache field-count skew, and has focused depth-bounds evidence plus successful Windows checks; the declared #10351 dependency remains in place. ## What I ran Reviewed head `e8871dc8c64afe57d128cf037ff9c27cc5914678` against PR base `21a556f567abd916c0cea306347866a6cd45aac6`. The stack check's preview against current `main` `d2863131efb0e41c116e4197841b6a3086ce087a` was clean. Environment: Linux x86-64, Python 3.11.2; no local build or CTest was run. ```sh python3 /marc/AnyPS5/tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 11551 git -C /marc/AnyPS5 diff --check 21a556f567abd916c0cea306347866a6cd45aac6...refs/review/pr-11551-current git -C /marc/AnyPS5 merge-tree --write-tree upstream/main refs/review/pr-11551-current git -C /marc/AnyPS5 grep -n -E 'DepthBoundsEmulationDraw|tests/execution' refs/review/pr-11551-current -- core/libs/prx/libSceAgcDriver/CMakeLists.txt gh pr checks 11551 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff, conventions, test registration | Passed. CMake's `tests/execution/*.cpp` glob includes the new/updated depth-bounds execution test. | | Merge preview | Clean against current `main`; preview tree `33b5b93515405123229f8b86997ed7c8aea8c610`. | | Hosted Windows | Passed. It linked the changed host-only tests and built/ran changed guest tests; the broader selected-test CTest and full `libs` build steps were skipped. | | Other hosted checks | Ubuntu and Windows relinker, relinker ASan, conventions, eligibility, portability, labels, and report passed. Linux product tests were skipped; two macOS relinker jobs remained pending. | | Author-reported exact-head GPU tests | The author reports 7 focused tests passing on a support branch whose merge commit `967890c4e039b4b5ab6dcc5b1717c55022b8691e` has this exact PR head as a parent, with the Khronos validation layer loaded and no `VUID-` lines. This is author-provided evidence, not a run I reproduced. The depth-bounds execution test reports 20 cases on the change and 12 on the base. | | PR precheck | Diff, conventions/template, and dependency/mergeability checks passed. The isolated checkout lacked the workspace-only ABI and test-quality helper scripts, so those two checks were unavailable. | <details> <summary>Unedited output from refreshed checks</summary> Merge preview: ```text 33b5b93515405123229f8b86997ed7c8aea8c610 ``` Hosted checks: ```text linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299667171 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299665809 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299667150 labels pass 8s https://github.com/boykopovar/AnyPS5/actions/runs/41124808835/job/124301982642 relinker (ubuntu-latest, g++) pass 3m32s https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663559 relinker (windows-latest, g++) pass 10m6s https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663667 relinker-asan pass 2m46s https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663447 windows pass 15m26s https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663476 relinker (macos-latest, clang++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663585 relinker (macos-latest, clang++, x86_64) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124299663600 conventions pass 18s https://github.com/boykopovar/AnyPS5/actions/runs/41124808845/job/124300334834 eligibility pass 7s https://github.com/boykopovar/AnyPS5/actions/runs/41124206304/job/124298367743 library-portability pass 1m48s https://github.com/boykopovar/AnyPS5/actions/runs/41124206235/job/124298366839 report pass 1m1s https://github.com/boykopovar/AnyPS5/actions/runs/41124206231/job/124298367272 ``` </details> ## Findings ### Blocking No blocking source defect found in this head. ### Non-blocking `Depends on: #10351` remains declared. Keep the documented landing order; after #10351 lands, update the cache-format version for the integrated layout and rerun the focused serializer/depth-bounds tests on that final head. ## Sources - [Depth-bounds emulation test at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/e8871dc8c64afe57d128cf037ff9c27cc5914678/core/libs/prx/libSceAgcDriver/tests/execution/DepthBoundsEmulationDraw.cpp) - [Shader disk-cache version at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/e8871dc8c64afe57d128cf037ff9c27cc5914678/core/shader/recompiler/ShaderDiskCache.hpp) - [Declared dependency and landing order](https://github.com/boykopovar/AnyPS5/pull/11551) ## Not verified I did not run a local build, CTest, macOS runtime, or console test. The author's focused GPU test and negative-control report was not independently reproduced. Two hosted macOS relinker jobs were still pending.
XairRrR commented 2026-11-03 14:31:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T14:31:29Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

This pull request does not merge cleanly into main (4f41f4c375): head b2cf782aa4 conflicts in

  • core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
  • core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
  • core/shader/recompiler/ShaderDiskCache.hpp
  • core/shader/recompiler/tests/RequestSerializerTests.cpp

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5753957823 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5753957823). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T14:31:29Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (4f41f4c375f5abb487dbd184fbc150f31994d762): head b2cf782aa4005cf0667b6819095a55ab3c96f773 conflicts in - `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` - `core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp` - `core/shader/recompiler/ShaderDiskCache.hpp` - `core/shader/recompiler/tests/RequestSerializerTests.cpp` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=2083 head=b2cf782aa4005cf0667b6819095a55ab3c96f773 -->
MarcZX10 commented 2026-11-14 07:11:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T07:11:35Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the new path is guarded by format, sample-count, depth-write, and stencil-write checks, and its pixel-program comparison is covered by the added draw cases.

What I ran

Reviewed head fb1d6f40a3038e97e4c97c6dbd5955b9c7cb7996 against the supplied diff; did not run commands or tests.

Results

Check Result Note
Source review passed Read changed implementation and relevant callers
Tests not run Author-reported results were not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not read every changed line. Graphics/src/ShaderResources.cpp, tests/Graphics.cpp, and tests/ShaderMemory.cpp were only read at the relevant changed ranges; other changes in those files and remaining added lines in other files were not reviewed. Other changed files are listed in the review manifest. The author reports focused tests and convention checks passed, but these were not run during this review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5902532939 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5902532939). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T07:11:35Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the new path is guarded by format, sample-count, depth-write, and stencil-write checks, and its pixel-program comparison is covered by the added draw cases. ## What I ran Reviewed head `fb1d6f40a3038e97e4c97c6dbd5955b9c7cb7996` against the supplied diff; did not run commands or tests. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Read changed implementation and relevant callers | | Tests | not run | Author-reported results were not independently verified | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Did not read every changed line. `Graphics/src/ShaderResources.cpp`, `tests/Graphics.cpp`, and `tests/ShaderMemory.cpp` were only read at the relevant changed ranges; other changes in those files and remaining added lines in other files were not reviewed. Other changed files are listed in the review manifest. The author reports focused tests and convention checks passed, but these were not run during this review. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-15 00:16:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T00:16:46Z.

Review: COMMENTED


Reviewed — no blocking findings

The change emulates depth bounds in the pixel program for eligible draws when the device lacks native support, fetching stored depth and discarding out-of-range fragments. It adds the required draw and shader data plumbing, cache and serialization updates, and execution coverage.

What I ran

No commands were run. The review read 32 of 32 changed files, 354 of 354 added lines, through the repository reader at head cf35581b47f45faaa5f699a78b781fbb3b0a3b59, in 3 parts.

Results

Check Result Note
Change review passed Every added line was read.
Automated checks not run Author-reported results were not independently run.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

  • Hardware and runtime behavior: Whether the emulated depth comparison, depth fetch, demote/kill behavior, and native comparisons match on physical GPUs and MoltenVK requires runtime execution.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5908075489 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5908075489). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T00:16:46Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The change emulates depth bounds in the pixel program for eligible draws when the device lacks native support, fetching stored depth and discarding out-of-range fragments. It adds the required draw and shader data plumbing, cache and serialization updates, and execution coverage. ## What I ran No commands were run. The review read 32 of 32 changed files, 354 of 354 added lines, through the repository reader at head `cf35581b47f45faaa5f699a78b781fbb3b0a3b59`, in 3 parts. ## Results | Check | Result | Note | |---|---|---| | Change review | passed | Every added line was read. | | Automated checks | not run | Author-reported results were not independently run. | ## Findings ### Blocking None. ### Non-blocking None. ## Sources - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1520 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cpp#L111 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L2671 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp#L205 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp#L2509 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/tests/execution/DepthBoundsEmulationDraw.cpp#L175 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp#L696 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/shader/recompiler/Optimization/src/BindingAllocator.cpp#L118 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp#L1058 - https://github.com/boykopovar/AnyPS5/blob/cf35581b47f45faaa5f699a78b781fbb3b0a3b59/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1528 ## Not verified - Hardware and runtime behavior: Whether the emulated depth comparison, depth fetch, demote/kill behavior, and native comparisons match on physical GPUs and MoltenVK requires runtime execution. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-16 19:43:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T19:43:16Z.

Review: COMMENTED


Reviewed — no blocking findings

The targeted review found no verified blocking defect; a formal approval is not justified because I could not run the reported checks and three changed files were unavailable in the review folder.

What I ran

Reviewed head 275b14edd9719156b3f5d372a277a5bdcb4e79da using the prepared diff and repo_read.py for targeted changed lines and context. No tests or build commands were run. The description reports focused tests and convention checks passing on this head.

Results

Check Result Note
Changed-line review passed Targeted lines inspected
Tests and build not run Results are author-reported
Convention check not run Results are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of Graphics/src/ShaderResources.cpp, tests/Graphics.cpp, and tests/ShaderMemory.cpp was excluded from the review folder as too large. I read their relevant changed hunks in diff.patch, but did not inspect full surrounding file context. Runtime behavior beyond the author-reported test results was not verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5926366424 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5926366424). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T19:43:16Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The targeted review found no verified blocking defect; a formal approval is not justified because I could not run the reported checks and three changed files were unavailable in the review folder. ## What I ran Reviewed head `275b14edd9719156b3f5d372a277a5bdcb4e79da` using the prepared diff and `repo_read.py` for targeted changed lines and context. No tests or build commands were run. The description reports focused tests and convention checks passing on this head. ## Results | Check | Result | Note | |---|---|---| | Changed-line review | passed | Targeted lines inspected | | Tests and build | not run | Results are author-reported | | Convention check | not run | Results are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of `Graphics/src/ShaderResources.cpp`, `tests/Graphics.cpp`, and `tests/ShaderMemory.cpp` was excluded from the review folder as too large. I read their relevant changed hunks in `diff.patch`, but did not inspect full surrounding file context. Runtime behavior beyond the author-reported test results was not verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-19 13:57:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T13:57:35Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected code supports the stated depth bounds fallback; several changed files were excluded or not read, so a formal approval is not justified.

What I ran

Read the prepared review documents and targeted source ranges at head 4d93f2de0c30b64f7f5dede9d95b3f1fdd0fc07f. No tests or commands were run.

Results

Check Result Note
Targeted source review passed Inspected fallback and shader prologue call site
Tests not run No tests run during this review

Findings

Blocking

None.

Non-blocking

None.

Not verified

The review manifest lists 30 changed files. I read targeted ranges in DrawDecode.cpp, State.cpp, BindingAllocator.cpp, and SpirvModuleEmitter.cpp; I did not read every changed file. ShaderResources.cpp, Graphics.cpp, and ShaderMemory.cpp were excluded from the review folder because they were too large, and were not read. The remaining changed files and full behavior outside the inspected ranges are not verified. The description reports focused test runs, but I did not run them.

To get this to a good state

Nothing is required. Optional: complete review of the remaining changed files and run the focused checks on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5976341803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11551#pullrequestreview-5976341803). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T13:57:35Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected code supports the stated depth bounds fallback; several changed files were excluded or not read, so a formal approval is not justified. ## What I ran Read the prepared review documents and targeted source ranges at head `4d93f2de0c30b64f7f5dede9d95b3f1fdd0fc07f`. No tests or commands were run. ## Results | Check | Result | Note | |---|---|---| | Targeted source review | passed | Inspected fallback and shader prologue call site | | Tests | not run | No tests run during this review | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The review manifest lists 30 changed files. I read targeted ranges in `DrawDecode.cpp`, `State.cpp`, `BindingAllocator.cpp`, and `SpirvModuleEmitter.cpp`; I did not read every changed file. `ShaderResources.cpp`, `Graphics.cpp`, and `ShaderMemory.cpp` were excluded from the review folder because they were too large, and were not read. The remaining changed files and full behavior outside the inspected ranges are not verified. The description reports focused test runs, but I did not run them. ## To get this to a good state Nothing is required. Optional: complete review of the remaining changed files and run the focused checks on this head.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/11551:upstream-pr/11551'
git switch 'upstream-pr/11551'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/11551'
git switch 'upstream-pr/11551'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/11551'
git switch 'upstream-pr/11551'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/11551'
git switch 'main'
git merge --squash 'upstream-pr/11551'
git switch 'main'
git merge --ff-only 'upstream-pr/11551'
git switch 'main'
git merge 'upstream-pr/11551'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!11551
No description provided.