Skip to content

feat(libSceVideoOut): stub unimplemented sceVideoOutSetColorimetry export - #14506

Closed
slopgobblercobbler wants to merge 1 commit into
boykopovar:mainfrom
slopgobblercobbler:test/videoout-colorimetry-bounds
Closed

slopgobblercobbler wants to merge 1 commit into
boykopovar:mainfrom
slopgobblercobbler:test/videoout-colorimetry-bounds

Conversation

@slopgobblercobbler

@slopgobblercobbler slopgobblercobbler commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Stub unimplemented sceVideoOutSetColorimetry export with NotImplemented_nid_no_patch(__func__) in core/libs/prx/libSceVideoOut/src/Output.cpp, declared in core/libs/prx/libSceVideoOut/include/Output.hpp, and record unknown function details in docs/dev/debt/libSceVideoOut.md.

Tested

python tools/check_conventions.py --base upstream/main passed with 0 errors.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

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 4040 core/libs/prx/libSceVideoOut/src/Output.cpp
PR 24649 core/libs/prx/libSceVideoOut/src/Output.cpp

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Progress report (c3a8236 → 1c2ca4a)

📉 System libraries: 44.7% (-0.0011%, +1 declared function)

🆕 1 declared as stubs
Library Name
libSceVideoOut sceVideoOutSetColorimetry

Changed libraries (implemented exports)

Library Before After Change
libSceVideoOut 76/290 (26.21%) 76/291 (26.12%) -0.09%

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the handle checks; they follow the file's existing conventions. The problem is that sceVideoOutSetColorimetry does not exist on main in any form, so this PR adds a new export whose whole contract comes from the PR, without a source:

  1. The signature (int handle, uint32_t colorimetry) (core/libs/prx/libSceVideoOut/include/Output.hpp:38), the valid range colorimetry <= 1 (core/libs/prx/libSceVideoOut/src/Output.cpp:486) and the return of 0 with nothing done (lines 489-490) are not backed by an SDK header, disassembly, a title call site or a measurement. CONTRIBUTING.md line 9 says a signature or behaviour taken from call sites or disassembly follows the reverse-engineering guide, and docs/dev/REVERSE_ENGINEERING.md lines 80-86 list what to cite. Please cite where the signature and the 0/1 values come from and say what the call does on the console.

  2. Accepting the call and doing nothing makes this a silent stub. CONTRIBUTING.md line 7 says every function does exactly what it is supposed to or throws, and line 10 allows a silent stub only when it unblocks a title and only affects the UI, listed under Silent stubs in docs/dev/debt/libSceVideoOut.md. Colorimetry changes what the display is told about the signal, so it is not UI-only, and the PR names no title and adds no debt entry. Until the behaviour is known, please leave the export unimplemented (NotImplemented_nid_no_patch), or implement the actual colorimetry state and test its effect rather than only the return code.

  3. The new ExpectFailure cases for colorimetry == 2 in core/libs/tests/GuestVideoOutColorSpace.cpp (lines 63, 64 and 81) pin the unsourced range and should go with it. Please also say in the PR text whether the test was built and run, and on which platform.

Reviewed at a2c4585113.

