Skip to content

feat(agc): apply a T#'s MIN_LOD clamp in the shader without VK_EXT_image_view_min_lod - #12662

Merged
1 commit merged into
boykopovar:mainfrom
Gonic0:fix/agc-shader-min-lod-clamp
Nov 2, 2026
Merged

1 commit merged into
boykopovar:mainfrom
Gonic0:fix/agc-shader-min-lod-clamp

Conversation

@Gonic0

@Gonic0 Gonic0 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

MoltenVK has no VK_EXT_image_view_min_lod. Since #130, the first T# whose MIN_LOD clamp sits above its base level throws there. ASTRO BOT (PPSA21564 01.007.000) hits this on the title screen. MoltenVK does offer shaderResourceMinLod, which turns the SPIR-V MinLod operand into Metal's min_lod_clamp.

A new target flag, shaderImageMinLod, moves the clamp into the shader. It is set on devices that have shaderResourceMinLod, lack the extension, and do not use graphics pipeline libraries.

  • DescriptorBindingBuilder writes the clamp of each direct image as a float specialization constant at MinLodBase + image. The value is relative to the view's base level and bounded by its last level.
  • Samples of direct images apply it as the MinLod operand, or as an FMax on an explicit LOD that is skipped when the clamp is 0. It combines with an instruction's _cl clamp.
  • On these devices the image view no longer chains the clamp. Image table entries with a clamp are still rejected. Devices that have the extension keep the view clamp.
  • The shader clamp raises λ, where the view clamp raises only the level, so the builder throws wherever the two differ:
    • a paired S# with MAX_LOD below the clamp, no mip filter, or unnormalized coordinates;
    • different magnification and minification filters;
    • a nonzero S# bias on an explicit-LOD sampler;
    • an S# selected at run time;
    • image_get_lod;
    • a gather at a clamp of one level or more;
    • the emulated depth-compare and 11:11:10 samples.
  • APS5_NO_IMAGE_VIEW_MIN_LOD disables the extension, so devices that have it can run this lane.
  • An S# bias on implicit or gradient samples is left to the driver. At a T# clamp of 2.0 and a bias of -1, llvmpipe (LLVM 20.1.2, CI) samples level 1 where MoltenVK and NVIDIA sample level 2, so that case runs in the image-view lane only; the debt entry records it. PPSA21564's title samples such a pair (implicit LOD, T# MIN_LOD 3.0, S# bias -1), so the shader lane cannot reject it.
  • The test skips (77) on a device that has neither lane: no extension, and graphics pipeline libraries keep the clamp out of the shader. The _shader_lane entry skips when its environment does not produce that lane.
  • ValidateShaders now accepts CapabilityMinLod when the device enables shaderResourceMinLod. This also changes devices with the extension: graphics shaders that use an instruction _cl clamp threw "unsupported device capability 42" on every device before.
  • Request serialization moves to version 53, with shaderImageMinLod written after hostInterpolationFirst. main took 51 (fix(shader): run tessellation evaluation stages one lane per invocation on devices without subgroups there #13807) and 52 (fix(agc): prefer host interpolation on RADV to avoid the quad seam #10547), and rejects 50, which several open pull requests write.

The remaining gaps are recorded in docs/dev/debt/shader.md:

  • image tables and registration modules still throw;
  • fetches read below the clamp, which the view clamp leaves undefined;
  • each distinct clamp specializes its own pipeline.

Tested

  • Machine: macOS 27.2, Apple M5 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363), x86_64 build under Rosetta.

  • Build tree: upstream main does not build on macOS without the open macOS port PRs (libkernel). Builds and tests therefore ran on main merged with those, plus this commit. On this branch alone, the touched recompiler and libSceAgcDriver translation units compile and request_serializer_tests passes.

  • agc_driver_image_sample_lod_clamp_tests: passes in the shader lane. It also has a new _shader_lane CTest entry that forces that lane with APS5_NO_IMAGE_VIEW_MIN_LOD=1 and APS5_NO_GPL=1. It now covers:

    • _d_cl, _cl, _d_cl_o, _l and _lz;
    • integer and fractional MIN_LOD over BASE_LEVEL 0 and 1;
    • S# MAX_LOD at the clamp, an S# bias on gradient samples (in the image-view lane only), and negative explicit LODs with an S# bias and no clamp;
    • alternating clamps through cache hits;
    • a prepared-SPIR-V control for the target flag;
    • five rejections with exact messages.

    Each mutation fails it: writing 0, an absolute clamp, a truncated fractional clamp, dropping the MAX_LOD check, or an unconditional FMax on an explicit LOD.

  • Other tests: agc_driver_graphics_tests and agc_shader_disk_cache_tests pass on the current head, and agc_shader_memory_tests on the first commit. agc_driver_recorder_tests did not load Vulkan here, and its minLodTests skips without the extension anyway.

  • PPSA21564 01.007.000:

    • Before: guest texture descriptor uses a minimum LOD clamp, which needs VK_EXT_image_view_min_lod at about 250 s.
    • Probe: the title uses three clamps (MIN_LOD 3, 4 and 1 at base level 0, on 2048² and 4096² textures).
    • After, including the rejections: the title renders and the game reaches the warp sequence that follows it. None of the new rejections fires. The next stop is an unrelated v_permlanex16_b32 in a vertex shader.
  • Not verified: a Linux build, lavapipe (no lavapipe on this Mac; the two lavapipe failures from the CI review are what e006bc1f78 addresses), and the image-view lane.

Checklist

🤖 Generated with Claude Code

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 29, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Gonic0 Please reject unsupported sampler/image combinations or preserve the late view-clamp semantics before enabling this lane. With BASE_LEVEL=0, LAST_LEVEL>=2, T# MIN_LOD=2 and S# MAX_LOD=1, adding shader MinLod makes lod_min exceed lod_max (undefined in Vulkan), whereas the view clamp applies after sampler LOD limiting. FMax on an explicit LOD also runs before that limiting. The debt entry describes this gap but the code accepts it. Please cover this and the no-mip-filter case with defined output or a clear rejection.

Please exercise the no-extension lane explicitly and add fractional MIN_LOD, explicit L/lz and bias cases, plus alternating textures/clamps through cache hits. Check converted/emulated comparison samples too: EmitSampleOp returns into EmitEmulatedSample before the new clamp, and that implementation fetches mip 0. Preserve or reject the clamp there as appropriate. Include an extension-enabled SPIR-V equivalence control. The new target bit and generated source version change cache keys on extension devices as well, so distinguish unchanged shader instructions from cache invalidation.

