Repository navigation
feat(agc): test the depth bounds in the pixel program when the device lacks the depthBounds feature - #11551
feat(agc): test the depth bounds in the pixel program when the device lacks the depthBounds feature#11551imellag wants to merge 9 commits into
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
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.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
One additional open overlap to coordinate: #11507 also changes |
|
@imellag @Ondra97 #11507 is the other PR moving the shader disk cache format from 47 to 48 (for its new |
jotitadev
left a comment
There was a problem hiding this comment.
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.
|
@hugodearaujo @Ondra97 #11507 → #10351 → #11551 works for me: #11507 has no dependency, and this PR comes last in either order. One thing to check: |
1e2ff26 to
b7acb0d
Compare
|
@jotitadev Thanks for the Linux run, and for the comparison with the native depth bounds test on NVIDIA and lavapipe, which MoltenVK can't do. You were right about the size checks. I rebased onto Tested now also carries your results, and |
jotitadev
left a comment
There was a problem hiding this comment.
@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.cpphold atsizeof(CompiledShaderArtifact) == 296andsizeof(RecompileResult) == 560, andfieldCount<ImageResource>() == 45holds.PipelineJournal.cpp(State912) compiles unchanged.public_headerspasses 65 of 65. - Focused tests, 3 runs each, with the Khronos validation layer (1.4.341) loaded,
ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. The 11 tests arerequest_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_maskandagc_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_drawreports20 cases, 12 by a depth test, all in the pixel program, 20 compared with the native test.
- NVIDIA RTX 3070 (595.99.02): 33 of 33 pass, with no
- Control: the new tests use
depthBoundsDiscardandDepthBoundsSourceWords, so they don't build onmain. To check that the draw test catches a broken prologue, I made the prologue drop only theZs > maxside. The test then fails on both devices withstored 0.25, upper bound one step below it (emulated in the pixel program): 2048 of 2048 pixels passed, expected none. ^agcon lavapipe (without display, flip andlds_atomics64): 1053 of 1054 pass. The one failure,agc_driver_multisample_retirement, also fails onmainon 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.
|
Thanks, the depth-bounds emulation is carefully done, and the external validation runs are strong evidence. One change, please: Graphics.cpp Heads-up: since this touches draw keys, push constants and the disk/request schema, a maintainer will also weigh in on the design before merge. |
|
@oneandonlydean Done in @jotitadev Thanks for the rebuild at |
873e799 to
39d5e81
Compare
39d5e81 to
5a15547
Compare
|
@imellag Updated cache coordination: #7085 at |
|
@B-Howell I ran the Linux check you asked for. GCC 13.5.0 (the
This is a syntax-only compile of that one file, not a Linux build or test run. @Amoenus thanks, noted: #7085 has disk cache 54, after #10351's 52 and this PR's 53. The failed AI-assisted: yes |
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (4 IDs in 517 tests)Skipped (44)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Current main The agreed order remains #10351 → #11551. When composing #11551 after this head, please advance the combined disk-cache format to 54, rather than retaining this branch's current 53. Request serialization is a separate version sequence. On current main + exact #6782 + #10351, the focused Windows/RTX 4070 Ti SUPER selection is 18 passed, 2 skipped, zero failed, with all four attachment cases executed, zero VUIDs and the same validation-warning count as main. #10940 has merged and is already in that base. The combined #11551 stack was not executed. AI-assisted: yes. |
XairRrR
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
This pull request does not merge cleanly into main (4f41f4c): head b2cf782 conflicts in
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/ShaderDiskCache.hppcore/shader/recompiler/tests/RequestSerializerTests.cpp
Please rebase it onto current main. I will review the change once it merges cleanly.
|
@imellag thanks, that settles it. With GCC 13.5 the guarded block is compiled, the probe gives 560 and 296, and the assert edited to 561 fails at AI-assisted: yes (Claude Code) |
…ds-prologue # Conflicts: # 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
|
@XairRrR @Ondra97 #10351's head writes disk cache 53, which AI-assisted: yes |
|
Main The declared order remains #10351 → #11551. Your current Exact current main + #6782 + #10351: 18 passed, 2 skipped, zero failed; all four attachment cases execute, with zero VUIDs and the same validation warnings as main. The combined #11551 stack was not run. AI-assisted: yes. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (13 IDs in 549 tests)Skipped (49)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (8, not counted against this PR)Validation IDs already present on main (8 IDs in 549 tests)Skipped (60)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
7 November follow-up — new main format collision: @imellag the earlier v54/f16 correction is verified, but main has since allocated request version55 to a different extension. At main When refreshing, preserve main's v55 target-merge decoding and >=54 f16 flags, then allocate the next free version for depth-bounds (at least56 against this pin; recheck current main first). A useful compatibility fixture is a main-v55 request with packed/layered target merges and both f16 flags but no depth-bounds bytes: preserve every field, keep depth-bounds disabled, and reserialize into the new version. A decode gate restored to55 should fail that control. Main's disk-cache format is also now57 for changed merge data; please recheck the separate #10351 cache-version agreement when composing. Your earlier v54 correction and negative control remain credited in your reply; the request for a new version here is caused by subsequent main changes. AI-assisted:yes,Codex. Original source-collision report, retained for context: @imellag A new main merge changes the request-version plan in your latest comment. #11351 has landed: main At your On refresh, please preserve main's f16 target/cache-key fields and >=54 decoding, then allocate a fresh request version for the depth-bounds fields and move their decode gate accordingly (at least 55 against the inspected main; recheck prerequisites/landing main). A main-format-54 fixture with the f16 flags, an older request and the new depth-bounds round trip would check the boundary. Retaining 54 for both layouts is insufficient even if Git merges. Our #7085 disk-cache reservation remains 61; request serialization is a separate sequence. No combined build/replay claim here. AI-assisted: yes (Codex). |
…ds-prologue # Conflicts: # core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp # core/shader/recompiler/tests/RequestSerializerTests.cpp
|
@Amoenus thanks, you're right, and Git merged the serializer without a conflict, so both layouts would have gone out as 54. @Ondra97 a correction to my comment this morning: request serialization is now 55, not 54. The disk cache plan is unchanged: 57 now, 58 after #10351. AI-assisted: yes |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (9 IDs in 599 tests)Skipped (54)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
#9737 emulates the depth bounds test on a device without the
depthBoundsfeature (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 withneeds the depthBounds feature. UE4 deferred lights are such draws: both bounds inside(0, 1)and aGREATER_OR_EQUALdepth 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
Zsis within[min, max]. When the draw writes neither depth nor stencil,Zsdoes 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 feat(agc): emulate a one-sided depth bounds test without the depthBounds feature #9737. Otherwise it clearsdepthBoundsTestand setsdepthBoundsDiscard.decodeDrawpassespixel.depthBoundsDiscardto 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).DepthBoundsOffset). Its prologue fetchesZsatFragCoord.xy, and demotes the fragment to a helper invocation, or kills it where demote is not available, whenZs < minorZs > max. This runs before the rest of the program, so a fragment outside the bounds has no side effects.{min, max}as floats into those dwords for every draw, next to the depth remap push.main's rule.mainis at 54). The disk cache format goes to 57 (mainis at 56), since the compiled result and the image records gain a field. The depth bounds offset is specialization constant 8239 (maintook 8237 and 8238 for mesh layers).It throws, with its own message, when this would not be exact:
Devices with
depthBoundsare unchanged, and so is the one-sided path. The debt entry indocs/dev/debt/libSceAgcDriver.mdnow describes both paths.Tested
Current head
1d0c7b6904:main6ed10ccd1fmerged in. #11351 took request serialization 54 onmain(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 wheremainreads them from 54, and the depth bounds discard in the pixel section is read from 55. The disk cache format stays 57 (mainis still at 56). In the serializer tests a request below 55 drops the depth bounds bytes, then followsmain'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_serializerandagc_shader_memoryfail (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-1103merged withmain6ed10ccd1f, plus two local fixes for code onmainthat does not build on macOS with libc++ (std::threadwithout<thread>inRunReport.cpp, which #15973 adds toRunReport.hpp;::environinVulkanDevice.cpp). The change side is that tree + this head. WithANYPS5_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_drawruns 12 cases on the base and 20 with this PR. Neither log has aVUID-line orwas not found but was requested by env var VK_INSTANCE_LAYERS.Previous head
0baa4668cb:mainb11c7bf84fmerged in. Sinceb2cf782aa4,maintook request serialization 53 (a trailingshaderImageMinLodbyte) and disk cache format 56, and added a field toImageResource(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 itsImageResourcecount is 51. In the serializer tests, a request taken below 54 drops the depth bounds bytes and below 53 the trailing minimum LOD byte, followingmain's new steps; that adds onepop_backto the merged-hull chain and to the version 52 checks, andmain'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-1103merged withmainb11c7bf84f, plus #15700 (tests on macOS) and two local fixes for code that reachedmaintoday and does not build on macOS (libSceAppContentquota type, aconstvtable cast inGuestNpCommonRuntime.cpp; I'm opening both as PRs). The change side is that tree + this head. WithANYPS5_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_drawruns 12 cases on the base and 20 with this PR. Neither log has aVUID-line orwas not found but was requested by env var VK_INSTANCE_LAYERS.Previous head
b2cf782aa4:mainb28bb77217merged in. Sincecb3e417e4e, #10547 took request serialization 52 (a trailinghostInterpolationFirstbyte), #12662 (open, ahead in the queue) writes 53, #10351 (open, agreed to go first) takes disk cache 52, and #12246 put theRecompileResultsize check under__cpp_lib_atomic_shared_ptrand raised theImageResourcefield 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 guardedRecompileResultcheck is 560. The specialization constant stays 8239. The serializer tests replay a version 52 request without the discard, andmain'shostInterpolationFirststep 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):
mainb28bb77217+ #11554, #7631, #7804, #4630, #14883, #15002, plus two local build fixes for code that reachedmaintoday (atomic_ref<const std::uint32_t>inSyncOnAddress.cpp; a constvoid*to function pointer cast inGuestBadOptionalAccess.cpp). The change side is that branch + this head. Same 7 focused tests and environment as below (VK_LOADER_DEBUG=layeradded):agc_driver_depth_bounds_emulation_drawwith12 cases, 0 compared with the native test;20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test;was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has aVUID-line.Previous head
cb3e417e4e(main88e804b0a7): request 52, disk cache 52, spec constant 8239. The same 7 tests passed on both sides, with noVUID-.Previous head
e8871dc8c6:main21a556f567merged in, disk cache format 51. #12561 merged with disk cache format 50 and a newImageResourcefield (adjustedSample). Git merged the previous head ontomainwithout a conflict, because both sides changed 45 to 46 and 49 to 50, but the merged tree stopped atfieldCount<ImageResource>() == 46(found by @jotitadev; the Windows build here failed the same way). This head mergesmaininto 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 bymainat 50 are not read with this layout. The request format stays 50:mainis still at 49. The tree is the same as the three commits rebased onto21a556f567.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 withmain21a556f567, theDirectMemory.cppconflict withmain's Emscripten branches resolved, plus one local line that keeps its unsupported-host#elseafter 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 addsVK_LAYER_KHRONOS_validationfromVK_INSTANCE_LAYERSin both logs, neither haswas not found but was requested by env var VK_INSTANCE_LAYERS, and neither has aVUID-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 threwthe depth bounds test in the pixel program requires two unused push constant dwordsthere. The third commit moves the shader data to its storage buffer in that case (above);MatchesPreparedShaderuses the same rule.agc_driver_graphicsgains 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, nowsupport/macos-boot-1030-pr11551(f37b423626, the support branch + the three commits), the same 7 focused tests pass with the validation layer loaded and noVUID-. 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 ontomain98ddd9c179.mainstill 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 intotargetMergeswith blend state. Resolved by keeping all ofmain's merge and blend fields, key hashes, emitter helpers and tests and adding the depth bounds parts next to them:DrawLookup.cppandDrawRegisterKey.cpp: both draw keys hash and compare everytargetMergesentry as onmain, thendepthBoundsDiscard;Recompiler.cpp: the variant key mixesmain's merges and then the depth bounds flag and T#;mergeTargetImagereturnsmain's merge path unchanged and handles the depth bounds image first, in its own branch;ShaderInfoCollector.cpp:AddTargetMergeformain'smerges, thenAddDepthBoundsSource;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.ShaderStageInputInfokeepsmain's merge fields and addsdepthBoundsDiscard. The Linux-only size checks stay at 296 and 560 (main's 288 and 552 plus 8): measured on macOS with libc++,CompiledShaderArtifactgoes 288 to 296 andRecompileResult616 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 inRecompiler.cpp: #10351'sstencilModelines stay, andbindingAllocator.Allocatetakes this PR'sdepthBoundsargument after itsstencilReplay. #10351 also takes disk cache format 50, whichmainnow 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 branchsupport/macos-boot-1030(6747733e89) =main98ddd9c179+ only the open macOS PRs #11447 #11554 #10552 #7631 #7804 #4630 and #13220 (the duplicatewrite_watchtest registration that stopsmain's CMake on macOS), plus one local line that readsenvironthrough_NSGetEnviron()inHostReportSources.cpp(maindoesn't compile it on macOS; no open PR covers it yet). The conflicts of #11554, #10552, #7631, #7804 and #4630 withmainare 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 on7290fdb49d, 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:agc_driver_graphicsfailed attwo ranges under a budget for two were not imported.agc_driver_depth_bounds_emulation_drawpasses with12 cases, 0 compared with the native test;agc_driver_depth_bounds_emulation_drawpasses with20 cases, 12 by a depth test, all in the pixel program, 0 compared with the native test;agc_driver_graphics3 more runs on each: base 3 of 3 pass, change 2 of 3 (the failed run stops at the sametwo 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;VK_LAYER_KHRONOS_validationas enabled byVK_INSTANCE_LAYERS, there is nowas not found but was requested by env var VK_INSTANCE_LAYERS, and noVUID-line.Logs attached.
Previous head
5a15547d39, rebased ontomain750cf6cf48. Request format 50 and disk cache format 50 aftermaintook 49 for both. On support branchsupport/macos-boot-1028(eca446163e) andsupport/macos-boot-1028-pr11551(4e4aade74a), the same 7 tests passed on both, noVUID-;agc_driver_graphicsfailed once in the first change run at the sametwo ranges under a budget for two were not importedand passed in the 3 runs after.Previous head
39d5e816b1, rebased ontomaine0cd1259a9after #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 (maine0cd1259a9with 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_graphicsand #9193'sagc_driver_pixel_barycentric_emulationpass with the validation layer loaded and noVUID-lines.Previous head
b7acb0da81, rebased ontomainfe2b52c7e4.mainmeanwhile took request format 47 (#10515) and disk cache format 48 (#8077, which also adds a field toCompiledShaderArtifactandRecompileResult). So this PR now uses request format 48 and disk cache format 49, and the Linux-only size checks inShaderDiskCache.cppare 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 currentmainwith the macOS PRs listed below merged in,request_serializer,agc_shader_memory,agc_shader_disk_cache,agc_driver_depth_bounds_stateandagc_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 noVUID-lines.Linux (@jotitadev, previous head
1e2ff2603onmaincb45ae2ddwith 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, andagc_driver_depth_bounds_emulation_drawcompares all 20 cases with the native depth bounds test on both.^agcgives 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).
maindoes not build and run on macOS, so this ran onmain035ac96edd+ #10366 #10552 #7631 #7804 #11249 #10669 #10540 #11447 #11047 #11048 #10876 #9263 and a local patch that loadslibvulkan.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 containswas not found but was requested:agc_driver_depth_bounds_emulation_drawpasses with20 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 aGREATER_OR_EQUALdepth test. Every case also runs through the pixel program, and the 12 one-sided ones through the depth test as well. MoltenVK has nodepthBounds, 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_gplandagc_driver_quad_pixel_maskpass, with no validation errors.DepthBoundsEmulationTestsinagc_driver_graphicspass: which draws take the pixel program, which keep the depth test and each refusal. The test binary then hangs inRunBdaResourceTests(releaseParkedImports), on the base without this commit too.^agc_withoutagc_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 withdeferred destruction found two different device resolverson 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 inagc_driver_color1555_target, which logs 2 or 4 between reruns on the base alone.tools/check_conventions.py --base upstream/main(21a556f567) passes.tools/pr_overlap.pyfinds 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 inShaderDiskCache.hpp, request format inRequestSerializer.cppand 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), thestencilReplayline of #10351 (above), and #9508 inDraw.cppandShaderResources.cpp. Whichever lands second takes the next format number.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)cce9f5c317with 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 oncce9f5c317: AMD Radeon RX 9070 XT (amdvlk), Windows 11