docs(contributing): check that the validation layer loaded with VK_LOADER_DEBUG=layer #17896

Merged
milescoviello merged 2 commits from upstream-pr/17896 into main 2026-11-12 08:52:47 +00:00
milescoviello commented 2026-11-09 21:09:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-11-09T21:09:16Z.


What

CONTRIBUTING.md asks AGC, shader recompiler and VideoOut changes to "confirm neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS". In AnyPS5's test programs that line never appears unless VK_LOADER_DEBUG is set, even when the layer is missing. So a log without it doesn't show the layer ran.

The loader prints its messages through a debug messenger or VK_LOADER_DEBUG. vulkaninfo registers a messenger, which is why it shows the error. The test programs register none.

Measured with agc_driver_stencil_copy_draw_tests on Linux (Ubuntu 26.04, NVIDIA 615.71.09, loader 1.4.341), with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1:

VK_LAYER_PATH VK_LOADER_DEBUG exit "was not found but was requested" lines Insert instance layer "VK_LAYER_KHRONOS_validation" lines
a directory without the layer unset 0 0 0
the Khronos layer's directory unset 0 0 0
a directory without the layer layer 0 4 0
the Khronos layer's directory layer 0 0 2

Without VK_LOADER_DEBUG the first two runs can't be told apart: the test passes with no validation at all, and the log looks like a clean validated run.

This changes the rule to set VK_LOADER_DEBUG=layer and to confirm the Insert instance layer "VK_LAYER_KHRONOS_validation" line, as well as the absence of the "was not found" one. tools/vulkan_validation_gate.py already does exactly this: it sets VK_LOADER_DEBUG=layer (line 16) and fails a run without the Insert instance layer line (lines 21 and 212). This brings the manual rule in line with the tool.

How

Changed: CONTRIBUTING.md line 74, the validation requirement: one variable added to the list, and one confirmation added with its reason. No code change.

Tested

Docs only. The table above is the measurement behind the change. tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py --branch finds two open pull requests on the same lines:

  • #17699 appends a sentence on the minimum layer version to the end of this same line 74. The two changes touch different parts of the line, so whichever lands second keeps both. The layer used for the table, 1.4.341, meets its minimum.
  • #14036 changes the perf rule on line 73, next to it.

#14212 could not be compared because it conflicts with main.