One more: the request serialization version goes from 49 to 50 here, and other open PRs (#10547, #11483, #10846) also move it to 50. When you rebase, please take the next number strictly above whatever main has at that point, so two requests never share a version.

@adriadam10 adriadam10 self-assigned this Oct 29, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreeing with @oneandonlydean's review; the points below are still open on this head:

  • DescriptorBindingBuilder.cpp:366-370 writes the T# clamp into MinLodBase + image regardless of the S#. With T# MIN_LOD above S# MAX_LOD, MinLod exceeds lod_max, which Vulkan leaves undefined, while the old view clamp applied after the sampler's LOD limit. The debt line in docs/dev/debt/shader.md describes the gap but the code accepts it: either reject that combination (throw) or reproduce the late-clamp semantics.
  • SpirvImageEmitter.cpp: the FMax on an explicit LOD runs before the sampler's limit too, so it has the same problem.
  • Cover the S# MAX_LOD below the clamp case and a sampler with no mip filter with defined output or a clear rejection, and add a fractional MIN_LOD case (e.g. 0x180) to ImageSampleLodClamp.cpp.
  • agc_driver_image_sample_lod_clamp_tests skips unless shaderResourceMinLod is present but never forces the no-extension lane on a device that has the extension, so CI (lavapipe) doesn't exercise shaderImageMinLod. Please add a way to run that lane explicitly.

The rest (relative clamp, base-level handling, v50 serialization, MinLod capability in ValidateShaders) reads correctly.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The current head does not build in the Linux Release configuration, and the fallback clamp still differs from Vulkan’s defined LOD behavior in several reachable sampling cases.

What I ran

  • Linux GCC 12.2 Release build of agc_driver_image_sample_lod_clamp_tests, agc_shader_memory_tests, and agc_driver_graphics_tests.
  • python3 tools/check_conventions.py --base upstream/main --head HEAD.
  • git diff --check upstream/main...HEAD.
  • git merge-tree --write-tree upstream/main HEAD.
  • Refreshed the hosted checks and inspected the exact current diff at 9d42922fc0d218f0bf7581e2d2a8a1955a75e730.

Results

Check Result
Linux Release build Failed compiling ShaderDiskCache.cpp; diagnostics below
Conventions Passed
Diff whitespace Passed
Merge preview against current main Clean; tree e1e7de7a2f442c0e40b52c674e5f71f8ab8eb416
Hosted checks at review time Windows build and two macOS relinker jobs pending; Linux product, register-context, and write-watch jobs skipped. Ubuntu/Windows relinker, relinker ASAN, conventions, eligibility, intake, labels, and report passed.
Raw compiler diagnostic excerpt
FAILED: core/libs/prx/libSceAgcDriver/CMakeFiles/shader_recompiler_agc_driver.dir/__/__/__/shader/recompiler/ShaderDiskCache.cpp.o 
/tmp/anyps5-pr12664-review/core/shader/recompiler/ShaderDiskCache.cpp:88:46: error: static assertion failed: CompiledShaderArtifact changed: update the artifact encoder
   88 | static_assert(sizeof(CompiledShaderArtifact) == 288, "CompiledShaderArtifact changed: update the artifact encoder");
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/tmp/anyps5-pr12664-review/core/shader/recompiler/ShaderDiskCache.cpp:88:46: note: the comparison reduces to ‘(296 == 288)’
/tmp/anyps5-pr12664-review/core/shader/recompiler/ShaderDiskCache.cpp:90:39: error: static assertion failed: RecompileResult changed: update EncodeResult and DecodeResult
   90 | static_assert(sizeof(RecompileResult) == 552, "RecompileResult changed: update EncodeResult and DecodeResult");
      |               ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/tmp/anyps5-pr12664-review/core/shader/recompiler/ShaderDiskCache.cpp:90:39: note: the comparison reduces to ‘(560 == 552)’
ninja: build stopped: subcommand failed.

Negative control

Not run. The build stops at the new Linux structure-size assertions before the focused test binaries can be built.

Findings

Blocking

  1. Linux build fails on the new artifact field. The PR adds shaderImageMinLod to both CompiledShaderArtifact and SpirvTarget, and updates the artifact encoder, but the Linux-only size assertions remain at 288 and 552 bytes. GCC reports actual sizes of 296 and 560. Update the assertions/encoding contract as appropriate and rerun the build.

  2. Explicit LOD is clamped before sampler bias. At EmitSampleOp, the explicit Lod operand is replaced with FMax(lod, clamp); Vulkan then adds sampler.mipLodBias to that operand before applying the LOD bounds. For example, explicit LOD 2, T# MIN_LOD 2, and S# bias -1 produce an effective LOD of 1, below the requested clamp. The guest sampler path accepts negative bias. Preserve the clamp after bias, or reject this combination, and add an explicit-LOD regression case with negative bias.

  3. T# MIN_LOD above S# MAX_LOD yields undefined shader-operand behavior. Vulkan sets lodmin = max(sampler.minLod, shaderOp.minLod), lodmax = sampler.maxLod, and declares the result undefined when lodmin > lodmax. The current shader path emits the T# clamp as shaderOp.minLod without checking the paired sampler’s maximum. The PR’s debt note acknowledges this case, but the runtime currently accepts it. Preserve the view-clamp result or reject the incompatible pair; include the no-mip-filter / maxLOD 0 case.

  4. Emulated sample paths bypass this clamp. EmitSampleOp returns to EmitEmulatedSample for emulated depth comparison and converted 11:11:10 samples before reaching the descriptor-clamp logic. That implementation fetches mip 0 for its texels. Apply the T# clamp to these emulated sample paths or reject the combination explicitly, with focused tests.

  5. The new serializer version collides with three other open PRs. This change moves request serialization from version 49 to 50, as do open #10547 (head 2b1908e3621c0e7a6e62b7f8729cda06d6c5de87), #11483 (head b81b8a12ff1e0b0ccaae3c7e11baebaac54b5e18), and #10846 (head d21510c5d279c8dd35392fa88b453c1e6b180eac), each for a different trailing field. Coordinate a merge order, declare the dependency required by the repository rules, and assign this field a unique version after rebasing onto the resulting main.

Non-blocking

  • The focused GPU tests and the no-extension path could not be exercised locally because compilation stopped at the assertions. The hosted macOS and Windows full-build checks were still pending at the time checked.

Sources

Not verified

  • PS5 hardware behavior.
  • The reported Apple M5 Pro/MoltenVK title run.
  • Full Linux or Windows product tests, focused Vulkan tests, and the pending hosted jobs.
  • Exact console output for the unsupported sampler/image combinations above.

To get this to a good state

  • Fix the size-assertion build failure and rerun the focused build/tests.
  • Preserve or explicitly reject explicit-LOD-plus-negative-bias and T# MIN_LOD-above-S# MAX_LOD combinations.
  • Cover emulated compare and converted sampling.
  • Coordinate and declare the serializer version order, then rebase and rerun checks on the new head.

@MarcZX10

Copy link
Copy Markdown
Contributor

Source correction — citation updated

The Vulkan specification URL in my review used an invalid path. The cited LOD rules are in the official Vulkan-Docs snapshot at commit a8b088a3fae12c8575407ea90c7c09bd653db923.

Sources

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp L1239
PR 7642 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp L708-709
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7648, L7814, L7976, L7979, L7993, L8047-8048
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L944, L953, L1014
core/shader/recompiler/Recompiler.cpp L1013-1017
core/shader/recompiler/tests/RequestSerializerTests.cpp L330-331, L376-377, L407-408, L546-547, L562-563, L586, L626-627, L644, L646, L657, L727, L779, L791, L820, L835-836, L895-897, L914-915, L934-935, L940-941
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
PR 9748 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621-7622, L7648, L8047-8048
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L953
core/shader/recompiler/tests/RequestSerializerTests.cpp L319, L365, L397, L533, L562-564, L613, L644, L656-662, L791, L880, L895, L897-905, L912, L934
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp L708-709
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7648, L7814, L7976, L7979, L7993, L8047-8048
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
core/shader/recompiler/CacheKey.hpp L380
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L944, L953, L1014
core/shader/recompiler/Recompiler.cpp L1013-1017
core/shader/recompiler/Recompiler.hpp L361
core/shader/recompiler/tests/RequestSerializerTests.cpp L330-331, L376-377, L407-408, L546-547, L562-563, L586, L626-627, L644, L646, L657, L727, L779, L791, L820, L835-836, L895-897, L914-915, L934-935, L940-941
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
PR 11265 core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp L160
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1095
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp L171, L671, L709
PR 11351 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7628, L7648, L7655, L7721, L7736, L7814, L7976, L7979, L7993, L8047-8048
core/shader/recompiler/CacheKey.hpp L380
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L944, L953, L1014
core/shader/recompiler/Recompiler.hpp L361
core/shader/recompiler/tests/RequestSerializerTests.cpp L319, L330, L365, L376, L397, L407, L533, L546, L562-563, L586, L613, L626, L644, L646, L657, L703, L727, L779, L791, L802, L820, L835, L880, L895-897, L912, L914, L934, L940
PR 11551 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7648, L7810, L7812-7814, L8047-8048
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L953
core/shader/recompiler/tests/RequestSerializerTests.cpp L319, L365, L397, L533, L562-568, L586, L613, L644, L657, L791, L895, L912, L934
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp L708-709
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7648, L7814, L7976, L7979, L7993, L8047-8048
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
core/shader/recompiler/CacheKey.hpp L380
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L944, L953, L1014
core/shader/recompiler/Recompiler.cpp L1013-1017
core/shader/recompiler/Recompiler.hpp L361
core/shader/recompiler/tests/RequestSerializerTests.cpp L330-331, L376-377, L407-408, L546-547, L562-563, L586, L626-627, L644, L646, L657, L727, L779, L791, L820, L835-836, L895-897, L914-915, L934-935, L940-941
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp L708-709
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7648, L7814, L7976, L7979, L7993, L8047-8048
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
core/shader/recompiler/CacheKey.hpp L380
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp L901, L944, L953, L1014
core/shader/recompiler/Recompiler.cpp L1013-1017
core/shader/recompiler/Recompiler.hpp L361
core/shader/recompiler/tests/RequestSerializerTests.cpp L330-331, L376-377, L407-408, L546-547, L562-563, L586, L626-627, L644, L646, L657, L727, L779, L791, L820, L835-836, L895-897, L914-915, L934-935, L940-941
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
PR 14561 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7379, L7500, L7619, L7621, L7648, L8047-8048
core/shader/recompiler/tests/RequestSerializerTests.cpp L319, L365, L397, L533, L562-564, L586, L613, L644, L657, L791, L895, L912, L934
PR 14621 core/shader/recompiler/PipelineSpecialization.hpp L51
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp L1665-1666, L1669
PR 14964 core/shader/recompiler/PipelineSpecialization.hpp L51

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.

Pull request Shared files not compared
PR 907 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 1896 docs/dev/ENVIRONMENT.md
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
PR 6186 docs/dev/ENVIRONMENT.md
PR 6187 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Recompiler.hpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/debt/shader.md
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6553 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
PR 6751 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6924 core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Recompiler.hpp
PR 7223 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7392 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 7410 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/debt/shader.md
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7457 docs/dev/ENVIRONMENT.md
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_lod_clamp_tests.cmake
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/Optimization/include/Optimization/DescriptorBindingBuilder.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/ENVIRONMENT.md
PR 7668 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/ENVIRONMENT.md
PR 8484 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 8707 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 9020 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/debt/shader.md
PR 9183 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9318 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9335 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/debt/shader.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/ENVIRONMENT.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9675 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9700 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/ENVIRONMENT.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/ENVIRONMENT.md
PR 9884 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 9889 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9898 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 9915 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 10049 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
PR 10233 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10359 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 10757 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/ENVIRONMENT.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleLodClamp.cpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 11452 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
core/shader/recompiler/tests/RequestSerializerTests.cpp
docs/dev/debt/shader.md
PR 11485 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 11901 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11998 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 12120 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
docs/dev/ENVIRONMENT.md
PR 12323 docs/dev/ENVIRONMENT.md
PR 12324 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12548 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/debt/shader.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12746 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 12790 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/PipelineSpecialization.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 12863 docs/dev/ENVIRONMENT.md
PR 12921 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 12930 docs/dev/ENVIRONMENT.md
PR 12970 docs/dev/ENVIRONMENT.md
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 13486 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/shader.md
PR 13707 docs/dev/ENVIRONMENT.md
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 14212 docs/dev/debt/shader.md
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/CacheKey.hpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvEmitter.cpp
docs/dev/debt/shader.md
PR 14261 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 14299 docs/dev/ENVIRONMENT.md
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 14943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.cpp
core/shader/recompiler/Recompiler.hpp
PR 15059 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
docs/dev/ENVIRONMENT.md
PR 15136 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/ENVIRONMENT.md

@Gonic0

Gonic0 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @oneandonlydean, @adriadam10 and @MarcZX10. Pushed 279911dd95 as a separate commit on top of 9d42922fc0, so the delta is easy to review.

Linux build. The size assertions in ShaderDiskCache.cpp are now 296 and 560, the sizes GCC 12.2 reported. The artifact encoder already wrote the field. I could not compile on Linux here (macOS host), and the PR's linux job is skipped, so this is not verified on Linux.

Combinations the shader clamp cannot match are now rejected. DescriptorBindingBuilder::Prepare throws for a direct image whose relative clamp is nonzero when:

  • a paired S# has MAX_LOD below the clamp, or has no mip filter, or is unnormalized (all three give lod_max < MinLod);
  • a paired S# has a nonzero LOD bias and the sampler is used with an explicit LOD (_l, _lz, or any non-pixel sample). The FMax runs before the bias, so a positive bias differs from the view clamp too, not only a negative one. Implicit and gradient samples keep the MinLod operand, which Vulkan applies after the bias, so they stay accepted;
  • the paired S# is selected at run time, so its LOD limits cannot be checked;
  • the selected image mode takes the emulated depth-compare sample or the 11:11:10 converted sample, both of which read mip 0.

When the clamp is at most every paired MAX_LOD, clamp(max(λ, c), smin, smax) equals the spec's max(clamp(λ, smin, smax), c). Extension devices never reach this code. The debt entry now lists what throws, and keeps only gathers and fetches as open gaps.

Tests (agc_driver_image_sample_lod_clamp_tests):

  • New agc_driver_image_sample_lod_clamp_shader_lane CTest entry. It runs the binary with --shader-lane under APS5_NO_IMAGE_VIEW_MIN_LOD=1 (a new switch, documented in ENVIRONMENT.md) and APS5_NO_GPL=1. It fails if the device does not end up in the shader lane, so lavapipe exercises it.
  • Clamp cases: MIN_LOD 0 and 0x200 over BASE_LEVEL 0 and 1, plus S# MAX_LOD equal to 3 with a clamp of 2.
  • Two new instructions, image_sample_l (per-lane LOD) and image_sample_lz, alongside the _d_cl, _cl and _d_cl_o ones.
  • image_sample_d_cl with S# bias -256 and -128.
  • Six alternating clamps through the recompiler cache (useCache = true), which re-specialize the same artifact.
  • The four rejections, with exact messages.
  • Fractional MIN_LOD (0x1c0 over base 0, 0x2c0 over base 1, and a bias of +128) runs only in the shader lane, where MinLod is a float. The view clamp may use minLodInteger there, so the extension lane cannot assert a single level for those cases.
  • No shader _b: compute has no implicit derivatives, so the shader turns its samples into explicit LOD 0 and drops the bias operand there. The S# bias cases cover where the bias is applied.
  • Control: the prepared SPIR-V declares no MinLodBase spec id when the target flag is off, and exactly MinLodBase + 0 when it is on.
  • Mutations: truncating the fractional clamp fails (reads level 1, expected 2), and dropping the MAX_LOD check fails (the combination runs instead of throwing).

Cache keys. shaderImageMinLod is appended to the target key unconditionally, like the other target fields. Extension devices re-key once, but SourceVersion already changes with any recompiler source change, so this adds no invalidation of its own. With the flag off the emitted instructions are unchanged, which the prepared-SPIR-V control above checks.

Serializer version. main is still at 49, so this keeps 50. #10547, #11483 and #10846 also take 50 and none is a dependency. Whichever merges second renumbers to the next free version on rebase; I'll do that here if one of them lands first.

Tested on macOS 27.2, Apple M5 Pro, MoltenVK 1.4.2 (no extension, no GPL, so the shader lane):

  • The test passes, including the rejections. The image-view lane runs only on devices with the extension, which I don't have.
  • PPSA21564 01.007.000 still renders the title and reaches the warp sequence after it, so none of the new rejections fires there. It then stops at the same unrelated v_permlanex16_b32 as before.

Not verified: a Linux build, a lavapipe run, and the image-view lane on a device with VK_EXT_image_view_min_lod.

AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — approved

The current head resolves the blocking build and LOD-semantics findings from my previous review. I approve commit 279911dd95b25dc56cff05e7708ed103bf556446.

What I ran

  • Configured a Linux Release build with GCC 12.2 and BUILD_TESTING=ON.
  • Built agc_driver_image_sample_lod_clamp_tests and its dependencies.
  • Built and ran the request serializer test.
  • Ran the shader-clamp and image-view CTest entries.
  • Ran python3 tools/check_conventions.py --base upstream/main --head HEAD, git diff --check upstream/main...HEAD, and a merge preview against current upstream/main.
  • Refreshed hosted checks and inspected the current diff at the exact head above.

Results

Check Result
Linux Release focused build Passed; target linked successfully
request_serializer Passed
Conventions Passed
Diff whitespace Passed
Merge preview Clean; tree f299f5db8359900a0bbb67fe4d50ced8dd9e7b43
agc_driver_image_sample_lod_clamp_shader_lane Could not run: host CPU is below the project's minimum
agc_driver_image_sample_lod_clamp Could not run: same CPU limitation
Hosted checks Windows, Ubuntu/Windows relinker, ASan, conventions, eligibility, labels, and report pass; Linux product and specialized jobs skip; two macOS relinker jobs remain pending

The local GPU test runner stopped before opening Vulkan:

The host CPU (Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz) lacks LZCNT, BMI1, BMI2, MOVBE, AVX2, FMA. The PS5's Zen 2 CPU has these extensions and titles run their instructions natively, so this CPU cannot run them.

The author reports that the shader lane and title scenario pass on an Apple M5 Pro with MoltenVK 1.4.2. I did not independently reproduce those GPU/title results.

Negative control

Control Result
Local mutation test Not run; this host cannot execute the project test binary
Author-reported shader mutations The PR comment reports that clamp truncation and dropping the MAX_LOD validation fail the focused test; not independently reproduced

Findings

Blocking

None found at this head.

The earlier Linux size-assertion failure is fixed; the focused target now builds. The descriptor binding path rejects sampler combinations where shader MinLod would differ from the view clamp, and the tests now include explicit LOD/bias, fractional clamps, cache re-specialization, and the unsupported MAX_LOD/no-mip-filter cases.

Non-blocking

  • Request serialization is version 50, which is also used by other open PRs. Current main remains at 49, so this head is valid against the current base; if another version-50 change lands first, rebase and advance the version before merging this one.
  • I could not execute either Vulkan test locally because the available CPU lacks the required instruction set. The author-reported M5 Pro shader-lane and title tests provide the hardware evidence for this path.

Sources

All code links point to the reviewed commit 279911dd95b25dc56cff05e7708ed103bf556446.

Not verified

  • Local Vulkan execution of either lane.
  • macOS relinker jobs still pending at check refresh.
  • PS5 hardware behavior; the reported title run was performed by the author.

To get to a good state

The current implementation is in good state for review. Reassign the serializer version if another version-50 change reaches main before this PR.

@Gonic0

Gonic0 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a8f8087cb5 after a self-review pass:

  • With a clamp of 0, explicit LODs now skip the FMax, through an OpSelect on the constant. Before this, a negative _l LOD with a positive S# bias moved up a level on MoltenVK even without a T# clamp. The test now covers that case.
  • The shader clamp raises λ, while the view clamp raises only the level. Three more cases where that matters now throw:
    • a paired S# with different magnification and minification filters, which would always take the minification filter;
    • image_get_lod;
    • gathers at a clamp of one level or more.
  • S#s used only by gathers skip the MAX_LOD and bias checks.
  • The clamp's level range now follows MAX_MIP, as DecodeTextureResource does.
  • The binding plan takes the flag from the request target, so CompiledShaderArtifact, the disk cache encoder and the Linux size assertions are now unchanged from main. This replaces the 296/560 change from my previous comment.
  • The description now says that ValidateShaders also changes devices with the extension: instruction _cl clamps in graphics shaders no longer throw there.

The test and PPSA21564 01.007.000 were rerun on MoltenVK, with the same results as before. The new rejections do not fire in the title.

AI-assisted: yes

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The shader-clamp lane works on an NVIDIA RTX 4070 Ti SUPER, but one new test case asks for a rounding that Vulkan leaves to the implementation. Because of it, both agc_driver_image_sample_lod_clamp and the new agc_driver_image_sample_lod_clamp_shader_lane fail on this GPU, and the first one passes on main.

What I ran

  • Head: a8f8087cb5789322d750562faa66f6ba944d4b87
  • main: 3a2b91981651569163768854a1fcdc7193b6667b
  • Merge of head into main: clean (ab662524130a8d8f1aa9dd85e0ac43238aaf9203)
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), Release, Ninja. These are the first runs on NVIDIA hardware posted in this thread. Earlier reviewers could not run the Vulkan tests, and the author ran them on an Apple M5 Pro.
git diff --check origin/main...pr-head
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10
ctest --test-dir build -j4 --output-on-failure -R '^(request_serializer|agc_shader_memory|agc_shader_disk_cache|agc_driver_graphics)$'
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -V -R agc_driver_image_sample_lod_clamp      # merged tree, then main
# diagnosis: same ctest with the bias of the second Case{0x100u, 1u, 0xfffu, 1u, -128} (ImageSampleLodClamp.cpp:283) set to -96
# negative control: SpirvImageEmitter.cpp from origin/main, test as in the diagnosis run

