Repository navigation
docs: require Vulkan validation layer for AGC, shader and VideoOut tests - #7367
Merged
oneandonlydean merged 1 commit intoOct 19, 2026
Merged
Conversation
hamb3r
force-pushed
the
docs/vulkan-validation-rules
branch
from
October 18, 2026 02:48
c822c13 to
557c950
Compare
|
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.
|
hamb3r
force-pushed
the
docs/vulkan-validation-rules
branch
from
October 18, 2026 19:16
557c950 to
53f69aa
Compare
Collaborator
|
Thanks, we'd like to adopt this. Two small changes before merge:
|
hamb3r
force-pushed
the
docs/vulkan-validation-rules
branch
from
October 19, 2026 07:16
53f69aa to
97cf551
Compare
Contributor
Author
|
@oneandonlydean Updated!
|
Collaborator
|
Thanks @hamb3r, both points are in exactly as asked: the check for the loader's "not found" line catches a missing layer, and comparing against main on the same machine and GPU makes the rule workable on tests that already log validation errors. We'll run CI on this head and merge once it's green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Document the required local test command and validation rules for AGC driver, shader recompiler, and VideoOut changes in
CONTRIBUTING.mdandAGENTS.md:Motivation (recent cases caught during review)
Recent reviews revealed multiple instances where tests passed their assertions and CTest reported
Passed, but underlying Vulkan/SPIR-V specification violations were present and only surfaced when reviewers manually attached the validation layer with verbose logging:FetchShaderemittedCapabilityImageMSArrayfor a sampled image (Sampled == 1), violating the SPIR-V specification and triggeringVUID-VkShaderModuleCreateInfo-pCode-08740. The test process exited with code0, giving a false impression that the implementation conformed to standards.VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT(VUID-vkBeginCommandBuffer-commandBuffer-00050), passing assertions onmainuntil explicitly tested under the layer.agc_driver_pixel_barycentric_emulationpassed all image readback assertions while emitting fiveVUID-RuntimeSpirv-OpVariable-08746errors per run due to a vertex/tessellation BuiltIn block mismatch.Documenting this workflow in
CONTRIBUTING.mdandAGENTS.mdensures contributors and AI agents validate their changes proactively before opening PRs, saving reviewer round-trips.Why this specific workflow is required (and why standard
ctestruns miss regressions)ctest -Vis required because validation errors do not fail the process exit code:Production GPU drivers frequently accept invalid SPIR-V or out-of-spec Vulkan API usage silently and return exit code
0. Even withVK_LAYER_KHRONOS_validationenabled, the layer printsVUID-errors tostdout/stderrwithout aborting the process. Because the test binary still exits with0,ctestreportsPassed, andctest --output-on-failuresuppresses the entire output log. Both human contributors and AI agents see a green test result whileVUID-errors remain hidden unless-V(--verbose) is passed and the log is explicitly checked.ANYPS5_NO_SHADER_CACHE=1prevents false passes from cached shaders:Without disabling the on-disk shader cache, runtime tests can load previously compiled SPIR-V binaries from earlier runs instead of exercising and validating the newly modified shader recompiler paths.
ANYPS5_REQUIRE_VULKAN=1prevents silent test skipping:Ensures the test fails explicitly if Vulkan or the requested layer fails to initialize rather than skipping silently.
Why this is enforced via
CONTRIBUTING.md/AGENTS.mdand environment variables rather than hardcoded in CMake or CIDevelopers working on
relinker,libkernel, audio, input, or networking typically have standard GPU drivers installed withoutVK_LAYER_KHRONOS_validation. HardcodingVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationintoCMakeLists.txttest properties by default would cause tests to fail withVK_ERROR_LAYER_NOT_PRESENTon machines without the validation layers installed.Adding a CMake build option (e.g.
-DANYPS5_ENABLE_VULKAN_VALIDATION=ON) would require reconfiguring and rebuilding targets when switching between normal performance runs and validation runs. Using environment variables matches the existingAnyPS5runtime configuration design (ANYPS5_REQUIRE_VULKAN,ANYPS5_NO_SHADER_CACHE).CI runs GPU tests in parallel on software
lavapipewithout a shader cache under a strict 30-second per-test budget, where enabling heavy runtime validation across all tests risks timeouts and would fail on unrelated pre-existing upstream VUIDs. Requiring focused-Vvalidation runs on the touched tests for AGC, shader recompiler, and VideoOut PRs catches regressions at the source without slowing down CI or breaking non-GPU workflows.Tested
Verified
python3 tools/check_conventions.py --base origin/mainpasses on Windows 10 Pro.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)