I found this when my own validation runs pointed at a layer directory that no longer existed and still produced logs without the "was not found" line. My scripts now use VK_LOADER_DEBUG=layer, and I'm re-running the runs my pull requests cite.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #17699 (tablefrogpillow, opened first) edits the same CONTRIBUTING.md line to add the minimum validation-layer version. This one goes after it; I'll merge main into this branch once it lands and keep both additions.
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (docs only; the measurement above is on NVIDIA GeForce RTX 4070 Ti, driver 615.71.09, Ubuntu 26.04)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5231227899 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17896). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-11-09T21:09:16Z. --- ### What `CONTRIBUTING.md` asks AGC, shader recompiler and VideoOut changes to "confirm neither log reports `was not found but was requested by env var VK_INSTANCE_LAYERS`". In AnyPS5's test programs that line never appears unless `VK_LOADER_DEBUG` is set, even when the layer is missing. So a log without it doesn't show the layer ran. The loader prints its messages through a debug messenger or `VK_LOADER_DEBUG`. `vulkaninfo` registers a messenger, which is why it shows the error. The test programs register none. Measured with `agc_driver_stencil_copy_draw_tests` on Linux (Ubuntu 26.04, NVIDIA 615.71.09, loader 1.4.341), with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1`: | `VK_LAYER_PATH` | `VK_LOADER_DEBUG` | exit | "was not found but was requested" lines | `Insert instance layer "VK_LAYER_KHRONOS_validation"` lines | |---|---|---|---|---| | a directory without the layer | unset | 0 | 0 | 0 | | the Khronos layer's directory | unset | 0 | 0 | 0 | | a directory without the layer | `layer` | 0 | 4 | 0 | | the Khronos layer's directory | `layer` | 0 | 0 | 2 | Without `VK_LOADER_DEBUG` the first two runs can't be told apart: the test passes with no validation at all, and the log looks like a clean validated run. This changes the rule to set `VK_LOADER_DEBUG=layer` and to confirm the `Insert instance layer "VK_LAYER_KHRONOS_validation"` line, as well as the absence of the "was not found" one. `tools/vulkan_validation_gate.py` already does exactly this: it sets `VK_LOADER_DEBUG=layer` (line 16) and fails a run without the `Insert instance layer` line (lines 21 and 212). This brings the manual rule in line with the tool. ### How Changed: `CONTRIBUTING.md` line 74, the validation requirement: one variable added to the list, and one confirmation added with its reason. No code change. ### Tested Docs only. The table above is the measurement behind the change. `tools/check_conventions.py --base upstream/main` passes. `tools/pr_overlap.py --branch` finds two open pull requests on the same lines: - #17699 appends a sentence on the minimum layer version to the end of this same line 74. The two changes touch different parts of the line, so whichever lands second keeps both. The layer used for the table, 1.4.341, meets its minimum. - #14036 changes the perf rule on line 73, next to it. #14212 could not be compared because it conflicts with `main`. I found this when my own validation runs pointed at a layer directory that no longer existed and still produced logs without the "was not found" line. My scripts now use `VK_LOADER_DEBUG=layer`, and I'm re-running the runs my pull requests cite. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #17699 (tablefrogpillow, opened first) edits the same `CONTRIBUTING.md` line to add the minimum validation-layer version. This one goes after it; I'll merge `main` into this branch once it lands and keep both additions. - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (docs only; the measurement above is on NVIDIA GeForce RTX 4070 Ti, driver 615.71.09, Ubuntu 26.04) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gabichuuuuu commented 2026-11-10 17:49:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:49:43Z.

Review: COMMENTED


Read e14ee73dd0 against main.

Correctness. tools/vulkan_validation_gate.py on main already sets VK_LOADER_DEBUG=layer (line 16) and requires the Insert instance layer "VK_LAYER_KHRONOS_validation" line (INSERTED_LAYER, line 21, checked around line 212), and docs/dev/BUILD.md:196 documents the same. The new CONTRIBUTING.md text matches that, and the phrase it quotes is the one the tool searches for. A grep of core/libs/prx/libSceAgcDriver and core/libs/prx/libSceVideoOut finds no debug messenger registration, consistent with the claim that the loader prints these lines only under VK_LOADER_DEBUG. The measured table in the description cannot be reproduced from reading.

Non-blocking. AGENTS.md:15 states the same rule (VK_INSTANCE_LAYERS, "was not found ...") and is not updated, so the two files now disagree on whether VK_LOADER_DEBUG=layer is needed. The CONTRIBUTING.md line it edits is also edited by #17699, so the two will conflict.

Not run here; this is from reading the code.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5846662477 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17896#pullrequestreview-5846662477). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-10T17:49:43Z. **Review:** COMMENTED --- Read `e14ee73dd0` against `main`. **Correctness.** `tools/vulkan_validation_gate.py` on main already sets `VK_LOADER_DEBUG=layer` (line 16) and requires the `Insert instance layer "VK_LAYER_KHRONOS_validation"` line (`INSERTED_LAYER`, line 21, checked around line 212), and `docs/dev/BUILD.md:196` documents the same. The new `CONTRIBUTING.md` text matches that, and the phrase it quotes is the one the tool searches for. A grep of `core/libs/prx/libSceAgcDriver` and `core/libs/prx/libSceVideoOut` finds no debug messenger registration, consistent with the claim that the loader prints these lines only under `VK_LOADER_DEBUG`. The measured table in the description cannot be reproduced from reading. **Non-blocking.** `AGENTS.md:15` states the same rule (`VK_INSTANCE_LAYERS`, "was not found ...") and is not updated, so the two files now disagree on whether `VK_LOADER_DEBUG=layer` is needed. The `CONTRIBUTING.md` line it edits is also edited by #17699, so the two will conflict. Not run here; this is from reading the code. AI-assisted: yes.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17896
No description provided.