Results

Check Result
Merge with main Clean
git diff --check Clean
check_conventions.py All conventions checks passed.
Full build (merged tree) Passed
request_serializer, agc_shader_memory, agc_shader_disk_cache, agc_driver_graphics 4/4 passed
agc_driver_image_sample_lod_clamp on main Passed (0.39 s)
agc_driver_image_sample_lod_clamp on the merged tree (image-view lane) Failed
agc_driver_image_sample_lod_clamp_shader_lane on the merged tree Failed
Both entries, with bias -96 in place of -128 on line 283 Both passed (0.52 s and 0.39 s); the shader lane printed passed in the shader-clamp lane
Validation layer Loaded in every run (Insert instance layer "VK_LAYER_KHRONOS_validation"). No was not found but was requested by env var VK_INSTANCE_LAYERS. No VUID- lines on main or on the merged tree
Merged tree, both entries fail on the same case
863: AGC graphics: image_sample_cl with T# MIN_LOD 256 over BASE_LEVEL 1 with S# MAX_LOD 4095, mip filter 1 and LOD bias -128: thread 3 component 0 is 2.000000, expected 1
1/2 Test  #863: agc_driver_image_sample_lod_clamp_shader_lane ...***Failed    0.84 sec
1181: AGC graphics: image_sample_cl with T# MIN_LOD 256 over BASE_LEVEL 1 with S# MAX_LOD 4095, mip filter 1 and LOD bias -128: thread 3 component 0 is 2.000000, expected 1
2/2 Test #1181: agc_driver_image_sample_lod_clamp ...............***Failed    0.59 sec
main, same machine
1180: image sample LOD clamp tests passed
1/1 Test #1180: agc_driver_image_sample_lod_clamp ...   Passed    0.39 sec

Negative control

On the merged tree, with the tie-free test from the diagnosis run, I restored core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp from origin/main and rebuilt.

  • Both entries fail at the prepared-SPIR-V control: a target with the shader clamp does not declare exactly the image's minimum LOD specialization constant.
  • With that control call also skipped, the shader lane still fails on the sampled levels: image_sample_d_cl with T# MIN_LOD 512 over BASE_LEVEL 0 ... thread 0 component 0 is 0.000000, expected 2. The image-view lane passes, as it should.

The test therefore catches a missing shader clamp at run time. I restored every file afterwards.

Findings

Blocking

  1. The new bias case lands exactly on a mip rounding tie, so the test fails on NVIDIA in both lanes. At core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleLodClamp.cpp:283, Case{0x100u, 1u, 0xfffu, 1u, -128} runs Code. Its image_sample_cl and image_sample_l results use integer LODs and integer clamps, and the S# bias is -128/256 = -0.5. Every λ is therefore a half-integer. For thread 3, the explicit LOD is 0, the instruction clamp is 1 and the view clamp is 0, so λ = max(0, 1) − 0.5 = 0.5. Level() (line 98) uses ceil(λ + 0.5) − 1 and expects relative level 0. The Vulkan spec allows ⌈d′ + 0.5⌉ − 1 (preferred) or ⌊d′ + 0.5⌋ (alternative) for VK_SAMPLER_MIPMAP_MODE_NEAREST (Image Level(s) Selection in chapters/textures.adoc). The RTX 4070 Ti SUPER takes the alternative and returns level 1 (absolute 2). This breaks agc_driver_image_sample_lod_clamp, which passes on main, and the new shader-lane entry. Neither failure comes from the driver code: with -96 in place of -128, both entries pass on this GPU.
    Fix: use a bias that keeps λ off .5 for every integer LOD and clamp, such as -96 (verified here) or -64. Alternatively, accept either level when λ is within a small epsilon of a half-integer. The fractional MIN_LOD cases look tie-free, but check them for the same pattern.