@github-actions github-actions Bot added the prx label Nov 1, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a2c4585 merged onto main f2d874c · tested 2026-11-02 00:02 UTC · 15 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 ✅ 878 passed · 3 failed (0 new, 2 also fail on main, 1 unstable on main) · 0 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 881 of 3,168 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 (429 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_lookup_log_fits_build 39.8 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 1 of the last 10 main runs
Failing on main too (2, not counted against this PR)
agc_driver_dcc_keys_first_write
agc_driver_image_table
Validation IDs already present on main (5 IDs in 368 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (368 tests): 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, agc_driver_bindless_images, and 360 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
Reproduce
git fetch origin a2c45851132bb507909331197181a1b193e44f8f f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff a2c45851132bb507909331197181a1b193e44f8f
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.

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

Changes requested — the new setter is a silent stub that is not listed in the debt file

sceVideoOutSetColorimetry is new in this PR. After its two argument checks it does nothing and returns 0 (core/libs/prx/libSceVideoOut/src/Output.cpp, the function's body ends with (void)colorimetry; and return 0;). CONTRIBUTING says a silent stub is allowed only when it unblocks a title and only affects the UI, and that it must be listed under Silent stubs in its library's debt file. docs/dev/debt/libSceVideoOut.md has that section, but this PR adds no entry to it, although the PR's checklist ticks the box. Please add the entry, or make the function do its job, and correct the checklist.

What I ran

  • Head a2c45851132bb507909331197181a1b193e44f8f; base f2d874c1fdccf781c0fa5d86619bb5dd8894b958. 4 files: Output.hpp (declaration), Output.cpp (the function), the new GuestVideoOutColorSpace.cpp test and the CMake registration (libSceVideoOut/CMakeLists.txt line 287).
  • Read the function body, the debt file's section headings (### Silent stubs at line 3), CONTRIBUTING's silent-stub rule and the PR body.
  • Read-only checks from the trusted main checkout (precheck not run: this session does not run code from PR heads): diff check and conventions passed; the ABI audit reported passed_with_warnings with 22 findings, mostly "definition-not-found" entries for existing symbols.
  • Hosted: windows passed (2594 cases); the new test guest_video_out_color_space was Skipped in that run.
  • No MarcZX10 review at this head.

Results

Check Result Note
Diff check passed
Conventions and PR template passed conventions check from the main checkout
Mergeability and dependencies passed depends on none; the stack check passed
Silent stub listed in the debt file failed the function returns 0 without effect; no entry under Silent stubs (CONTRIBUTING)
Checklist claim about silent stubs failed the PR body ticks the box, and the debt diff is empty
New colour-space test (hosted) not run guest_video_out_color_space was Skipped in the Windows run
Source for the 0/1 validation rule not cited the PR body does not cite one (non-blocking)
ABI audit (main-checkout tool) passed with warnings 22 findings; mostly pre-existing "definition-not-found" entries
Build and runtime tests not run no local build
Negative controls not run no local build
Hosted CI passed windows passed (2594); the new test was skipped
Read-only check output

Precheck was not run: this session does not run code from PR heads. Hosted: gh api repos/boykopovar/AnyPS5/commits/a2c45851132bb507909331197181a1b193e44f8f/check-runs.

Negative control

Not run here. A negative control needs a build, and code from this head is not run here.

Findings

Blocking

  1. sceVideoOutSetColorimetry is a silent stub (it validates, then returns 0 without changing state). CONTRIBUTING allows silent stubs only when they unblock a title and only affect the UI, and requires them to be listed under Silent stubs in docs/dev/debt/libSceVideoOut.md. Please add that entry with the reason, or make the function do its job. The PR's checklist ticks that item, so it should be corrected too.

Non-blocking

  • The title is "test(libSceVideoOut): cover invalid colorimetry mode and port bounds", but the PR adds a new export. Please retitle it, and cite the source for the rule that colorimetry values above 1 are invalid.
  • The new colour-space test was Skipped in the hosted Windows run, so its assertions were not run there.

Sources

Not verified

  • Whether the colorimetry rule matches the console was not checked.
  • The ABI audit's 22 findings were not checked one by one.

To get this to a good state

  • Add the Silent stubs entry (or implement the setter), correct the checklist, and retitle the PR.

@adriadam10 adriadam10 self-assigned this Nov 6, 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 the earlier reviews; the points are still open on this head:

  • Output.cpp:541-553: the export is new, and its signature, the colorimetry <= 1 range and the return 0 have no source (no SDK header, disassembly, title call site or measurement). Please cite one per docs/dev/REVERSE_ENGINEERING.md, or leave the export as NotImplemented_nid_no_patch.
  • Output.cpp:549-550: after the checks it does nothing and returns 0. That is a silent stub that changes what the display is told about the signal, so it is not UI-only, and no debt entry is added under Silent stubs in docs/dev/debt/libSceVideoOut.md. Either implement the colorimetry state and test its effect, or throw.
  • GuestVideoOutColorSpace.cpp:63,64,81: the colorimetry == 2 cases pin the unsourced range; drop them with it.
  • The title says test(...) but the diff adds a new export. Please make the title and What match, and say where the test was built and run.

Feel free to push again with these addressed.

@adriadam10 adriadam10 removed their assignment Nov 17, 2026
@slopgobblercobbler
slopgobblercobbler force-pushed the test/videoout-colorimetry-bounds branch from a2c4585 to 8b4894d Compare November 18, 2026 20:30
@slopgobblercobbler slopgobblercobbler changed the title test(libSceVideoOut): cover invalid colorimetry mode and port bounds feat(libSceVideoOut): stub unimplemented sceVideoOutSetColorimetry export Nov 18, 2026
@slopgobblercobbler

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews and guidance @oneandonlydean, @MarcZX10, and @adriadam10.

I have updated the PR accordingly:

  1. Replaced the silent stub and unsourced range checks in sceVideoOutSetColorimetry with NotImplemented_nid_no_patch(__func__) in core/libs/prx/libSceVideoOut/src/Output.cpp.
  2. Added an entry in docs/dev/debt/libSceVideoOut.md under ### Unknown function info documenting that parameter bounds, colorimetry options, and hardware signal behavior are unknown.
  3. Dropped the unsourced test assertions from core/libs/tests/GuestVideoOutColorSpace.cpp, returning the test file to the clean upstream main state.
  4. Retitled the PR to feat(libSceVideoOut): stub unimplemented sceVideoOutSetColorimetry export and updated the PR description and checklist to match.
  5. Rebased cleanly onto upstream main; verified conventions pass with 0 errors via python tools/check_conventions.py --base upstream/main.

@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 — looks good

The added export is declared and implemented as an unimplemented stub, and its unknown behavior is recorded in the technical debt list at head 8b4894d0116fb48163c5196306a25ea2c60e7693.

What I ran

Read the prepared diff and all three changed files at the pinned head. No commands or tests were run; repo_read.py was used to inspect the review bundle and repository source.

Results

Check Result Note
Changed files read passed All three reviewed
Tests and precheck not run PR description reports convention check passed

Findings

Blocking

None.

Non-blocking

None.

Sources

Inspected core/libs/prx/libSceVideoOut/include/Output.hpp, core/libs/prx/libSceVideoOut/src/Output.cpp, and docs/dev/debt/libSceVideoOut.md at the pinned head. The diff adds the declaration, calls NotImplemented_nid_no_patch(__func__) in the implementation, and documents the unknown parameters and behavior.

Not verified

The reported convention check was not run independently. Runtime behavior and hardware signal effects were not tested; the debt entry records these details as unknown.

To get this to a good state

Nothing is required.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@slopgobblercobbler I read 8b4894d. The earlier ask is answered: the silent return 0 and the unsourced range check are gone, and the export stays a NotImplemented stub.

One thing blocks it: the debt entry is edited directly in docs/dev/debt/libSceVideoOut.md. Please move it to a fragment at docs/dev/debt/changes/.md (see docs/dev/TechnicalDebt.md) and revert the direct edit, which would otherwise conflict with every other VideoOut PR.

Two notes. No title is shown importing sceVideoOutSetColorimetry, so please say which one needs the import to resolve. And the stub throws instead of answering, so it should not be counted as implemented.

@slopgobblercobbler

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @PrivacyOnion @MarcZX10 PR #14506 force-pushed to commit 8b4894d (rebased on 3858655). Windows tests passed, but Linux tests were skipped.

@slopgobblercobbler

Copy link
Copy Markdown
Contributor Author

Hi @adriadam10, the fix for PR #14506 (feat(libSceVideoOut): stub unimplemented sceVideoOutSetColorimetry export) has been rebased and force-pushed at commit 8b4894d. Per the maintainer feedback from @MarcZX10, the implementation now uses NotImplemented_nid_no_patch, the unsourced test assertions have been dropped, and the technical debt is documented in docs/dev/debt/libSceVideoOut.md. Please review the updated branch.

@slopgobblercobbler
slopgobblercobbler force-pushed the test/videoout-colorimetry-bounds branch from 8b4894d to 1c2ca4a Compare November 19, 2026 23:26
@slopgobblercobbler

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Moved the debt entry to a fragment at docs/dev/debt/changes/test-videoout-colorimetry-bounds.md, reverted the direct edit to docs/dev/debt/libSceVideoOut.md, and cleanly rebased onto latest upstream/main. Verified tools/check_conventions.py --base upstream/main passes with 0 errors.

@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 — looks good

The export declaration and implementation match the stated goal, and the technical debt entry records the behavior that remains unknown.

What I ran

Reviewed head 1c2ca4aecb7695fba7ae8fd9e8a49a12dbf04030 against base main using the prepared diff and pinned reader. No commands or tests were run; the convention check result is author-reported.

Results

Check Result Note
Diff and changed lines passed All three changed files read
Convention check not run Author reports zero errors
Build and runtime behavior not run No execution performed

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build, tests, convention check, and console or hardware behavior were not verified. Read core/libs/prx/libSceVideoOut/include/Output.hpp, core/libs/prx/libSceVideoOut/src/Output.cpp, and docs/dev/debt/changes/test-videoout-colorimetry-bounds.md; no changed files were excluded according to the manifest.

To get this to a good state

Nothing is required.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 1c2ca4aecb, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#16191, #16207, #17573, #18945, #20978, #21054, #22002, #22003, #22042, #22078, #22822, #24354, #24484, #12860, #18915, #19999, #22160, #22890, #22891, #23488, #23751, #24051, #24578, #19462, #22206, #22291, #22627, #24048, #24424). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
none: no test of its own in this PR - -

Whole batch: the full ctest -j 12 (6526 tests) on the RTX 3080 has 15 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #12860 (guest_user_service_account_name_limits, guest_user_service_age_level_guest_bounds, guest_user_service_initial_user_bounds, guest_user_service_kratos), #22891 (nkwebkit_securityorigin), #18915 (public_headers); none is in this PR's area. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): guest_apr_read_longeof, guest_filesystem, guest_kernel_rename, guest_windows_directory_link_types, tools_patch_advisor_json, tools_suggest_patches. The 2125 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for working on this, and for making the changes asked in review. What is left declares an export that still reports not implemented, and we know of no title that imports it, so I am closing it for now.

If you find a game that calls it, reopen this with that detail and I will look again.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants