fix(shader): preserve compute implicit LOD and quad inputs #10867
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10867"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-10-25T06:45:34Z.
What
Preserve compute implicit texture LOD and quad inputs, including both halves of a guest wave64 on a 32-lane host subgroup. Keep native DIM2D comparison through the 1D remap, supported single-level emulated comparison and converted UNORM sampling, and unnormalized base-level computed offsets. Zero-bias clamp samples use spatial gradients with MinLod. Nonzero instruction bias uses native biased sampling. The Vulkan device enables the advertised compute-derivative feature and the corresponding SPIR-V extension.
Shader semantics follow AMD RDNA2 ISA section 12.16, LLVM whole-quad input preservation, the KHR linear-quad specification, and the Vulkan texture LOD rules. The shader debt fragment records the unsupported cases and remaining hardware coverage.
Head
882f72bc732455c5a8918ca6533c1b7d6f2ee309addresses the CodeRabbit review. The volume layer-load control uses the selected target. The clamp fixtures share one mip-chain setup, an affine row verifies negative sampler bias, and only explicit-gradient assertions use the fractional-gradient waiver. The SPIR-V test verifies image-operand lengths and requires the emitted linear-derivative capability for both extension variants.The previous head
c1c1b969cd49dca6752f00eb386ae7b303e7019dmergesmainatf670bccbdf92fd7dd72793cb371b1589cb61d979into the published branch. The clamp fixture keeps #24153's LOD fidelity probe around the-192/256case while passing the PR's capability-selected shader code and assertions.The previous head
99609ade9efebdee40db621710d9b253805df9edmergesmainat4cb7752e5016ca577d6acb9e2e3dca869d71e598into the published branch. The clamp fixture keeps the-192/256bias from #23992 and the PR's capability-aware test path.The previous head
863a3e66b12945a4a43c38433e2c2d4f8f372d64includes the published maintainer merges at214931d4b3f491741364606abfca9a5bce41e7bcand a merge of mainc8f72e905cce039a05970ed39d2373f770217901. TheImageSampleUnnormalizedfixture now reads the X/Y clamp modes from the sampler descriptor. This restores compilation after main removedmirrorXandmirrorY. The 12 sampler cases still run across the bilinear, point, and mirror registrations, and the descriptor-control registration retains its assertions. The debt changes use a fragment.An independent source and evidence review of
dd7318625f0fidentified a sparse-residency fixture with an unintended quad footprint and fixtures that needed an explicit path when linear compute derivatives were unavailable. The final commit gives the sparse fixture one-texel quad steps and preserves explicit, pairing, residency, and refusal checks in the affected test suites.The overlap check found a merge-order conflict with #28324 in
ImageVolumeAddressOnLine.cpp. That PR enables explicit LOD on a 1D texture addressed as 3D and replaces the refusal check with a three-mip readback. When the second PR lands, keep that readback, pass the selected shader target into it, and retain the compute-derivative refusal and fallback checks. Each PR builds independently. Overlap reportA merge simulation with #16935 at
5e89588befeconfirmed conflicts in the SPIR-V image emitter and both unnormalized-sampling tests. When combining the changes, retain #16935's explicit nonzero-mip path alongside this PR's base-level computed-offset path, and preserve the coverage for both. A separate simulation with #27670 at3c57860ec8conflicted inImageSampleUnnormalized.cpp, where the anisotropic cases should be kept alongside the base-level controls. These are merge-order conflicts between independently scoped changes.Tested
CodeRabbit follow-up on
882f72bc732. Local Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Ninja Release, RTX 5080 driver 621.40 (32.0.16.2140), Khronos validation layer 1.4.363, and Vulkan headers 1.4.335.f670bccbdf9, matched GPU tests882f72bc732, matched GPU tests882f72bc732, additional GPU tests882f72bc732, compute derivatives disabled with Khronos ProfilesThe matched selections include both clamp lanes and the default volume-address registration. The additional selection includes the forced derivative-disabled volume-address registration, which passed its explicit sampling, layer-load, descriptor, and implicit-refusal controls. Both main clamp lanes and both candidate clamp lanes passed without taking the fractional-gradient waiver. The Profiles runs passed both original clamp lanes. The affine registration checked its explicit-gradient fallback before reporting a capability skip.
Verbose CTest confirmed the RTX 5080 was selected and Khronos validation was inserted in every GPU registration. The matched runs used the same test selection, required Vulkan, disabled the shader cache, and produced no missing-layer messages or raw VUIDs. The
agc_shader_memoryCPU suite passed on both revisions with SPIR-V Tools disabled, exercising the candidate's own instruction-length and capability assertions.A local control that zeroed the sampler's negative bias failed the affine implicit result on lane 0, which returned mip 2 where the test expected mip 1. The restored candidate passed.
git diff --check, the debt fold check, and repository conventions passed. Currentorigin/mainat75b480e9c78merges cleanly and changes CI tooling and contributor guidance since the testedmainrevision.CodeRabbit follow-up verbose CTest log hashes
4abc03b58607d880a4c847c10ad9423b086b59575b2b60e2ce6da12330081aaf68d7b527d617998cd5ddb6ae4278653d0520eb0201cfb356b6c818bce3b274d479bd1d9fbc64075e491f3b076af377a4bb650f56d3075f882620778aa58151a9167347651031d300589c1c5844167c4961a5620cc3b395c8e045a0e32cda6a906b4c6da72ed38e4413e6dc2d1ef66472bbbfd5b12dba6247976fa0cd488a711e0eb46dd5298d7153a4228fd448845683cf3a810789d95a7cbeec46dcbfb1275dNovember 30 integration on
c1c1b969cd4. Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Ninja Release, NVIDIA GeForce RTX 5080 driver 621.40 (32.0.16.2140), Khronos validation layer 1.4.363, and Vulkan headers 1.4.335.f670bccbdf9, matched GPU testsc1c1b969cd4, matched GPU testsc1c1b969cd4, additional GPU testsc1c1b969cd4, compute derivatives disabledThe paired run used the same 11 registrations on both revisions, including the image-view and shader-clamp readbacks, with Vulkan required and the shader cache disabled. Verbose CTest confirmed selection of the RTX 5080 and insertion of the Khronos validation layer for each registration, with no missing-layer messages or VUIDs. Neither clamp lane printed the
-192skip. The candidate also passed the additional registrations listed below and both original clamp registrations under Khronos Profiles with linear compute derivatives disabled. Both Profiles runs reported the expected explicit fallback.git diff --check, conventions againstorigin/main, and the debt fold check passed. The merged base includes the fix for the earlier macOS replay-cleanup failure. The replay test module passed 22/22 locally on Windows. The hosted macOS relinker check also passed onc1c1b969cd4. Upstream replay cleanup fixPeacocksir reported that the previous head failed the
-192case on lavapipe 25.2.8 in 3/3 runs and passed in 3/3 runs with the proposed #27777 guard applied locally. #27777 was closed after #24153 landed its LOD probe. The RTX 5080 run above exercised the full case. Lavapipe report, Closure updateNovember 30 verbose CTest log hashes
97f6db3cb874898a894ef3c6dcf61954989ad49f75a9d39ca8a449f25cffad35f8ee0afc1cebef600d8c576776fabae6f670ef23d1e5b641361612d0fa49ae9c3ef9d3168c323bbedb2d94223c85759ce5f70f78ee8e535f5bcc87b8bb9b84d511403e3aaacc0cacfbf170d8c72446f6e9b9f9b26b0493436b9a9db09cf97f7cNovember 27 validation on
99609ade9ef. Local Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Ninja Release, NVIDIA GeForce RTX 5080 driver 621.40 (32.0.16.2140), and Khronos validation 1.4.363 with bundled Vulkan headers 1.4.335.4cb7752e501, matched GPU tests99609ade9ef, matched GPU tests99609ade9ef, additional GPU tests99609ade9ef, compute derivatives disabledThe matched tests used the same registrations and passed both the image-view and shader-clamp readback lanes on each revision. CTest ran serially and verbosely with
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. The logs confirm the RTX 5080 was selected, every instance inserted Khronos validation, and no layer was missing. The additional registrations cover implicit-LOD and masked quad coordinates, both affine clamp variants, zero bias, sampler bias, and unnormalized controls. With the Khronos Profiles layer disabling linear compute derivatives, both original clamp registrations passed and reported the expected explicit sampling fallback after checking the implicit path's refusal.git diff --check, the function-name overlap check, and conventions againstorigin/mainpassed. The standalone debt-fold check reports the same duplicate cube-face entry on pinned main and this head.November 27 CTest selections and verbose log hashes
Matched:
^agc_driver_(image_sample_lod_clamp(_shader_lane)?|image_sample_unnormalized|image_converted_unorm|emulated_color_compare(_srgb_decode)?|image_plane_address_on_line|image_sample_bias_a16|runtime_images|sample_multisample_target|texture_sparse_levels)$Additional:
^agc_driver_(compute_implicit_lod(_masked_quad_coordinate)?|image_sample_lod_clamp_(implicit_affine_quads|implicit_zero_bias|implicit_affine_zero_bias|sampler_bias)|image_sample_unnormalized_.+)$Profiles fallback:
^agc_driver_image_sample_lod_clamp(_shader_lane)?$bc7c4af271e81fa23000aee43e5622573fbe5c335dc94afb6d4ace34f3737e9ceae7fa37ac069d8860fec4d511b76cbb07049a42572fd0b7a5ab52fae8519ec1b19cb4d3587a6e6da5a7c14bf77dad1db39efdc309f15c61ca33326554d184fccc73b8d34d53b58313ac38fdfbd8f91ab2c5710f0157c474178d1fe15e90681cEarlier local validation on
863a3e66b129. Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Ninja Release, NVIDIA GeForce RTX 5080, driver 621.24 (32.0.16.2124), subgroup 32. The unrepaired merge reproduced bothSamplerCasemissing-member errors with the same compiler flags. The repaired fixture passed the syntax check and linked as part of the candidate build.c8f72e905cce, matched GPU863a3e66b129, matched GPU863a3e66b129, additional GPU registrationsThe matched GPU set includes both LOD-clamp lanes, unnormalized sampling, converted UNORM, both emulated-color comparison variants, 1D plane addressing, A16 sample bias, sparse BC1 residency, runtime images, and multisample targets. Both the image-view and shader-clamp lanes printed their readback pass messages. The additional registrations cover guest wave32 and both guest wave64 halves, masked quad coordinates, native DIM2D comparison on 1D descriptors, affine and sampler-bias clamp controls, unnormalized computed offsets, and the point, mirrored, descriptor and derivative-disabled controls. The emulated comparison fixtures still exclude the unsupported format-51 subcase. The matched CPU suites were
agc_masked_selectandagc_shader_device_profile. Windows Defender quarantinedagc_shader_memory_tests.exeon main during the post-link step, so that suite is outside the matched CPU results.Verbose CTest ran serially with
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. Every selected GPU registration loggedInsert instance layer "VK_LAYER_KHRONOS_validation". There were zero missing-layer messages. The layer was 1.4.363 and the bundled headers were 1.4.335.A supplemental Khronos Profiles layer run exposed the same GPU with
computeDerivativeGroupLineardisabled. Six fallback registrations passed, including both clamp lanes and sparse residency. The implicit-only sampler-bias registration verified the expected refusal and reported its capability skip. All seven loaded validation with zero missing-layer messages or VUIDs. Portability emulation was disabled for this control.git diff --check, the function-name overlap check, the debt fold check, and conventions passed. Main later advanced toe481b135558fc4316bc3b24e7408156737eff08dwith #24043's guestbad_exceptionchanges. The candidate merges cleanly with that revision and passes conventions against it. The test rows above identify the exact revisions built and run.Contributor evidence. MichonGoddijn231849 tested
214931d4b3merged with7fa2fb8c62on Windows 11 Pro 10.0.26200. The AMD gfx1036 iGPU (32.0.21045.16010) passed both implicit-LOD tests and both clamp lanes on that composition. On their RTX 5080 driver 610.74, the two clamp lanes and the 1D plane test also failed on main. Their gfx1036 oracle matched all reported AMD point and linear-mip samples, and the reported NVIDIA point results matched the oracle while linear-mip results followed the driver curve. November 20 report, NVIDIA clamp fixture #23992, NVIDIA trilinear measurements #24259.Earlier contributor RTX 3070 validation on
863a3e66b129. Upipibi tested863a3e66b129merged with61f7f5925c4bon Windows 11 Pro 10.0.26100 with WinLibs GCC 15.2.0 r7 Release, NVIDIA GeForce RTX 3070 driver 616.56, and Khronos validation 1.4.363. On the same machine, all 12 main tests and all 24 candidate tests passed in each of three runs, including both clamp lanes and the 12 additional candidate registrations. The contributor reported loader insertion in every run and zeroVUID-messages on both revisions with Vulkan required and the shader cache disabled. RTX 3070 reportA fresh AMD run on
882f72bc732remains outstanding for Dean's acceptance request.Matched test command and log hashes
SHA-256 of verbose CTest logs
e845b52cffd39dcdfb44b9b3cc4324824be9b62f36391dcafb697a70298c453dce6869991236c4afead72b0ed394f30530a27e25020776b33eff50ad620012da9eae8d1d919122e6903ab1a2bc5f32f8b8a35906dcf218588e252a600946c8c741fb9e3ba91c15acc8836f6b5143de2b6cda26622caf6a66840de22ff567b742a14d4b2a8b7e09ea2865cd1d41b17a5b8bf647b78a6e7244ef58bcb4ba3a0050122503b6b41cf3d8f164b3c3cb11d4581c53b90e63c0ce3de15e805d655800b33ad4488b7827c1fb5fae62476bacac6fdaa78a5163625defb37282f1b595de5cdb63d72b5b73f4964893d77b7db5e681087f53ecd21a8316902150580bb456b4Checklist
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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by ahmadmuj on 2026-10-25T11:16:24Z.
Review: COMMENTED
Reviewed head
a1dba8d9c350merged locally onto main66e6772ca209(clean merge). Linux (WSL2), GCC 13.3, Release, lavapipe (Mesa 25.2.8, LLVM 20.1.2),ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. I ran your focused set plusagc_driver_emulated_color_compare*,agc_shader_memory,agc_masked_selectandagc_shader_device_profile.compute_implicit_lod_masked_quad_coordinate, its wave64 dual-half cases need a 32-lane subgroup and lavapipe has 8), 3 fail1.
emulated_color_compareand_srgb_decoderegress: same refusal as tablefrogpillow's RADV runs. It comes from the new branch inResourceTracker.cpp:1951-1953.Run(..., offsets = true)compilesOffsetCode. Its word0xf0f80108isimage_sample_c_b_cl_o, a compute sample with bias and no explicit LOD, on 16_16 UNORM (format 23, emulated compare).EmulatedCompare::Unsupported, soRuntimeImageModesno longer offers the emulated mode.TryRuntimeImageModethen skips the one native mode at theEnabled != emulatedcheck (ResourceMaterializer.cpp:2150).describe()doesn't print the emulated bit.The emulated path fetches at LOD 0, and
RequiresSingleLevel(ResourceTracker.cpp:1957) already limits it to single-level images, same as for pixel shaders. So I'd drop that line instead of refusing. The other route is to turn thoseRun(..., true)calls intoReject, but then computeimage_sample_c_b/_c_clon color formats throws where main runs it.The same line also sets
ConvertedSampleUnsupportedon every compute implicit sample. Example: a plainimage_sampleon a single-level 11_11_10 UNORM T#. Main emulates it (ResourceMaterializer.cpp:1417); with this PR it hits "sampling, gathering or querying LOD of a converted unorm image is not implemented" (:285). I found this by reading the code and didn't run it. No test covers it:ImageConvertedUnorm.cpphas no plainimage_sample.2.
agc_driver_image_sample_lod_clampfails on lavapipe:image_sample_cl: thread 3 component 0 is 0.000000, expected 1. It passes on main, where the clamp is folded into an explicitLod.image_sample_clrow, whatever their clamp (0 to 3). Thed_clandd_cl_orows pass.compute_implicit_lodpicks the mip-2 marker). So it looks like lavapipe ignores theMinLodoperand thatSpirvImageEmitter.cpp:1589-1591adds to the implicit-LOD sample.build.ymlchecksmesa-vulkan-drivers), so I'd expect it to go red there. It needs a decision before merge: a skip with a reason on lavapipe, or keep the clamp folded into an explicit LOD.Limits: lavapipe only, no AMD or PS5. My validation layer is 1.3.275, which predates
SPV_KHR_compute_shader_derivatives. It flags that extension on every derivative program (08741/08737), so I can't say anything about validation. The local edits were probes only and aren't pushed anywhere.Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T17:45:23Z.
Review: COMMENTED
Head
3d33b8e41no longer builds on currentmain, although GitHub still shows it as mergeable. Below is a Linux NVIDIA run with a two-line reconciliation.Build break. #12983 (
c720a286f7, merged today at 09:19Z) added a TRUNC_COORD loop totests/execution/ImageSampleUnnormalized.cppthat calls the oldRun(device, program, texture, sampler, coordinates). This PR adds theSpirvTargetparameter toRun, so the text merge is clean but the build fails:The error repeats at line 404. Locally I changed those three lines to use the PR's
targetandplain, the same way as the neighbouring calls:Run with that change. Linux: Ubuntu 26.04, GCC 15.2, Release.
mainf91137142merged with this head plus the change above. RTX 3070 (NVIDIA 595.99.02, subgroup 32) and lavapipe (Mesa 26.0.3), one at a time viaVK_DRIVER_FILES. Khronos validation layer 1.4.341 withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.compute_implicit_lod,image_*,masked_select,shader_device_profileandagc_shader_memorytests, plusemulated_color_compare*anddescriptor_web_faults.VUID-. The TRUNC_COORD cases from #12983 pass with this PR's sampling path.compute_implicit_lod_masked_quad_coordinateskips (subgroup 8). 0VUID-.^agcsuite (no display/flip/lds64,-j1 --timeout 30): RTX 3070 1142/1142. lavapipe 1141/1142; the one failure isagc_driver_graphics_maps_fallbacktiming out at 30 s, which also times out onmainhere.public_headerspasses.I did not run a red pass on NVIDIA:
mainplus only this PR's tests hits the same build error.GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux); lavapipe (Mesa 26.0.3).
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T21:44:51Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The new tests fail without the production changes, as they should. Two things still need fixing before merge: the merged LOD clamp fixture fails on NVIDIA and AMD, and one skip message fails the Linux CI skip check.
What I ran
Head
c8fa7759e3ae440045c08d65c1e0dde6661658a5,main04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, merged with--no-ffin a clean worktree. Debian 13 VM (Xeon Gold 6136, AVX2/FMA), GCC 14.2.0, Release, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19, subgroup 8), no GPU.Results
maingit diff --checkcheck_conventions.pymain(denormal/division tests, one unwrap test).check_skips.pyagc_driver_compute_implicit_lod_masked_quad_coordinateskipped for a reason the checker does not accept (see Blocking 2)agc_driver_image_sample_lod_clamp(lavapipe has noVK_EXT_image_view_min_lodwhile GPL is on) and the masked-quad test (no 32-lane subgroup)agc_driver_image_gather_volume, which did not run in the baseline. Not caused by this PR (see Non-blocking).Skip output of the masked-quad registration
check_skips.py:error: agc_driver_compute_implicit_lod_masked_quad_coordinate skippedDefault LOD clamp registration on lavapipe
Negative control
I restored the PR's 11 production files from
main:ShaderDeviceProfile.hppandShaderDeviceProfile.cppVulkanDevice.cppResources.hppMaskedSelectEliminator.cppResourceMaterializer.cppSpirvAnalysis.cppSpirvEmitter.cppSpirvImageEmitter.cppSpirvEmitterHelpers.cppSpirvModuleSetup.cppThen I rebuilt the three affected test executables and ran their 10 registrations. 7 fail and 2 pass (1 skips):
Failures with main's production code
agc_driver_image_sample_lod_clamp_implicit_zero_biasand_shader_lanepass onmain's code too, so they are controls and not regression tests. wachi35676 saw the same for the zero-bias entry. After I restored the merged files and rebuilt, all 15 focused registrations passed or skipped as listed above, andgit status --porcelainwas empty.Findings
Blocking
agc_driver_image_sample_lod_clampfails on NVIDIA and AMD with this head: the merged fixture expects a sampler LOD bias to work on a zero-derivative sample.core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleLodClamp.cpp:99-101and:402;core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp:1828-1852.c8fa775failed on an RTX 2000 Ada (595.99.02) and on an RX 6300 (RADV, Mesa 25.2.8), both withimage_sample_cl with T# MIN_LOD 0 over BASE_LEVEL 0 with S# MAX_LOD 4095, mip filter 1 and LOD bias 256: thread 0 component 0 is 0.000000, expected 1.main, the PR changed main'sSampleOfto quad-constant coordinates ((tid / 4u) * 7u + 3u). The spatial derivatives are therefore exactly 0.image_sample_clwith no instruction bias, the PR now emitsOpImageSampleExplicitLodwithGrad = (DPdx(coord), DPdy(coord))andMinLod.mipLodBias(S# bias 256/256 = 1.0) is added to that, and the result is then clamped toMinLod= 0. The sample reads level 0, not the expected level 1. Two vendors fail the same way, which fits this reading.main:maintreated compute implicit samples as LOD 0, so the bias raised them to 1.mainexpects.The masked-quad skip message does not match the CI skip check.
core/libs/prx/libSceAgcDriver/tests/execution/ComputeImplicitLod.cpp:292printsskipped masked-quad wave64 dual-half cases, a 32-lane compute subgroup is unavailable.tools/check_skips.pyonly accepts device-limitation reasons of the formskipped, …(itsDEVICE_LIMITATIONpattern needs the comma right afterskipped). It reports this skip as lost coverage..github/workflows/build.yml:553runscheck_skips.pyin the Linux job, on lavapipe (subgroup 8). The full Linux CI job would fail on this PR.skipped, a 32-lane compute subgroup is unavailable for the masked-quad wave64 dual-half cases.Non-blocking
agc_driver_image_gather_volumeVUIDs are not from this PR.VUID-VkSamplerCreateInfo-addressModeU/V/W-parameterand-01079for this test. The baseline main1e65852did not run it, and three latermaincommits change it (e92ec413c9,5af9948a3e,27d9dc2e4e).vkCreateSamplerusesVK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGEwithoutVK_KHR_sampler_mirror_clamp_to_edge. The PR does not touch sampler creation; it adds only the compute-derivative extension and feature toVulkanDevice.cpp.main, not to this PR.agc_driver_image_sample_unnormalizedis close to the 30 s limit. The AMD CI run of this head reports it at 35.0 s, and here it took 19.9 s under-j8. The PR adds a derivative-target loop to it. Please check that it stays under 30 s on lavapipe with no shader cache, and split it if not.Not verified
agc_driver_image_sample_lod_clampimage-view lane, including the failing S# bias row: lavapipe skips it here. Blocking 1 rests on the two hardware CI reports and on reading the emitter and the Vulkan LOD rules, not on a local run.agc_driver_image_gather_volumeonmainwith the layer; it is attributed tomainfrom the code paths involved.To get this to a good state
ImageSampleLodClamp.cppcoordinates or the expectation for main's S# bias row so the test passes on NVIDIA and RADV. Please do not turn it into a skip or a refusal.skipped, …form thatcheck_skips.pyaccepts.agc_driver_image_sample_lod_clampon the new head (NVIDIA or RADV), and update theGPUs testedline.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T10:04:49Z.
Review: COMMENTED
Reviewed — comments
The prepared description names a different head than the pinned review bundle, and repository source was not read, so a formal decision is not justified.
What I ran
No commands or tests were run. I inspected the prepared description, commit list, manifest, file listing, and portions of the diff for pinned head
214931d4b3f491741364606abfca9a5bce41e7bc.Results
Findings
Blocking
None verified.
Non-blocking
f728eab306d73cee65880d1e3783c6c552b5b01cas the current head, while the supplied review bundle is pinned to214931d4b3f491741364606abfca9a5bce41e7bc. Please reconcile the description with the reviewed commit before relying on its reported validation.Not verified
Repository behavior, correctness, security, performance, and test coverage were not verified because no repository source files were read. The description reports NVIDIA validation and an outstanding AMD run; those runs were not independently verified. Of the 39 changed files listed in the manifest, the diff was only partially inspected and no changed file's full text was reviewed.
VulkanDevice.cppandShaderMemory.cppwere excluded from the review folder because they were too large; other changed files are available there but were not read.To get this to a good state
Nothing is required. Optional: align the description's head SHA with the pinned commit and request a complete source review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T19:50:13Z.
Review: COMMENTED
Reviewed — comments
The reviewed head is
863a3e66b12945a4a43c38433e2c2d4f8f372d64; no blocking defect was verified, but two changed files were not read, so the review is incomplete and does not support approval.What I ran
No commands were run. I inspected the prepared diff and pinned source through the review reader. The description reports Windows 11, GCC 15.2.0, and NVIDIA RTX 5080 test results; these were not run by me.
Results
Findings
Blocking
None verified.
Non-blocking
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppandcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, which were excluded from the review folder due to size.Sources
863a3e66b12945a4a43c38433e2c2d4f8f372d64.ShaderDeviceProfile.hpp,ShaderDeviceProfile.cpp,MaskedSelect.cpp,ShaderDeviceProfile.cpp(tests),ComputeImplicitLod.cpp,SpirvEmitter.cpp,SpirvImageEmitter.cpp, andResourceMaterializer.cpp.Not verified
VulkanDevice.cppandShaderMemory.cppwere not read because their full text was excluded by size. No build, tests, or validation runs were performed. Other changes outside the targeted source paths were not fully read.To get this to a good state
Nothing is required. Optional: make the two excluded changed files reviewable to complete the review.
Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-23T22:10:45Z.
Review: COMMENTED
The refreshed overlap report adds #25660. Whichever PR lands second should preserve both behaviors in
WorkgroupLocalSize: #25660's helper overload for the narrow-subgroup Wave32readfirstlaneexchange and #10867's one-thread default for each unspecified dimension. Keep #10867's complete-quad check and run both the narrow-subgroup exchange and compute implicit-LOD tests on the combined code.Two of the new shared-file comparisons also reach code changed here. For #20519, keep the compute derivative rejection ahead of both descriptor-table paths in
EmitImage, including the opt-in bindless path. For #24523, keep the depth-1D modes and dimension matching alongside the packed-mode selection inRuntimeImageModes. These are merge coordination points.Depends onremainsnone.Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-26T16:32:51Z.
Review: COMMENTED
The refreshed overlap report adds #16321. A local merge simulation with its head
cddf2558f3b1confirmed a conflict inResourceMaterializer.cpp. Whichever PR lands second should keep both theremappedDepth1Dequality check for native 1D depth comparison and thebyTexelBytesequality check for BY2/BY4 modes inTryRuntimeImageMode. If #14871 has landed by then, keep itsdimensionMatchescheck as well. The focused tests are the native DIM2D comparison through a 1D descriptor and the BY2/BY4 store cases.Depends onstaysnone.Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-26T22:11:04Z.
Review: COMMENTED
Merge coordination update for #16953 at
bf12269bb808: even though the refreshed overlap report moved it to the manual comparison list, a local merge simulation reproduced three conflicts inImageSampleLodClamp.cpp. Keep #10867's per-codeCheckSpirvLanes, sampler-bias selection and explicit fallback for devices without compute derivatives. Also keep #16953'sCheckGradientSampleLanes, composable--shader-laneand--pipeline-libraryflags, and zero-descriptor-clamp pairing case. The emitter combines textually with both the optional descriptorMinLodbranch and the zero-biasGrad | MinLodpath present. The combined clamp tests still need to run when the second PR is integrated.Depends onstaysnone.Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-27T03:55:13Z.
Review: COMMENTED
The refreshed overlap report adds #27670. A local merge simulation with its head
30e4f420bedcconfirmed a conflict inImageSampleUnnormalized.cpp. Whichever PR lands second should keep #10867'sdescriptor-controlsselection, target-aware fixture and explicit/refusal cases when compute derivatives are unavailable. Fit #27670's anisotropic edge, mirror and border cases into the target-aware fixture and keep its scaled path limited to eligible anisotropic samplers. In the combined code, run the existing descriptor, point, mirror and computed-offset registrations as well as the new anisotropic cases.Depends onstaysnone.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T06:54:16Z.
Review: COMMENTED
Reviewed — comments
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
99609ade9efebdee40db621710d9b253805df9ed. No commands or tests were run;repo_read.pywas unavailable through the provided tools.Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
Not verified
Read the prepared description, commits, manifest, diff, and targeted excerpts of
VulkanDevice.cpp,SpirvImageEmitter.cpp,ResourceMaterializer.cpp,SpirvAnalysis.cpp,SpirvEmitter.cpp, and several execution-test changes. Many changed files and hunks were not read, including most test changes and the fullShaderMemory.cpp; the manifest marksVulkanDevice.cppandShaderMemory.cppas excluded from full text. No tests were run. Author-reported test results were not independently confirmed.To get this to a good state
Nothing is required. Optional: complete the hardware validation noted in the description and review the remaining changed files.
Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-27T13:05:13Z.
Review: COMMENTED
The refreshed overlap report adds #27777. A local merge simulation with
be27ea977602confirmed a conflict at the-192/256case inImageSampleLodClamp.cpp. If #27777 lands first, carry its old-lavapipe condition into the call that uses #10867's selectedcodeandchecks, and preserve the other fallback and pairing cases. The November 27 RTX 5080 run passed the full clamp fixture on both lanes. The lavapipe failure is reported against main in #27777.Depends onstaysnone.Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-27T17:35:23Z.
Review: COMMENTED
The macOS relinker job for
99609ade9efbuilt and ran 1,024 CTest registrations. Its sole failure wasframe_capture_minimize_replay:test_owned_descendant_is_drained_after_parent_exitreceivedPermissionError: [Errno 1] Operation not permittedfromos.killpg(process.pid, 0).I reconstructed the job's merge of this PR into
mainatb464859c1f83. All files undertools/, the rootCMakeLists.txt, and the build workflow are identical between that base and the merge. The failing code and test came from #22453. The pinned main-only workflow was cancelled, so there is no matched macOS baseline result. The replay test module passed all 20 tests locally on Windows, which uses the Windows job-object implementation.Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-11-29T21:56:03Z.
Review: COMMENTED
@peacocksir Yes, either merge order works. If #10867 lands first, your proposed rebase of #27777 preserves the fallback. If #27777 lands first, I’ll keep its
clampsBeforeBiasguard around theRunAndCheckcall that uses the selectedcodeandchecks. Your Mesa 25.2.8 results at99609ade9eestablish the difference on that driver: 3/3 failures as published and 3/3 passes with the guard applied locally. Lavapipe reportI also reproduced two conflicts in the refreshed report. With #28240, preserve its base-level allocation, degamma and higher-base pairing cases while routing the shared clamp checks through #10867’s capability-selected code and assertions. With #26012, keep its short-cube dimension-query mode and retain the
!image.depthComparecondition on the separate flat-line mode. These are merge-order coordination points.Depends onstaysnone.Imported from boykopovar/AnyPS5. Originally posted by Felipebmaitan on 2026-12-01T01:24:53Z.
Review: COMMENTED
@peacocksir Thanks for the update. I merged current
mainintoc1c1b969cd4, retaining #24153’s LOD probe around the-192call and passing the selectedcodeandchecks. Both clamp lanes passed the full case on the RTX 5080 and both passed with compute derivatives disabled. I recorded your separate lavapipe results in the test section. With #27777 closed and the probe inmain,Depends onstaysnone.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-01T01:27:35Z.
Review: COMMENTED
Partial review — no blocking findings in inspected paths
The inspected derivative paths show capability gating and explicit handling for compute implicit clamps, but the review remains incomplete because most changed files were not read at the pinned head.
What I ran
Inspected head
c1c1b969cd49dca6752f00eb386ae7b303e7019dusingrepo_read.py catfor selected ranges inShaderDeviceProfile.cpp,VulkanDevice.cpp,SpirvImageEmitter.cpp, andSpirvEmitter.cpp. Readdescription.md,commits.md,manifest.json,diff.patch, andfiles.json. No tests, builds, or compilation were run; the Windows test results in the description are author-reported.Results
Negative control
Not run; no tests were run.
Findings
Blocking
None identified in the inspected paths.
Non-blocking
None.
Sources
The inspected code checks for enabled compute derivative capabilities and extensions before emitting derivative-dependent shaders (SpirvEmitter.cpp). The sample emitter computes spatial gradients for implicit compute samples with LOD clamps and retains a native biased sample path (SpirvImageEmitter.cpp).
Not verified
The manifest lists 40 changed files. Only the four head source files named above were inspected through the reader; the remaining changed code and fixtures were not verified.
files.jsonreports no rule-based exclusions, while the manifest indicates that full text forVulkanDevice.cppandShaderMemory.cppis not present infiles/. GPU behavior, other platforms, and the author-reported test results were not independently verified.To get this to a good state
Nothing is required. Optional: complete review of the remaining changed files before making a formal approval decision.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-01T01:38:02Z.
Review: COMMENTED
Actionable comments posted (5)
8b536c1a-829e-4671-a0f8-0b8cf5c36845Reviewing files that changed from the base of the PR and between
99609ade9eandc1c1b969cd.core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/MaskedSelect.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageConvertedUnorm.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageSampleLodClamp.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageVolumeAddressOnLine.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cppcore/shader/recompiler/Optimization/src/MaskedSelectEliminator.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppcore/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvModuleSetup.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-01T02:11:35Z.
Review: COMMENTED
Reviewed — no blocking findings
No blocking defect is evident in the inspected compute-derivative and SPIR-V path; the review is incomplete because most changed files and the reported checks were not independently verified.
What I ran
Pinned head:
882f72bc732455c5a8918ca6533c1b7d6f2ee309. I usedrepo_read.pyto inspect targeted source ranges; I ran no tests, builds, or negative controls.Results
Negative control
Could not run a negative control because no tests were run.
Findings
Blocking
None verified in the inspected code.
Non-blocking
None recorded; review coverage is incomplete.
Sources
The inspected code checks compute derivative capability, extension, and workgroup constraints before emission (SpirvEmitter.cpp at the reviewed head). The sample emitter derives spatial gradients for compute clamp sampling and selects the corresponding sampling operands (SpirvImageEmitter.cpp at the reviewed head).
Not verified
Read source ranges in five of the 40 changed files:
VulkanDevice.cpp,SpirvImageEmitter.cpp,SpirvEmitter.cpp,SpirvAnalysis.cpp, andSpirvModuleSetup.cpp. The other 35 changed files were not read from the pinned source.files.jsonlists no rule-excluded files; the prepared full-text folder omitsVulkanDevice.cppandShaderMemory.cppbecause they exceed its size limit. GPU behavior, CI, and the author-reported results in the description were not independently verified.To get this to a good state
Complete review of the remaining changed files and independently verify the relevant checks before making a formal approval decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T04:49:59Z.
Review: COMMENTED
Reviewed — no blocking findings
No defect was verified in the targeted source, but this review is incomplete because most changed files were not inspected in detail.
What I ran
Reviewed head
f253a6b6592f774f83feaffb8809b1740906e5cbusing the prepared description, commits, manifest and diff, plus targeted reads withrepo_read.py. No build or tests were run.Results
Negative control
Not run.
Findings
Blocking
None verified.
Non-blocking
None verified.
Sources
Not verified
The manifest lists 40 changed files. I inspected targeted source ranges in
ShaderDeviceProfile.cpp,VulkanDevice.cpp, andSpirvEmitter.cpp, but did not inspect the remaining changed files in detail, so a formal approval is not justified. The manifest excludes full text forVulkanDevice.cppandShaderMemory.cpp; targeted ranges of the former were read through the reader, whileShaderMemory.cppwas not read. No build, test, hardware, or console behavior was verified.To get this to a good state
Nothing is required.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.