Non-blocking

  1. Serialization version 50 also appears in other open PRs. @oneandonlydean and @MarcZX10 already raised this; I have nothing to add.
  2. I checked the parts of the code that stand out, and they look correct:
    • The plan cache key in preparedBindingPlan (Recompiler.cpp) already includes the T# MIN_LOD bits (dwords[1] & ~0xff) and every S# word, so a cached plan cannot reuse a stale clamp.
    • Each compile gets its own variantId, so both target settings can share one process.
    • The filter-mismatch check compares only bit 0 of each filter field, which matches toVkFilter (aniso point is NEAREST, aniso bilinear is LINEAR).
    • shaderImageMinLod is computed after both imageViewMinLod and graphicsPipelineLibrary are final.

Not verified

  • MoltenVK, macOS and the PPSA21564 title results (the title was not launched, as the review rules require).
  • A device that lacks VK_EXT_image_view_min_lod natively. I reached the shader lane only through APS5_NO_IMAGE_VIEW_MIN_LOD=1 and APS5_NO_GPL=1.
  • Graphics-pipeline paths with the shader clamp (only the compute test exercises them), Windows, and lavapipe. Lavapipe may hit the same tie depending on its rounding.

To get this to a good state

  • Move the bias case on line 283 off the rounding tie (for example, -96), or make the expected level tolerant at exact half-integers. Then confirm that both agc_driver_image_sample_lod_clamp entries pass on a non-Apple GPU.

@Gonic0

Gonic0 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @XairRrR, that's right. The Code case with an S# bias of -128 put every explicit LOD on a half-integer, and Vulkan leaves the rounding there to the implementation.

a2ece0bdac changes that case to a bias of -96, the value you verified, which keeps every LOD off a tie. Level() also refuses any expected LOD within 1/512 of a half-integer, so a future case can't land on a tie again. Only the results a case actually checks are computed now, so the gradient-only runs keep their -128, whose λ is a quarter off a tie.

Re-run on MoltenVK: the shader lane passes. NVIDIA and the image-view lane are not re-run here.

AI-assisted: yes

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

a2ece0bdac moves the Code bias case off the nearest-mip rounding tie and makes Level() reject any expected LOD that sits on a tie. Both agc_driver_image_sample_lod_clamp entries now pass on an NVIDIA RTX 4070 Ti SUPER, with no validation errors.

What changed since my last review

  • One new commit, a2ece0bdac ("test(agc): keep the LOD clamp test off nearest-mip rounding ties"). It changes only core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleLodClamp.cpp (+11/−3):
    • The second Code bias case is now Case{0x100u, 1u, 0xfffu, 1u, -96} instead of -128.
    • Level() now Requires that the expected LOD lies more than 1/512 from a half-integer.
    • Check() computes the expected level only for the results a case reads, so the gradient-only runs (one result) keep their -128 bias.
  • Author reply: they agree with the finding and report that the shader lane passes on MoltenVK. They did not re-run NVIDIA or the image-view lane, so I re-ran those here.
  • No production code, build file or description change. main moved to 3f23b35cce in the meantime, and that range touches SpirvImageEmitter.cpp and docs/dev/debt/shader.md. The merge is still clean.

What I ran

  • Head: a2ece0bdac63d6e5b89af7c4bd3f0bfa32b9fb0b
  • main: 3f23b35cce4029d1ef08cf6b69091d96b87fe462
  • Merge of head into main: clean (7757d04229833176b4631d01f6cf239e3519e067). A merge preview against the newer main b433c40f2f, which landed during the run, is also clean.
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), Release, Ninja.
git diff --check origin/main...pr-head
python3 tools/check_conventions.py --base 3f23b35cce
cmake --build build -j10
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -V -R agc_driver_image_sample_lod_clamp
ctest --test-dir build -j4 --output-on-failure -R '^(request_serializer|agc_shader_memory|agc_shader_disk_cache|agc_driver_graphics)$'
# negative control 1: SpirvImageEmitter.cpp from main, rebuild the test target, rerun both entries
# negative control 2: PR code, but the Code bias case set back to -128, rebuild, rerun both entries
git merge-tree --write-tree b433c40f2f pr-head
Check Result
Merge with main Clean
git diff --check Clean
check_conventions.py All conventions checks passed.
Full build (merged tree) Passed
agc_driver_image_sample_lod_clamp (image-view lane) Passed (0.39 s), image sample LOD clamp tests passed in the image-view lane
agc_driver_image_sample_lod_clamp_shader_lane Passed (0.53 s), image sample LOD clamp tests passed in the shader-clamp lane
Validation layer Insert instance layer "VK_LAYER_KHRONOS_validation" in both runs. No was not found but was requested by env var VK_INSTANCE_LAYERS. 0 VUID- lines
request_serializer, agc_shader_memory, agc_shader_disk_cache, agc_driver_graphics 4/4 passed

I did not rerun main with the validation layer this time. The merged-tree log has no VUID- lines, so the change cannot add any, and my previous review already recorded the main baseline.

Negative control

  1. With SpirvImageEmitter.cpp restored from main (the rest of the PR kept), both entries fail: a target with the shader clamp does not declare exactly the image's minimum LOD specialization constant.
  2. With all PR code in place and only the bias case set back to -128, both entries fail on the new guard before any GPU comparison: image sample LOD clamp: an expected LOD of 0.500000 sits on a nearest-mip rounding tie, which Vulkan leaves to the implementation. The guard therefore catches the case that failed in my last review.

Restoring every production file from main at once does not work as a control: the test no longer compiles, because PipelineSpecialization::MinLodBase and SpirvTarget::shaderImageMinLod are missing. All files were restored afterwards.

Previous findings

  • Blocking 1 (bias case on a rounding tie fails on NVIDIA): Resolved. The case now uses -96. With it, an explicit λ has a fractional part of .625 and the sampled λ .375, both 1/8 from a tie. Both entries pass here, and the new guard rejects the old value (control 2).
  • Non-blocking 1 (serialization version 50 shared with other open PRs): Still open, unchanged. main is still at 49, so it only needs attention at rebase time.
  • Non-blocking 2 (the cache-key, variantId, filter-bit and shaderImageMinLod ordering checks): No longer applies. No production code changed.

New findings

Blocking

None.

Non-blocking

  1. ImageSampleLodClamp.cpp:182: the tie margin of 1/512 is finer than Vulkan's minimum mipmapPrecisionBits of 4. An implementation may snap λ to 1/16 steps before it selects a level, so a future case within 1/32 of a tie could still round either way. Every current case is at least 1/8 away, so nothing fails today. Consider a margin of 1/16 so the guard covers every conformant device.

Not verified

  • MoltenVK and macOS (author-reported pass of the shader lane on a2ece0bdac), Windows and lavapipe.
  • A device without VK_EXT_image_view_min_lod natively. I reached the shader lane only through the _shader_lane entry (APS5_NO_IMAGE_VIEW_MIN_LOD=1, APS5_NO_GPL=1).
  • The PPSA21564 result (the title was not launched, as the review rules require).

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The latest change corrects the test inputs that landed on implementation-dependent nearest-mip ties. The production change is unchanged from the implementation I reviewed previously, and the author and an independent reviewer report the adjusted shader-lane test passes on this exact head.

What I ran

  • Reviewed exact head a2ece0b; the delta since my prior approval is confined to ImageSampleLodClamp.cpp.
  • Ran git merge-tree --write-tree against current main 52c09d5 and git diff --check.
  • Inspected the updated Level() guard, the -96 bias case, and the changed expected-level selection.
  • I did not run the Vulkan test locally.

Results

Check Result
Current-main merge preview Clean
git diff --check Pass
Exact-head test evidence Author and XairRrR report the MoltenVK shader-lane test passes; XairRrR also reports both GPU LOD tests pass on NVIDIA without validation errors
Hosted checks Windows, relinker matrix, ASan, conventions, eligibility, labels, and report pass; macOS x86_64 relinker is pending; Linux, register-context, and write-watch jobs are skipped

Negative control

  • Not run on the latest test-only head. The prior review recorded mutation evidence for the unchanged production path; I am not presenting that as a fresh run.

Findings

No blocking issue found in this exact diff. The test now rejects expected LODs near half-integers, moves the Code case to a bias whose checked LODs are not ties, and computes expected levels only for results the case actually checks.

The console behavior and image-view lane remain unverified as recorded in the PR. The serializer-version coordination with other open PRs also remains a rebase-time integration task.

Sources

Not verified

  • I did not run the Vulkan test locally, validate on console hardware, or run Linux/lavapipe or the image-view lane.
  • The report about NVIDIA validation is from the independent reviewer; I did not reproduce it.

To get this to a good state

No further change is required for the findings in this review. Rebase and resolve the serializer-version coordination if another competing version-50 PR lands first.

@MarcZX10

Copy link
Copy Markdown
Contributor

Source correction — review link fixed

The independent NVIDIA result cited in my approval is XairRrR’s exact-head review at the corrected URL below. The review itself approves head a2ece0b.

What I checked

  • Verified the review through GitHub’s pull request reviews API, including its author, state, commit, and canonical HTML URL.

Sources

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@Gonic0 thanks. The new checks answer the earlier concern: the shader clamp is now refused wherever it couldn't match the view clamp (MAX_LOD below the clamp, table samplers, image_get_lod, gathers, differing filters, biased explicit LODs, and the emulated depth-compare and 11:11:10 samples). APS5_NO_IMAGE_VIEW_MIN_LOD also lets extension hardware run the fallback lane.

Two things before this can merge:

  1. It now conflicts with main in core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp. Could you merge current main and keep both sides' test changes?
  2. The request serialization version 50 is also taken by open fix(agc): prefer host interpolation on RADV to avoid the quad seam #10547, fix(shader): declare f16 and f64 DenormPreserve together when their modes are shared #11483 and fix(agc): span table-reading wave64 programs by default on Intel drivers that share handles across fused threads #10846, which all bump main's 49 to 50. If this one lands first, keep 50. Otherwise take the next number none of them uses, and update RequestSerializerTests to match.

@adriadam10 FYI, as the assignee.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed exact head a2ece0bdac63d6e5b89af7c4bd3f0bfa32b9fb0b after the new integration comment. The reported current-main conflict in core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp reproduces in my merge preview. Please merge current main and retain both test changes. The request-serialization version also needs coordination with the open #10547, #11483, and #10846 work: record the agreed landing order, allocate the next unused version if needed, and update the serializer tests. The earlier shader-lane evidence remains useful, but I cannot keep approval while these integration points are unresolved. I did not run GPU tests locally.

@Gonic0

Gonic0 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @oneandonlydean and @MarcZX10. Merged current main in 9d6ffe5ed2:

request_serializer_tests and the 20 agc_shader_memory_tests CTest entries pass on the merge (Apple M5 Pro, macOS 27.2, x86-64 under Rosetta 2). check_conventions.py passes.

#12790 (image_gather4_l at its LOD) conflicts with this PR in PipelineSpecialization.hpp, and both read a T# MIN_LOD for gathers. Whichever lands second can resolve that. If #12790 lands, the gather rejection here could be narrowed for the path it covers, in a follow-up.

AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, baseline evidence still needed

The new lavapipe report says the shader-lane test passes on bb9fae9d5d8b0b8024c34840bb4c40e68530eed2, but the required matched run against current main is not documented and Linux CI is skipped.

Please run agc_driver_image_sample_lod_clamp and agc_driver_image_sample_lod_clamp_shader_lane on current main (ddd99fdadb399867211fc1c33fed62e5a4b73d9f) and this PR head on the same lavapipe machine, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Include the exact commands and logs, confirm the requested validation layer was loaded, and compare the logs for new VUID- errors. I have not built or run these GPU tests locally.

@RNK123

RNK123 commented Nov 1, 2026

Copy link
Copy Markdown

Linux / AMD RDNA 4 (RADV) paired validation run for current head d6b9dd6ebac3 merged cleanly onto main 53fbe59956, covering the requested physical Linux matched runs for agc_driver_image_sample_lod_clamp and the new agc_driver_image_sample_lod_clamp_shader_lane.

Host & GPU: CachyOS Linux (7.3.1-1-cachyos), 12th Gen Intel Core i5-12400F, GCC 16.2.1 (Release, -DBUILD_TESTING=ON), AMD Radeon RX 9060 XT (1002:7590, RADV GFX1200, Mesa 26.2.5-1, Vulkan 1.4.354, subgroup 64), Khronos validation layer 1.4.363.

Environment: ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest --repeat until-fail:3 -V across the 4 focused CTest entries (agc_driver_image_sample_lod_clamp, agc_driver_image_sample_lod_clamp_shader_lane, request_serializer, agc_shader_memory). VK_LOADER_DEBUG=layer confirmed Insert instance layer "VK_LAYER_KHRONOS_validation", and neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS.

Test main (53fbe59956) 3 serial runs main + #12662 (d6b9dd6ebac3) 3 serial runs
agc_driver_image_sample_lod_clamp (hardware view clamp) Pass 3/3 (0.09 s, 0.09 s, 0.09 s) Pass 3/3 (0.17 s, 0.16 s, 0.16 s)
agc_driver_image_sample_lod_clamp_shader_lane (fallback shader clamp) (new test) Pass 3/3 (0.24 s, 0.16 s, 0.17 s)
agc_shader_memory Pass 3/3 (0.41 s, 0.40 s, 0.40 s) Pass 3/3 (0.50 s, 0.52 s, 0.48 s)
request_serializer Pass 3/3 (0.01 s, 0.01 s, 0.01 s) Pass 3/3 (0.01 s, 0.01 s, 0.01 s)
  • Result: 4/4 passed (3/3 each), 0 skipped, 0 failed.
  • Vulkan validation: 0 VUID- or SYNC-HAZARD- diagnostics on main and 0 on the merged candidate (0 new).

AI-assisted hardware test run (Antigravity).

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head d6b9dd6 merged onto main 3741ca9 · tested 2026-11-01 08:26 UTC · 28 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,474 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 44 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,524 of 3,121 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (931 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 57.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.6 s
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)
agc_driver_depth_clear_hle: VUID-vkCmdCopyBuffer-commonparent (6x)
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 2 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_image_sample_lod_clamp_shader_lane
Validation IDs already present on main (5 IDs in 480 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (480 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 472 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (44)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fresh: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_f
Reproduce
git fetch origin d6b9dd6ebac3d1229cc7d2f9655edaeffac0a9c6 3741ca9327246d0df81638726a986cef862b6db5
git checkout 3741ca9327246d0df81638726a986cef862b6db5 && git merge --no-ff d6b9dd6ebac3d1229cc7d2f9655edaeffac0a9c6
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated 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.

slopradish added a commit to slopradish/AnyPS5 that referenced this pull request Nov 2, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@Gonic0
Gonic0 force-pushed the fix/agc-shader-min-lod-clamp branch from d6b9dd6 to 606b74b Compare November 2, 2026 13:12
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
…age_view_min_lod

MoltenVK has no VK_EXT_image_view_min_lod, so since boykopovar#130 the first T#
with a MIN_LOD clamp above its base level threw. ASTRO BOT (PPSA21564
01.007.000) hits it on the title screen, about four minutes after boot.
MoltenVK does offer shaderResourceMinLod, which maps the SPIR-V MinLod
operand to Metal's min_lod_clamp.

On a device with shaderResourceMinLod, without the extension and
without graphics pipeline libraries, the new target flag
shaderImageMinLod moves the clamp into the shader:

- DescriptorBindingBuilder writes each direct image's clamp, relative
  to the view's base level and bounded by its last level and MAX_MIP,
  as a float specialization constant at MinLodBase + image.
- Samples of direct images take it as the MinLod operand, or as an FMax
  on an explicit LOD when the clamp is above 0, combined with an
  instruction's _cl clamp.
- The image view no longer chains the clamp there; image table entries
  with a clamp are still rejected, and devices with the extension are
  unaffected. APS5_NO_IMAGE_VIEW_MIN_LOD forces the shader lane.
- It throws when the clamp sits above a paired S#'s MAX_LOD or has no
  mip filter, follows an explicit LOD or gradient with a nonzero S# LOD
  bias, pairs with a run-time S# or different min and mag filters, or
  meets image_get_lod, gathers at a clamp of a level or more, or the
  emulated depth-compare or 11:11:10 sample.
- ValidateShaders accepts CapabilityMinLod when the device enables
  shaderResourceMinLod.
- The flag is written after hostInterpolationFirst as request
  serialization version 53; older versions read it as false.

The gaps, including llvmpipe applying the S# bias after the clamp, are
recorded in docs/dev/debt/shader.md.

Tested on an M-series Mac (MoltenVK 1.4.2, x86_64 under Rosetta):
image_sample_lod_clamp samples a T# with fractional and level clamps
over BASE_LEVEL 0 and 1 in both lanes, and fails without the shader
clamp or with an absolute one; graphics, shader disk cache, shader
memory and request serializer tests pass. PPSA21564 renders the title
and reaches the warp sequence after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gonic0
Gonic0 force-pushed the fix/agc-shader-min-lod-clamp branch from 606b74b to fe18496 Compare November 2, 2026 14:59
@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 2, 2026
Raghav314 added a commit to Raghav314/AnyPS5 that referenced this pull request Nov 2, 2026
Version 53 is taken by boykopovar#12662 (and boykopovar#12980 on top of it) and boykopovar#11551 takes 54, so the heap profile tail moves to 55: it is read at version 55 and later, versions 52 to 54 default it, and the byte-exact fixtures follow.
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head fe18496 merged onto main 1d91f29 · tested 2026-11-02 16:51 UTC · 35 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,678 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,729 of 3,544 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (985 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.5 s, ⚠️ public_headers 30.3 s, ⚠️ agc_driver_graphics 30.1 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 10 main runs
agc_submit_progress: failed in 8 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 7 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_image_sample_lod_clamp_shader_lane
Validation IDs already present on main (4 IDs in 510 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (510 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 502 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin fe18496c95ae0b0f03c6956b8b77649c679314f0 1d91f2966d0eef82a021628a7aa8e78e615ac807
git checkout 1d91f2966d0eef82a021628a7aa8e78e615ac807 && git merge --no-ff fe18496c95ae0b0f03c6956b8b77649c679314f0
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated 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.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The branch is now one squashed commit (fe18496c95) on current main. It moves request serialization to version 53 and the specialization IDs to MinLodBase = 57600. It no longer rejects an S# bias on implicit or gradient samples, recorded as debt, and it skips on devices that have neither lane. On lavapipe the shader lane passes with no validation errors, and the negative control fails.

What changed since my last review

  • The PR is rewritten as one commit on main 0278ca9831. Compared with 9d6ffe5ed2, these are the changes:
    • Request serialization moves to version 53, written after hostInterpolationFirst. main already writes 52 and rejects 50, so the version-50 plan no longer applies. RequestSerializerTests covers the version 53 field both ways and reads 52 as false. It also moves every tail offset by one.
    • Specialization IDs: MinLodBase is 57600. That is directly after MirrorUnnormalizedBase (57536, which takes up to 32 samplers). MinLodBase + 64 images stays below ImageComponentBase (65536), so the IDs don't overlap.
    • S# bias on implicit or gradient samples is accepted again, as in 22cc617ebe/bb9fae9d5d from the discussion. Only the bias on an explicit LOD is rejected (DescriptorBindingBuilder.cpp:228). The llvmpipe ordering difference is now recorded in docs/dev/debt/shader.md. The three gradient and implicit bias cases that fail on llvmpipe run only in the image-view lane (ImageSampleLodClamp.cpp:305-307).
    • Skips: the test exits 77 when the device has neither lane, and the _shader_lane entry exits 77 when the forced environment doesn't produce the shader lane (ImageSampleLodClamp.cpp:294-301).
  • The description and checklist were updated to match: Depends on: none, version 53.

What I ran

Head fe18496c95ae0b0f03c6956b8b77649c679314f0, main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8, merged tree e1be4dac1100e7bdaa6b503e2a400b0356ad6b9f. Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19): no VK_EXT_image_view_min_lod, graphics pipeline libraries on.

git diff --check a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8...fe18496c95ae0b0f03c6956b8b77649c679314f0
python3 tools/check_conventions.py --base a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -j4 --test-load 8 --output-on-failure \
  -R '^(agc_driver_image_sample_lod_clamp|agc_driver_image_sample_lod_clamp_shader_lane|request_serializer|agc_shader_memory|agc_shader_disk_cache|agc_driver_graphics)$'
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -V -R '^agc_driver_image_sample_lod_clamp(_shader_lane)?$'
# negative control
git show a4eca2a056:core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp > core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
ninja -C build -j8 -l8 agc_driver_image_sample_lod_clamp_tests
ctest --test-dir build --output-on-failure -R '^agc_driver_image_sample_lod_clamp_shader_lane$'
git show e1be4dac11:core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp > core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
ninja -C build -j8 -l8 agc_driver_image_sample_lod_clamp_tests
git status --porcelain
Check Result
git diff --check Clean
check_conventions.py All conventions checks passed.
Build (script) Passed; 0 new failures, 0 timeouts among 2137 selected tests. 7 known main failures, and 2 main_sync_renames_* tests that fail on main now pass.
agc_driver_image_sample_lod_clamp_shader_lane Passed (4.5 s): image sample LOD clamp tests passed in the shader-clamp lane
agc_driver_image_sample_lod_clamp Skipped (77): skipped, the device has no VK_EXT_image_view_min_lod, and graphics pipeline libraries keep T# minimum LODs out of the shader. check_skips.py accepts it.
request_serializer, agc_shader_memory, agc_shader_disk_cache, agc_driver_graphics 4/4 passed
Validation layer Insert instance layer "VK_LAYER_KHRONOS_validation" in both tests. No was not found but was requested, 0 VUID- lines.
Worktree after the control git status --porcelain empty

Negative control

I restored SpirvImageEmitter.cpp from main and kept the rest of the merged tree, which leaves the target flag and the specialization values without the shader clamp. agc_driver_image_sample_lod_clamp_shader_lane then fails with a target with the shader clamp does not declare exactly the image's minimum LOD specialization constant. With the merged file restored, it passes again.

Previous findings

  • Serialization version 50 shared with #10547, #11483 and #10846: no longer applies. main now writes 52 and rejects 50, and this PR takes 53, the next free number (RequestSerializer.cpp, WriteU32(53u), and the version >= 53u read). request_serializer and agc_shader_memory pass.
  • The 1/512 tie margin in ImageSampleLodClamp.cpp:190 is finer than the minimum mipmapPrecisionBits of 4: still open, non-blocking. The code is unchanged. Every current case still sits at least 1/8 away from a tie, so nothing fails today. A 1/16 margin would hold on any conformant device.

New findings

Blocking

None.

Non-blocking

None. The S# bias on implicit and gradient samples (DescriptorBindingBuilder.cpp:228 rejects only explicit LODs) follows the Vulkan order: the sampler bias comes first, then the MinLod and maxLod clamp. llvmpipe differs from that order, and the debt entry records it. On lavapipe the bias cases that depend on this run only in the image-view lane, so CI does not depend on llvmpipe's ordering.

Not verified

  • The image-view lane: this lavapipe device has no VK_EXT_image_view_min_lod, so agc_driver_image_sample_lod_clamp skipped. The RADV and NVIDIA reports in the discussion cover that lane.
  • No validation comparison against main: the script's baseline has no validation run yet, and the shader-lane test does not exist on main. The merged-tree run has no VUID- lines.
  • agc_driver_graphics took 34.7 s here, running in parallel with other tests. This PR only adds one small capability-validation block to that test (Graphics.cpp). The NVIDIA report from the discussion lists the same test at about 30 s, so I don't count the time against this PR, but I did not time it on main.
  • MoltenVK, Windows, and the PPSA21564 run are author-reported only.

@oneandonlydean oneandonlydean closed this pull request by merging all changes into boykopovar:main in a5c53e9 Nov 2, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head fe18496 merged onto main a4eca2a · tested 2026-11-02 22:35 UTC · 44 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,672 passed · 13 failed (0 new, 12 also fail on main, 1 unstable on main) · 54 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,739 of 3,591 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (979 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ agc_driver_graphics 92.9 s, ⚠️ public_headers 61.9 s, ⚠️ unwrap_self 43.7 s, ⚠️ agc_driver_image_sample_unnormalized 36.0 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 6 main runs
Failing on main too (12, not counted against this PR)
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_idle_publish_wait
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_image_sample_lod_clamp_shader_lane
guest_job_manager_worker_spin
Validation IDs already present on main (4 IDs in 513 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (513 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 505 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
Skipped (54)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferr
Reproduce
git fetch origin fe18496c95ae0b0f03c6956b8b77649c679314f0 a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8
git checkout a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 && git merge --no-ff fe18496c95ae0b0f03c6956b8b77649c679314f0
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants